zen_dhcpd/.gitlab-ci.yml
Chris Hammer 4a75d0e87f 0.1.35-DEV-20210505-013334
--------------------------
    * FIX:
      - fixes to .gitlab-ci.yml
2021-05-05 01:34:15 -04:00

84 lines
2.1 KiB
YAML

# CI Mark that build is executed in CI environment
# GITLAB_CI Mark that build is executed in GitLab CI environment
# CI_SERVER Mark that build is executed in CI environment
# CI_SERVER_NAME CI server that is used to coordinate builds
# CI_SERVER_VERSION Not yet defined
# CI_SERVER_REVISION Not yet defined
# CI_BUILD_REF The commit revision for which project is built
# CI_BUILD_BEFORE_SHA The first commit that were included in push request
# CI_BUILD_REF_NAME The branch or tag name for which project is built
# CI_BUILD_ID The unique id of the current build that GitLab CI uses internally
# CI_BUILD_REPO The URL to clone the Git repository
# CI_PROJECT_ID The unique id of the current project that GitLab CI uses internally
# CI_PROJECT_DIR The full path where the repository is cloned and where the build is ran
# image: docker.thezengarden.net/zen-ci:latest
variables:
ANSIBLE_PLAY: "zen_dhcpd.yml"
ANSIBLE_PLAY_PATH: "${CI_PROJECT_DIR}"
ANSIBLE_EXTRA_VARS: ""
stages:
- check_and_lint
- test_deploy
### BEGIN TEMPLATES ###
.centos_header_template: &centos_header
tags:
- zen-ci
only:
- master
.check_versions_template: &check_vers
stage: check_and_lint
script:
- /usr/bin/hostname
- "cd ${CI_PROJECT_DIR} && git log -1"
- "ansible --version"
- "ansible-lint --version"
.lint_play_template: &lint_play
stage: check_and_lint
script:
- chmod 755 ${ANSIBLE_PLAY_PATH}
- ansible-galaxy install -r roles/requirements.yml
- ansible-lint -v ${ANSIBLE_PLAY_PATH}/${ANSIBLE_PLAY}
- yamllint -v ${ANSIBLE_PLAY_PATH}/${ANSIBLE_PLAY}
.test_deploy_template: &test_deploy
stage: test_deploy
script:
- chmod 755 ${ANSIBLE_PLAY_PATH}
- pwd
- ls -ltr
- ansible-galaxy install -r roles/requirements.yml
- ansible-playbook -v -i '127.0.0.1,' --connection=local ${ANSIBLE_EXTRA_VARS} ${ANSIBLE_PLAY}
- cat /etc/dhcp/dhcpd.conf
### END TEMPLATES ###
### BEGIN JOBS ###
Version Checks - CentOS:
<<: *centos_header
<<: *check_vers
Lint Play - CentOS:
<<: *centos_header
<<: *lint_play
Test Deploy - CentOS:
<<: *centos_header
<<: *test_deploy
### END JOBS ###