Commit d6cef60e authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Clean up gitlab-ci.yml (fix)

parent f8311d74
Pipeline #89 passed with stages
in 7 minutes and 41 seconds
......@@ -3,34 +3,25 @@ image: 'rust:latest'
stages:
- test
- build
- prepare_deploy
- deploy
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
before_script:
- apt-get update -yq
- rustup component add clippy
#- rustup component add rustfmt
info:
test:
stage: test
script:
- rustc --version
- cargo --version
test:
stage: test
script:
- cargo test --features "strict" --verbose
clippy:
stage: test
script:
- rustup component add clippy
- make clippy
......@@ -52,8 +43,8 @@ build:
prepare_deploy:
stage: prepare_deploy
deploy:
stage: deploy
script:
# Setup SSH deploy keys
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
......@@ -61,14 +52,7 @@ prepare_deploy:
- ssh-add <(echo "$SSH_PRIVATE_KEY" | base64 -d)
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
only:
- master
deploy:
stage: deploy
script:
# Stop server and upload
- ssh medald@jim.test.bwinf.de "sudo /bin/systemctl stop medal && exit"
- "scp target/release/medal medald@jim.test.bwinf.de:medal/"
- "scp -r migrations static templates medald@jim.test.bwinf.de:medal/"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment