Allow CentOS8 jobs to run with custom dlrn hashes

DLRN repo symlinks(ex. current-tripleo, current etc)
keeps on changing with promotions, in order to reproduce/rerun
jobs with older dlrn hashes CentOS8 release files were missing
support, this patch adds it.

Related-Bug: #1887637
Depends-On: https://review.opendev.org/#/c/747121/
Change-Id: Idffb7de57d5f2debb8213b11c5ce3e41c2ece4f3
This commit is contained in:
yatinkarel 2020-07-17 18:29:28 +05:30 committed by yatin
parent 7bf80f6b10
commit 11c2bb7cdf
6 changed files with 114 additions and 18 deletions

View File

@ -59,18 +59,34 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
# RDO repos
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ dlrn_hash_tag }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# name of delorean-tripleo-component-current? naming is hard
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry

View File

@ -49,20 +49,36 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ promote_source }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# ATM current is not used in promotion jobs, this is a bug.
# However for consistency w/ what is merged. removing
# See config/release/tripleo-ci/CentOS-7/promotion-testing-hash-master.yml#L48-L64
# "https://trunk.rdoproject.org/centos8-master/component/tripleo/current/delorean.repo"
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry

View File

@ -48,20 +48,36 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ promote_source }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# ATM current is not used in promotion jobs, this is a bug.
# However for consistency w/ what is merged. removing
# See config/release/tripleo-ci/CentOS-7/promotion-testing-hash-master.yml#L48-L64
# "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry

View File

@ -49,20 +49,36 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ promote_source }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# ATM current is not used in promotion jobs, this is a bug.
# However for consistency w/ what is merged. removing
# See config/release/tripleo-ci/CentOS-7/promotion-testing-hash-master.yml#L48-L64
# "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry

View File

@ -43,17 +43,33 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ dlrn_hash_tag }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# name of delorean-tripleo-component-current? naming is hard
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry

View File

@ -59,18 +59,34 @@ repo_cmd_before: |
export NODEPOOL_CENTOS_MIRROR={{ lookup('env','NODEPOOL_CENTOS_MIRROR')|default('http://mirror.centos.org/centos', true) }}
export NODEPOOL_RDO_PROXY=https://trunk.rdoproject.org
fi
{% if dlrn_hash_path_newest is defined and dlrn_hash_path_newest %}
export DLRN_PATH_TAG_NEWEST="current/{{ dlrn_hash_path_newest }}"
{% else %}
export DLRN_PATH_TAG_NEWEST="{{ dlrn_hash_tag_newest }}"
{% endif %}
{% if dlrn_hash_path is defined and dlrn_hash_path %}
export DLRN_PATH_TAG="{{ promote_source }}/{{ dlrn_hash_path }}"
{% else %}
export DLRN_PATH_TAG="{{ dlrn_hash_tag }}"
{% endif %}
rdo_dlrn=`curl --silent https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG_NEWEST}/delorean.repo -S 2>>~/dlrn_repo_curl_errors.log | grep baseurl | grep "component/tripleo" | cut -d= -f2`
if [[ -z "$rdo_dlrn" ]]; then
echo "Failed to parse dlrn hash"
exit 1
fi
export RDO_DLRN_REPO=${rdo_dlrn/https:\/\/trunk.rdoproject.org/$NODEPOOL_RDO_PROXY}
repos:
# RDO repos
- type: file
filename: delorean.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/{{ dlrn_hash_tag }}/delorean.repo"
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/${DLRN_PATH_TAG}/delorean.repo"
# name of delorean-tripleo-component-current? naming is hard
- type: file
- type: generic
reponame: delorean-current
filename: delorean-current.repo
down_url: "https://trunk.rdoproject.org/{{ distro_ver }}-{{ release }}/component/tripleo/current/delorean.repo"
baseurl: $RDO_DLRN_REPO
priority: 10
includepkgs:
- ansible-role-container-registry