Merge "Rework translation job git setup"

This commit is contained in:
Jenkins 2016-10-13 18:11:38 +00:00 committed by Gerrit Code Review
commit d7e41e03c2
2 changed files with 2 additions and 78 deletions

View File

@ -281,79 +281,6 @@
export BRANCH={branch} export BRANCH={branch}
/usr/local/jenkins/slave_scripts/gerrit-git-prep.sh https://review.openstack.org git://git.openstack.org /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: - builder:
name: zuul-clone name: zuul-clone

View File

@ -6,8 +6,7 @@
template-name: "{template-name}" template-name: "{template-name}"
- proposal-slave-cleanup - proposal-slave-cleanup
- revoke-sudo - revoke-sudo
- gerrit-git-prep - zuul-git-prep-upper-constraints
- constraints-git-prep
- shell: | - shell: |
#!/bin/bash -xe #!/bin/bash -xe
/usr/local/jenkins/slave_scripts/upstream_translation_update.sh {name} {template-name} /usr/local/jenkins/slave_scripts/upstream_translation_update.sh {name} {template-name}
@ -39,9 +38,7 @@
template-name: "{template-name}" template-name: "{template-name}"
- proposal-slave-cleanup - proposal-slave-cleanup
- revoke-sudo - revoke-sudo
- branch-git-prep: - zuul-git-branch-prep-upper-constraints:
branch: '{branch}'
- constraints-branch-git-prep:
branch: '{branch}' branch: '{branch}'
- shell: | - shell: |
#!/bin/bash -xe #!/bin/bash -xe