From 93fec8fdd7ae789f391eefccca82e4b206cf14d9 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Feb 10 2024 14:05:37 +0000 Subject: Enable test deploy in CI This evaluates deploy.py for every merge to production. Once we become satisfied with the evaluation, we can update "--mode test" to "--mode fire". The existing "deploy" job is renamed to "sync", as it only copies data. Signed-off-by: Georg Pfuetzenreuter --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 947d5ca..7746498 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,11 +80,22 @@ test_nginx: job: prepare_includes strategy: depend -deploy_job: +.deploy: + rules: + - if: $CI_COMMIT_BRANCH == 'production' stage: deploy - script: - - "rsync -a --delete --super --owner --group --chown=477:479 --chmod='u=rwX,g=rX,o=' $PWD/ rsync://saltpush@witch1.infra.opensuse.org:873/salt-push/" tags: - docker - rules: - - if: $CI_COMMIT_BRANCH == "production" + +sync: + extends: .deploy + script: + - "rsync -a --delete --super --owner --group --chown=477:479 --chmod='u=rwX,g=rX,o=' $PWD/ rsync://saltpush@witch1.infra.opensuse.org:873/salt-push/" + +deploy: + extends: .deploy + image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-deployment:latest + needs: + - sync + script: + - bin/deploy.py --mode test --no-mine-update