- deploy
variables:
+ OS_ID: centos7
FLAKE8_MAX_LINE_LENGTH: 99
FLAKE8_MAX_COMPLEXITY: 20
FLAKE8_IGNORE_ERRORS: 'E226,E302,E41,E402'
LANG: $JOB_LANGUAGE
LC_ALL: $JOB_LANGUAGE
SYSTEM_STATUS: 'unknown'
+ CONFIG_FILE: 'etc/create.ini'
.template_job: &job_definition
before_script:
- 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
# only:
# - schedules
+# vim: et list