diff --git a/common-tasks/test-set-nodepool-vars.yml b/common-tasks/test-set-nodepool-vars.yml index fd67bd64..e2895758 100644 --- a/common-tasks/test-set-nodepool-vars.yml +++ b/common-tasks/test-set-nodepool-vars.yml @@ -38,21 +38,27 @@ fi echo "repo_build_pip_default_index=${NODEPOOL_PYPI_MIRROR}" echo "nspawn_hosts_container_image_repo=${NODEPOOL_LXC_IMAGE_PROXY}" - echo "lxc_centos_package_baseurl=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/epel-7-x86_64/" - echo "lxc_centos_package_key=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/pubkey.gpg" - # NOTE(mnaser): We need to make sure we pull the latest RDO mirror - # which is hashed to avoid cache going stale during CI. - # TODO(mnaser): Share this with Puppet - # https://github.com/openstack/puppet-openstack-integration/blob/master/configure_facts.sh#L66-L71 - export DLRN_BASE=${DLRN_BASE:-centos7-master/puppet-passed-ci} - rdo_dlrn=`curl --silent ${NODEPOOL_RDO_PROXY}/${DLRN_BASE}/delorean.repo | grep baseurl | cut -d= -f2` - if [[ -z "$rdo_dlrn" ]]; then - echo "Failed to parse dlrn hash" - exit 1 + source /etc/os-release + if [[ $ID == 'centos' && VERSION_ID == '7' ]]; then + echo "lxc_centos_package_baseurl=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/epel-7-x86_64/" + echo "lxc_centos_package_key=http://${NODEPOOL_MIRROR_HOST}:8080/copr-lxc2/pubkey.gpg" + + # NOTE(mnaser): We need to make sure we pull the latest RDO mirror + # which is hashed to avoid cache going stale during CI. + # TODO(mnaser): Share this with Puppet + # https://github.com/openstack/puppet-openstack-integration/blob/master/configure_facts.sh#L66-L71 + export DLRN_BASE=${DLRN_BASE:-centos7-master/puppet-passed-ci} + rdo_dlrn=`curl --silent ${NODEPOOL_RDO_PROXY}/${DLRN_BASE}/delorean.repo | grep baseurl | cut -d= -f2` + if [[ -z "$rdo_dlrn" ]]; then + echo "Failed to parse dlrn hash" + exit 1 + fi + RDO_MIRROR_HOST=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY} + echo "openstack_hosts_rdo_repo_url=${RDO_MIRROR_HOST}"s + elif [[ $ID == 'centos' && VERSION_ID == '8' ]]; then + echo "openstack_hosts_rdo_mirror_url=${NODEPOOL_RDO_PROXY}" fi - RDO_MIRROR_HOST=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY} - echo "openstack_hosts_rdo_repo_url=${RDO_MIRROR_HOST}" args: executable: /bin/bash register: nodepool_variables