image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing:latest stages: - validate - test - deploy validate: stage: validate before_script: - bin/prepare_test_env.sh -i opensuse script: bin/test_validate.sh tags: - docker rules: - if: $CI_COMMIT_BRANCH show_highstate: stage: validate before_script: - bin/prepare_test_env.sh -i opensuse -g -o Leap,15,4 -s - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production script: bin/test_show_highstate.sh tags: - docker artifacts: #when: on_failure paths: - '*.txt' rules: - if: $CI_COMMIT_BRANCH upstream_formulas_show_highstate: stage: validate before_script: - bin/prepare_test_env.sh -i opensuse -g - bin/get_formulas.py -c -d /srv/formula -s script: bin/test_show_highstate.sh allow_failure: true tags: - docker rules: - if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME != "production" test_haproxy: image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing-haproxy:latest stage: test before_script: - bin/prepare_test_env.sh -i opensuse -g -s - bin/replace_secrets.sh - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production -f haproxy script: bin/test_haproxy.sh allow_failure: exit_codes: 2 tags: - docker artifacts: when: always paths: - '*.txt' rules: - if: $CI_COMMIT_BRANCH changes: - bin/test_haproxy.sh - pillar/cluster/*/* - pillar/common/haproxy/* - salt/profile/proxy/* - salt/role/proxy* test_nginx: image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing-nginx:latest stage: test before_script: - bin/prepare_test_env.sh -i opensuse -g - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production -f nginx script: bin/test_nginx.sh tags: - docker rules: - if: $CI_COMMIT_BRANCH test_sudo: stage: test before_script: - bin/prepare_test_env.sh -i opensuse -g - bin/get_formulas.py -c -d /srv/formula -s --clone-from 'https://gitlab.infra.opensuse.org/saltstack-formulas' --clone-branch production script: bin/test_sudo.sh tags: - docker rules: - if: $CI_COMMIT_BRANCH deploy_job: stage: deploy script: sudo salt-call event.fire_master $CI_DEPLOY_PASSWORD salt/fileserver/gitfs/update tags: - salt-deploy rules: - if: $CI_COMMIT_BRANCH == "production"