diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e1e636..4a11454 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,27 +20,20 @@ variables: stages: - - check_versions - - lint_playbook + - check_and_lint - test_deploy ### BEGIN TEMPLATES ### -.tags_template: &tags_template +.header_template: &header tags: - zen-ci-deb-workstation - - -.zen_ci_deb_template: &zen_ci_deb_template - variables: - DOCKER_IMG_TAG: "latest" - - -.check_version_template: &check_version_template - <<: *tags_template - stage: check_versions only: - development + + +.check_versions_template: &check_vers + stage: check_and_lint script: - /bin/hostname - "cd ${CI_PROJECT_DIR} && git log -1" @@ -48,20 +41,14 @@ stages: - "ansible-lint --version" -.lint_playbook_template: &lint_playbook_template - <<: *tags_template - stage: lint_playbook - only: - - development +.lint_play_template: &lint_play + stage: check_and_lint script: - "ansible-lint -v ${ANSIBLE_ROLE_PATH}" -.test_deploy_template: &test_deploy_template - <<: *tags_template +.test_deploy_template: &test_deploy stage: test_deploy - only: - - development script: - cp -av ${ANSIBLE_ROLE_PATH} /etc/ansible/roles/${ANSIBLE_ROLE} - ansible-playbook -v --connection=local ${ANSIBLE_EXTRA_VARS} tests/test.yml @@ -72,17 +59,17 @@ stages: ### BEGIN JOBS ### -Check Versioning Info: - <<: *zen_ci_deb_template - <<: *check_version_template +Version Checks: + <<: *header + <<: *check_vers -Lint Playbook: - <<: *zen_ci_deb_template - <<: *lint_playbook_template +Lint Play: + <<: *header + <<: *lint_play Test Deploy: - <<: *zen_ci_deb_template - <<: *test_deploy_template + <<: *header + <<: *test_deploy ### END JOBS ###