Created
January 13, 2020 17:56
-
-
Save weshayutin/c77a2aa33c0d7a4c9b93481dc2f789f4 to your computer and use it in GitHub Desktop.
sample script for promoting component/$name/consistent/delorean.repo to tripleo-ci-testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
set -e | |
source promoter_venv/bin/activate | |
source dlrnapi_secret | |
# Setup virtualenv for dlrnapi | |
: ${DLRNAPI_USERNAME:="ciuser"} | |
#: ${PROMOTE_TO:="${promotion_symlink}"} | |
: ${PROMOTE_TO:="tripleo-ci-testing"} | |
: ${DLRNAPI_URL:="https://trunk.rdoproject.org/api-centos8-master-uc"} | |
echo $DLRNAPI_USERNAME | |
echo $PROMOTE_TO | |
echo $DLRNAPI_URL | |
export delorean_components_url="https://trunk.rdoproject.org/centos8-master/component" | |
export source_name="consistent" | |
export delorean_components="baremetal cinder clients cloudops common compute glance manila network octavia security swift tempest tripleo ui" | |
echo ${delorean_components} | |
for component in $delorean_components; do | |
curl -sLo commit.yaml $delorean_components_url/${component}/${source_name}/commit.yaml | |
COMMIT_HASH=$(shyaml get-value commits.0.commit_hash < ./commit.yaml) | |
DISTRO_HASH=$(shyaml get-value commits.0.distro_hash < ./commit.yaml) | |
echo $component | |
echo $COMMIT_HASH | |
echo $DISTRO_HASH | |
# Assign label to the specific hash using the DLRN API | |
dlrnapi --url $DLRNAPI_URL \ | |
--username $DLRNAPI_USERNAME \ | |
repo-promote \ | |
--commit-hash $COMMIT_HASH \ | |
--distro-hash $DISTRO_HASH \ | |
--promote-name $PROMOTE_TO | |
done | |
on promoter server | |
promote-repo-dlrnapi.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment