VSPHERE_API_PORT: 443
VSPHERE_API_USER: 'Administrator@vsphere.local'
VSPHERE_API_PASSWD_PROD: 'secret'
- VSPHERE_DC: 'vmcc'
- VSPHERE_CLUSTER: 'vmcc-l105-01'
+ VSPHERE_DC: ''
+ VSPHERE_CLUSTER: ''
VSPHERE_VM_FOLDER: 'templates'
MAX_NR_TEMPLATES_STAY: 4
- TEMPLATE_VM_NAME: 'template.pixelpark.com'
- TEMPLATE_NAME: 'oracle-linux-7-template'
+ # TEMPLATE_VM_NAME: 'template.pixelpark.com'
+ # TEMPLATE_NAME: 'oracle-linux-7-template'
VMWARE_CONFIG_VERSION: 'vmx-15'
VM_OS_VERSION: 'oracleLinux7_64Guest'
VM_DISK_SIZE_GB: 32
VSPHERE_HOST="test-vcsa01.pixelpark.net";
fi
fi'
- - 'echo "VCenter Host: \"${VSPHERE_HOST}\""'
+ - ' if [ -z "${VSPHERE_DC}" ] ; then
+ if [ "$CI_COMMIT_REF_NAME" = "master" -o "$CI_COMMIT_REF_NAME" = "production" ] ; then
+ VSPHERE_DC="vmcc";
+ else
+ VSPHERE_DC="test-vmcc";
+ fi
+ fi'
+ - ' if [ -z "${VSPHERE_CLUSTER}" ] ; then
+ if [ "$CI_COMMIT_REF_NAME" = "master" -o "$CI_COMMIT_REF_NAME" = "production" ] ; then
+ VSPHERE_CLUSTER="vmcc-l105-01";
+ else
+ VSPHERE_CLUSTER="test-vmcc-l105-01";
+ fi
+ fi'
- 'CONFIG_FILE=etc/create-${OS_ID}-${SYSTEM_STATUS}.ini'
- 'echo "Configuration file: \"${CONFIG_FILE}\""'
- 'touch "${CONFIG_FILE}"'
- - 'ls -l "${CONFIG_FILE}" || true'
- 'echo "Finished common part"'
tags:
- deploy
ls -l "${CONFIG_FILE}" || true;
echo;
echo "-->";
- cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/"-e "s/^\(password\) .*/\1 = ********/";
+ cat "${CONFIG_FILE}" | sed -e "s/^\(root_password\) .*/\1 = ********/" -e "s/^\(password\) .*/\1 = ********/";
echo "<-- EOF"'
environment:
name: ${SYSTEM_STATUS}