Change-Id: I1da521749d78c97921237b244b25284d81d968f1
parameters:
- string:
- name: JOBS_LIST
- description: 'Space separated list of jobs to update. Will update all jobs if empty'
+ name: GERRIT_REVIEW
+ description: 'Number of gerrit review'
scm:
- git:
pushd maintenance-ci
+if [ -z ${GERRIT_REVIEW} ] ; then
+refspec=$(curl "https://review.fuel-infra.org/changes/?q=${GERRIT_REVIEW}&o=CURRENT_REVISION" | grep '"ref":' | awk -F ": " '{print $2}' | tr -d '"')
+git fetch https://review.fuel-infra.org/tools/sustaining "${refspec}" && git cherry-pick FETCH_HEAD
+fi
+
tox --help || sudo apt-get install -y python-tox
tox -e jobs