From: Frank Brehm Date: Wed, 24 Jun 2020 07:21:36 +0000 (+0200) Subject: Modifying .gitlab-ci.yml X-Git-Tag: 2.1.2^2~9^2~16 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=d8cc1864a5c1bb222582b9bb5cd25f76c4cf4be4;p=pixelpark%2Fcreate-vmware-tpl.git Modifying .gitlab-ci.yml --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27b8995..9af809f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - deploy variables: + OS_ID: centos7 FLAKE8_MAX_LINE_LENGTH: 99 FLAKE8_MAX_COMPLEXITY: 20 FLAKE8_IGNORE_ERRORS: 'E226,E302,E41,E402' @@ -34,6 +35,7 @@ variables: LANG: $JOB_LANGUAGE LC_ALL: $JOB_LANGUAGE SYSTEM_STATUS: 'unknown' + CONFIG_FILE: 'etc/create.ini' .template_job: &job_definition before_script: @@ -44,17 +46,36 @@ variables: - pip install --upgrade --upgrade-strategy eager --requirement requirements.txt - pip list --format columns - if [ -x bin/compile-xlate-msgs.sh ] ; then bin/compile-xlate-msgs.sh; fi - - 'if [ "$CI_COMMIT_REF_NAME" = "master" ] ; then SYSTEM_STATUS="production"; elif [ "$CI_COMMIT_REF_NAME" = "test" ] ; then SYSTEM_STATUS="testing"; else SYSTEM_STATUS="development"; fi' - - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"' - - 'echo "System status: ${SYSTEM_STATUS}"' + - ' if [ "$CI_COMMIT_REF_NAME" = "master" -o "$CI_COMMIT_REF_NAME" = "production" ] ; then + SYSTEM_STATUS="production"; + elif [ "$CI_COMMIT_REF_NAME" = "test" -o "$CI_COMMIT_REF_NAME" = "testing" ] ; then + SYSTEM_STATUS="testing"; + else + SYSTEM_STATUS="development"; + fi' + - 'echo; echo "Ref name: ${CI_COMMIT_REF_NAME}"; "System status: ${SYSTEM_STATUS}"' + - ' if [ -z "${VSPHERE_HOST}" ] ; then + if [ "$CI_COMMIT_REF_NAME" = "master" -o "$CI_COMMIT_REF_NAME" = "production" ] ; then + VSPHERE_HOST="vcs01.ppbrln.internal" + else + VSPHERE_HOST="test-vcsa01.pixelpark.net" + fi + fi' + - 'echo; echo "VCenter Host: \"${VSPHERE_HOST}\""' + - 'CONFIG_FILE=etc/create-${OS_ID}-${SYSTEM_STATUS}.ini' + - 'echo; echo "Configuration file: \"${CONFIG_FILE}\""' + - 'touch "${CONFIG_FILE}"' + - echo tags: - deploy after_script: - - deactivate + - 'rm -fv "${CONFIG_FILE}"' Test source: <<: *job_definition stage: test + variables: + OS_ID: centos8 script: - hostname -f - whoami @@ -133,3 +154,4 @@ Linter: # only: # - schedules +# vim: et list