image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing:latest
stages:
- test
- deploy
.test_common:
stage: test
tags:
- docker
rules:
- if: $CI_COMMIT_BRANCH
.test_artifacts:
artifacts:
when: always
paths:
- '*.txt'
validate:
extends:
- .test_common
image: registry.opensuse.org/opensuse/infrastructure/containers_tumbleweed/heroes-salt-validation:latest
script: bin/test_validate.sh
show_highstate:
extends:
- .test_common
- .test_artifacts
before_script:
- bin/prepare_test_env.sh -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
test_haproxy:
extends:
- .test_common
- .test_artifacts
image: registry.opensuse.org/opensuse/infrastructure/containers/heroes-salt-testing-haproxy:latest
before_script:
- bin/prepare_test_env.sh -g -s -n
- 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
# changes:
# - bin/test_haproxy.sh
# - pillar/cluster/*/*
# - pillar/common/haproxy/*
# - salt/profile/proxy/*
# - salt/role/proxy*
# Dynamically generated jobs
prepare_includes:
script: bin/render_gitlab_ci_includes.py -w
artifacts:
paths:
- .gitlab-ci.includes/*.yml
test_highstate:
needs:
- prepare_includes
trigger:
include:
- artifact: .gitlab-ci.includes/test_highstate.yml
job: prepare_includes
strategy: depend
test_nginx:
needs:
- prepare_includes
trigger:
include:
- artifact: .gitlab-ci.includes/test_nginx.yml
job: prepare_includes
strategy: depend
deploy_job:
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"