From 631a8f37e1fba5118e64b3c2a681c602b9d2c3cc Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 24 Jun 2020 09:41:27 +0200 Subject: [PATCH] Minor change to .gitlab-ci.yml --- .gitlab-ci.yml | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2fe74c..51566f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,7 @@ variables: LC_ALL: $JOB_LANGUAGE SYSTEM_STATUS: 'unknown' CONFIG_FILE: 'etc/create.ini' + ROOT_PASSWORD: 'blablub' .template_job: &job_definition before_script: @@ -53,7 +54,7 @@ variables: else SYSTEM_STATUS="development"; fi' - - 'echo; echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' + - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "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"; @@ -61,11 +62,12 @@ variables: VSPHERE_HOST="test-vcsa01.pixelpark.net"; fi fi' - - 'echo; echo "VCenter Host: \"${VSPHERE_HOST}\""' + - 'echo "VCenter Host: \"${VSPHERE_HOST}\""' - 'CONFIG_FILE=etc/create-${OS_ID}-${SYSTEM_STATUS}.ini' - - 'echo; echo "Configuration file: \"${CONFIG_FILE}\""' + - 'echo "Configuration file: \"${CONFIG_FILE}\""' - 'touch "${CONFIG_FILE}"' - - echo + - 'ls -l "${CONFIG_FILE}" || true' + - 'echo "Finished common part"' tags: - deploy after_script: @@ -106,6 +108,29 @@ Linter: - /^hf.*$/ - tags +Create Centos8 template: + <<: *job_definition + stage: deploy + variables: + OS_ID: centos8 + script: + - hostname -f + - whoami + - pwd + - which python3 + - 'echo "Environment:"; env | sort -i -f; echo' + - 'echo "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"' + - 'echo "VCenter Host: \"${VSPHERE_HOST}\""' + - 'echo "Configuration file: \"${CONFIG_FILE}\""' + - 'ls -l "${CONFIG_FILE}" || true' + environment: + name: ${SYSTEM_STATUS} + except: + - /^dev-.*$/ + - /^dev\/.*$/ + - /^hf.*$/ + - tags + #Deploy OEL7 template image: # <<: *job_definition # stage: deploy -- 2.39.5