bifrost: Add ability to pin Ironic-{,client,inspector,inspector-client} SHAs 91/52091/5
authorMarkos Chandras <mchandras@suse.de>
Tue, 13 Feb 2018 10:11:16 +0000 (10:11 +0000)
committerMarkos Chandras <mchandras@suse.de>
Tue, 13 Feb 2018 21:41:55 +0000 (21:41 +0000)
We should pin the SHAs for Ironic components as part of the regular
bifrost bump to ensure maximum long term stability. This also bumps
the bifrost SHA to the latest available one.

Change-Id: Ia66d8ab6566db58e2ddab5134eb8445bd84d2a8f
Signed-off-by: Markos Chandras <mchandras@suse.de>
bifrost/scripts/bifrost-provision.sh
xci/config/pinned-versions
xci/scripts/update-osa-version-files.sh

index 086e3f3..bc2d36b 100755 (executable)
@@ -128,8 +128,12 @@ ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \
     -e wait_timeout=${PROVISION_WAIT_TIMEOUT} \
     -e enable_keystone=false \
     -e ironicinspector_source_install=true \
+    -e ironicinspector_git_branch=${BIFROST_IRONIC_INSPECTOR_VERSION} \
     -e ironicinspectorclient_source_install=true \
-    -e ironicclient_source_install=true
+    -e ironicinspectorclient_git_branch=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION} \
+    -e ironicclient_source_install=true \
+    -e ironicclient_git_branch=${BIFROST_IRONIC_CLIENT_VERSION} \
+    -e ironic_git_branch=${BIFROST_IRONIC_VERSION}
 EXITCODE=$?
 
 if [ $EXITCODE != 0 ]; then
index 5ea104d..9f069a6 100755 (executable)
 #-------------------------------------------------------------------------------
 # use releng-xci from master until the development work with the sandbox is complete
 export OPNFV_RELENG_VERSION="master"
-# HEAD of bifrost "master" as of 04.02.2018
-export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"593db8a7774abff54cdfa0dec8d8cca320b6cdf7"}
+# HEAD of bifrost "master" as of 13.02.2018
+export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"f3cf0d9fff6ec08ba0e46cbde5bfebfd77a26752"}
+# HEAD of ironic "master" as of 13.02.2018
+export BIFROST_IRONIC_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-"9b8440aa318e4883a74ef8640ad5409dd22858a9"}
+# HEAD of ironic-client "master" as of 13.02.2018
+export BIFROST_IRONIC_CLIENT_VERSION=${BIFROST_IRONIC_CLIENT_VERSION:-"1da269b0e99601f8f6395b2ce3f436f5600e8140"}
+# HEAD of ironic-inspector "master" as of 13.02.2018
+export BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-"84da941fafb905c2debdd9a9ba68ba743af3ce8a"}
+# HEAD of ironic-inspector-client "master" as of 13.02.2018
+export BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-"b73403fdad3165cfcccbf4b0330d426ae5925e01"}
 # HEAD of osa "master" as of 11.12.2017
 export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"7b3aac28a0a87e5966527829f6b0abcbc2303cc7"}
 export KEEPALIVED_VERSION=$(grep -E '.*name: keepalived' -A 3 \
index a8b0cef..42405a3 100755 (executable)
@@ -35,6 +35,11 @@ printme() {
 # Only need a single argument
 [[ $# -lt 1 || $# -gt 2 ]] && echo "Invalid number of arguments!" && usage
 
+ironic_git_url=https://github.com/openstack/ironic
+ironic_client_git_url=https://github.com/openstack/python-ironicclient
+ironic_inspector_git_url=https://github.com/openstack/ironic-inspector
+ironic_inspector_client_git_url=https://github.com/openstack/python-ironic-inspector-client
+
 tempdir="$(mktemp -d)"
 
 trap cleanup EXIT
@@ -74,9 +79,19 @@ sed -i -e "/^export OPENSTACK_OSA_VERSION/s@:-\"[a-z0-9]*@:-\"${1}@" \
     -e "s/\(^# HEAD of osa.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions
 
 # Update the pinned bifrost version
-[[ -n ${2:-} ]] && \
-    sed -i -e "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" \
+if [[ -n ${2:-} ]]; then
+  echo "Updating bifrost..."
+  sed -i -e "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" \
     -e "s/\(^# HEAD of bifrost.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions
+  # Get ironic shas
+  for ironic in ironic_git_url ironic_client_git_url ironic_inspector_git_url ironic_inspector_client_git_url; do
+    ironic_sha=$(git ls-remote ${!ironic} | grep master | awk '{print $1}')
+    ironic=${ironic/_git*/}
+    echo "... updating ${ironic}"
+    sed -i -e "/^export BIFROST_${ironic^^}_VERSION/s@:-\"[a-z0-9]*@:-\"${ironic_sha}@" \
+      -e "s/\(^# HEAD of ${ironic/_/-}.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions
+  done
+fi
 
 cp $tempdir/openstack-ansible/playbooks/defaults/repo_packages/openstack_services.yml ${releng_xci_base}/installer/osa/files/.
 cp $tempdir/openstack-ansible/global-requirement-pins.txt ${releng_xci_base}/installer/osa/files/.