MAX_NR_TEMPLATES_STAY: ''
MAX_NR_TEMPLATES_STAY_PROD: '4'
MAX_NR_TEMPLATES_STAY_TEST: '3'
- VMWARE_CONFIG_VERSION: 'vmx-15'
+ VMWARE_CONFIG_VERSION: ''
+ VMWARE_CONFIG_VERSION_TEST: 'vmx-15'
+ VMWARE_CONFIG_VERSION_PROD: 'vmx-19'
VM_OS_VERSION: 'centos8_64Guest'
VM_DISK_SIZE_GB: 20
VM_NUM_CPUS: 2
- 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" -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 "Ref name: ${CI_COMMIT_REF_NAME}"; echo "System status: ${SYSTEM_STATUS}"'
- - 'if [ "${SYSTEM_STATUS}" == "production" ] ; then
- if [ -z "${MAX_NR_TEMPLATES_STAY}" ] ; then MAX_NR_TEMPLATES_STAY="${MAX_NR_TEMPLATES_STAY_PROD}"; fi;
- if [ -z "${VSPHERE_HOST}" ] ; then VSPHERE_HOST="${VSPHERE_HOST_PROD}"; fi;
- if [ -z "${VSPHERE_DC}" ] ; then VSPHERE_DC="${VSPHERE_DC_PROD}"; fi;
- if [ -z "${VSPHERE_CLUSTER}" ] ; then VSPHERE_CLUSTER="${VSPHERE_CLUSTER_PROD}"; fi;
- if [ -z "${VSPHERE_STORAGE_CLUSTER}" ] ; then VSPHERE_STORAGE_CLUSTER="${VSPHERE_STORAGE_CLUSTER_PROD}"; fi;
- if [ -z "${COBBLER_HOST}" ] ; then COBBLER_HOST="${COBBLER_HOST_PROD}"; fi;
- if [ -z "${COBBLER_SSH_USER}" ] ; then COBBLER_SSH_USER="${COBBLER_SSH_USER_PROD}"; fi;
- if [ -z "${COBBLER_TEMPLATES_DIR}" ] ; then COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_PROD}"; fi;
- if [ -z "${VM_NETWORK}" ] ; then VM_NETWORK="${VM_NETWORK_PROD}"; fi;
+ - |
+ 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
- if [ -z "${MAX_NR_TEMPLATES_STAY}" ] ; then MAX_NR_TEMPLATES_STAY="${MAX_NR_TEMPLATES_STAY_TEST}"; fi;
- if [ -z "${VSPHERE_HOST}" ] ; then VSPHERE_HOST="${VSPHERE_HOST_TEST}"; fi;
- if [ -z "${VSPHERE_DC}" ] ; then VSPHERE_DC="${VSPHERE_DC_TEST}"; fi;
- if [ -z "${VSPHERE_CLUSTER}" ] ; then VSPHERE_CLUSTER="${VSPHERE_CLUSTER_TEST}"; fi;
- if [ -z "${VSPHERE_STORAGE_CLUSTER}" ] ; then VSPHERE_STORAGE_CLUSTER="${VSPHERE_STORAGE_CLUSTER_TEST}"; fi;
- if [ -z "${COBBLER_HOST}" ] ; then COBBLER_HOST="${COBBLER_HOST_TEST}"; fi;
- if [ -z "${COBBLER_SSH_USER}" ] ; then COBBLER_SSH_USER="${COBBLER_SSH_USER_TEST}"; fi;
- if [ -z "${COBBLER_TEMPLATES_DIR}" ] ; then COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_TEST}"; fi;
- if [ -z "${VM_NETWORK}" ] ; then VM_NETWORK="${VM_NETWORK_TEST}"; fi;
- fi'
+ SYSTEM_STATUS="development"
+ fi
+ - |
+ echo "Ref name: ${CI_COMMIT_REF_NAME}"
+ echo "System status: ${SYSTEM_STATUS}"
+ - |
+ if [ "${SYSTEM_STATUS}" == "production" ] ; then
+ if [ -z "${MAX_NR_TEMPLATES_STAY}" ] ; then MAX_NR_TEMPLATES_STAY="${MAX_NR_TEMPLATES_STAY_PROD}"; fi
+ if [ -z "${VSPHERE_HOST}" ] ; then VSPHERE_HOST="${VSPHERE_HOST_PROD}"; fi
+ if [ -z "${VSPHERE_DC}" ] ; then VSPHERE_DC="${VSPHERE_DC_PROD}"; fi
+ if [ -z "${VSPHERE_CLUSTER}" ] ; then VSPHERE_CLUSTER="${VSPHERE_CLUSTER_PROD}"; fi
+ if [ -z "${VSPHERE_STORAGE_CLUSTER}" ] ; then VSPHERE_STORAGE_CLUSTER="${VSPHERE_STORAGE_CLUSTER_PROD}"; fi
+ if [ -z "${COBBLER_HOST}" ] ; then COBBLER_HOST="${COBBLER_HOST_PROD}"; fi
+ if [ -z "${COBBLER_SSH_USER}" ] ; then COBBLER_SSH_USER="${COBBLER_SSH_USER_PROD}"; fi
+ if [ -z "${COBBLER_TEMPLATES_DIR}" ] ; then COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_PROD}"; fi
+ if [ -z "${VM_NETWORK}" ] ; then VM_NETWORK="${VM_NETWORK_PROD}"; fi
+ if [ -z "${VMWARE_CONFIG_VERSION}" ] ; then VMWARE_CONFIG_VERSION="${VMWARE_CONFIG_VERSION_PROD}"; fi
+ else
+ if [ -z "${MAX_NR_TEMPLATES_STAY}" ] ; then MAX_NR_TEMPLATES_STAY="${MAX_NR_TEMPLATES_STAY_TEST}"; fi;
+ if [ -z "${VSPHERE_HOST}" ] ; then VSPHERE_HOST="${VSPHERE_HOST_TEST}"; fi;
+ if [ -z "${VSPHERE_DC}" ] ; then VSPHERE_DC="${VSPHERE_DC_TEST}"; fi;
+ if [ -z "${VSPHERE_CLUSTER}" ] ; then VSPHERE_CLUSTER="${VSPHERE_CLUSTER_TEST}"; fi;
+ if [ -z "${VSPHERE_STORAGE_CLUSTER}" ] ; then VSPHERE_STORAGE_CLUSTER="${VSPHERE_STORAGE_CLUSTER_TEST}"; fi;
+ if [ -z "${COBBLER_HOST}" ] ; then COBBLER_HOST="${COBBLER_HOST_TEST}"; fi;
+ if [ -z "${COBBLER_SSH_USER}" ] ; then COBBLER_SSH_USER="${COBBLER_SSH_USER_TEST}"; fi;
+ if [ -z "${COBBLER_TEMPLATES_DIR}" ] ; then COBBLER_TEMPLATES_DIR="${COBBLER_TEMPLATES_DIR_TEST}"; fi;
+ if [ -z "${VM_NETWORK}" ] ; then VM_NETWORK="${VM_NETWORK_TEST}"; fi;
+ if [ -z "${VMWARE_CONFIG_VERSION}" ] ; then VMWARE_CONFIG_VERSION="${VMWARE_CONFIG_VERSION_TEST}"; fi
+ fi
- 'echo "Configuration file: \"${CONFIG_FILE}\""'
- 'touch "${CONFIG_FILE}"'
- touch etc/ldap.yaml
tags:
- deploy_v2
after_script:
- - ' 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'
+ - |
+ 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
- 'ls -l "${CONFIG_FILE}" || true'
- 'rm -fv "${CONFIG_FILE}"'
echo " base_dn: '${LDAP_BASE_DN}'" >> "etc/ldap.yaml"
echo " bind_dn: '${LDAP_BIND_DN}'" >> "etc/ldap.yaml"
echo " bind_pw: '${LDAP_BIND_PW}'" >> "etc/ldap.yaml"
- - 'echo "Generated etc/ldap.yaml:";
- ls -l "etc/ldap.yaml" || true;
- echo;
- echo "-->";
- sed -e "s/\(bind_pw: \).*/\1********/" "etc/ldap.yaml";
- echo "<-- EOF"'
- - 'if [ "${SYSTEM_STATUS}" = "development" ] ; then
- echo "No build is done.";
- else
- bin/create-vmware-template --verbose --color yes;
- fi'
+ - |
+ echo "Generated etc/ldap.yaml:"
+ ls -l "etc/ldap.yaml" || true;
+ echo
+ echo "-->"
+ sed -e "s/\(bind_pw: \).*/\1********/" "etc/ldap.yaml"
+ echo "<-- EOF"
+ - |
+ if [ "${SYSTEM_STATUS}" = "development" ] ; then
+ echo "No build is done.";
+ else
+ bin/create-vmware-template --verbose --color yes;
+ fi
Create Centos8 template:
extends: