From 680dc103bc3387f67faaa5c862bd026391c168fc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 16 Sep 2016 21:10:30 +0200 Subject: [PATCH] Rework translation job git setup Since we have zuul-cloner on the proposal node now, we can use it there. So, remove the constraints-git-prep and zuul-git-branch-prep-upper-constraints and replace it with the normal zuul-cloner builders that set up constraints. The two builders have been used only for translation jobs, we can remove them completely now. Change-Id: I7787daf025f4f14cf665db0366fa81f54adfa884 --- jenkins/jobs/macros.yaml | 73 ------------------------------ jenkins/jobs/translation-jobs.yaml | 7 +-- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index 65d8b35a47..092c237635 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -280,79 +280,6 @@ export BRANCH={branch} /usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org git://git.openstack.org -- builder: - name: constraints-git-prep - builders: - - shell: | - #!/bin/bash -xe - - # No need to copy for openstack/requirements - if [[ "$ZUUL_PROJECT" == "openstack/requirements" ]]; then - exit 0 - fi - - # Check out requirements repository for coresponding branch - REQS_DIR=`mktemp -d` - function cleanup { - rm -rf $REQS_DIR - } - trap cleanup EXIT - - # We need to check out tip of branch, not a specific change. - # For post queue, ZUUL_REF will be set to branch, for check/gate - # set it from ZUUL_BRANCH. - if [ -z "$ZUUL_BRANCH" ] ; then - export BRANCH=$ZUUL_REF - else - export BRANCH=$ZUUL_BRANCH - fi - # TODO(jaegerandi): Remove once stable/newton branch for - # requirements repo is created. - if [[ "$BRANCH" == "stable/newton" ]] ; then - BRANCH="master" - fi - export ZUUL_REF="" - export ZUUL_NEWREV="" - export ZUUL_CHANGE="" - export ZUUL_PROJECT="openstack/requirements" - pushd $REQS_DIR - /usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org git://git.openstack.org - popd - cp $REQS_DIR/upper-constraints.txt ./ - - -- builder: - name: constraints-branch-git-prep - builders: - - shell: | - #!/bin/bash -xe - - # No need to copy for openstack/requirements - if [[ "$ZUUL_PROJECT" == "openstack/requirements" ]]; then - exit 0 - fi - - # Check out requirements repository for coresponding branch - REQS_DIR=`mktemp -d` - function cleanup {{ - rm -rf $REQS_DIR - }} - trap cleanup EXIT - export BRANCH={branch} - # TODO(jaegerandi): Remove once stable/newton branch for - # requirements repo is created. - if [[ "$BRANCH" == "stable/newton" ]] ; then - BRANCH="master" - fi - export ZUUL_REF="" - export ZUUL_NEWREV="" - export ZUUL_CHANGE="" - export ZUUL_PROJECT="openstack/requirements" - pushd $REQS_DIR - /usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org git://git.openstack.org - popd - cp $REQS_DIR/upper-constraints.txt ./ - - builder: name: zuul-clone diff --git a/jenkins/jobs/translation-jobs.yaml b/jenkins/jobs/translation-jobs.yaml index f337ffc900..330be9c461 100644 --- a/jenkins/jobs/translation-jobs.yaml +++ b/jenkins/jobs/translation-jobs.yaml @@ -6,8 +6,7 @@ template-name: "{template-name}" - proposal-slave-cleanup - revoke-sudo - - gerrit-git-prep - - constraints-git-prep + - zuul-git-prep-upper-constraints - shell: | #!/bin/bash -xe /usr/local/jenkins/slave_scripts/upstream_translation_update.sh {name} {template-name} @@ -39,9 +38,7 @@ template-name: "{template-name}" - proposal-slave-cleanup - revoke-sudo - - branch-git-prep: - branch: '{branch}' - - constraints-branch-git-prep: + - zuul-git-branch-prep-upper-constraints: branch: '{branch}' - shell: | #!/bin/bash -xe