diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/releng/releng-release-create-branch.sh | 15 | ||||
-rw-r--r-- | jjb/releng/releng-release-jobs.yaml | 2 | ||||
-rw-r--r-- | jjb/xci/xci-verify-jobs.yaml | 8 |
3 files changed, 22 insertions, 3 deletions
diff --git a/jjb/releng/releng-release-create-branch.sh b/jjb/releng/releng-release-create-branch.sh index 92be0e637..663ff19e7 100644 --- a/jjb/releng/releng-release-create-branch.sh +++ b/jjb/releng/releng-release-create-branch.sh @@ -26,7 +26,20 @@ STREAM=${STREAM:-'nostream'} RELEASE_FILES=$(git diff HEAD^1 --name-only -- "releases/$STREAM") for release_file in $RELEASE_FILES; do - python releases/scripts/create_branch.py -f $release_file + + while read -r repo branch ref; do + + echo "$repo" "$branch" "$ref" + branches="$(git ls-remote "https://gerrit.opnfv.org/gerrit/$repo.git" "refs/heads/$branch")" + + if ! [ -z "$branches" ]; then + echo "refs/heads/$branch already exists at $ref ($branches)" + else + ssh -n -f -p 29418 gerrit.opnfv.org gerrit create-branch "$repo" "$branch" "$ref" + fi + + done < <(python releases/scripts/repos.py -b -f "$release_file") + python releases/scripts/create_jobs.py -f $release_file NEW_FILES=$(git status --porcelain --untracked=no | cut -c4-) if [ -n "$NEW_FILES" ]; then diff --git a/jjb/releng/releng-release-jobs.yaml b/jjb/releng/releng-release-jobs.yaml index 89519ae9b..3136d7855 100644 --- a/jjb/releng/releng-release-jobs.yaml +++ b/jjb/releng/releng-release-jobs.yaml @@ -107,7 +107,7 @@ - shell: !include-raw-escape: - releng-release-create-venv.sh - releng-release-tagging.sh - # - releng-release-create-branch.sh + - releng-release-create-branch.sh publishers: - email-jenkins-admins-on-failure diff --git a/jjb/xci/xci-verify-jobs.yaml b/jjb/xci/xci-verify-jobs.yaml index 7d0f905b2..47ae4f8e2 100644 --- a/jjb/xci/xci-verify-jobs.yaml +++ b/jjb/xci/xci-verify-jobs.yaml @@ -164,6 +164,7 @@ description: 'Git URL to use on this Jenkins Slave' builders: + - 'xci-verify-clean-vm-macro' - 'xci-verify-set-scenario-macro' - inject: properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" @@ -218,7 +219,6 @@ - role: BOTH build-on: - ABORTED - - FAILURE - NOT_BUILT - SUCCESS - UNSTABLE @@ -298,6 +298,12 @@ # builder macros # ------------------------------- - builder: + name: 'xci-verify-clean-vm-macro' + builders: + - shell: + !include-raw: ./xci-cleanup.sh + +- builder: name: 'xci-verify-set-scenario-macro' builders: - shell: |