2 # SPDX-License-Identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018 The Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 GIT_URL=${GIT_URL:-https://gerrit.opnfv.org/gerrit}
13 STREAM=${STREAM:-'nostream'}
14 RELEASE_FILES=$(git diff HEAD^1 --name-only -- "releases/$STREAM")
16 echo "--> Verifying $RELEASE_FILES."
17 for release_file in $RELEASE_FILES; do
18 # Verify the release file schema
19 python releases/scripts/verify_schema.py \
20 -s releases/schema.yaml \
24 for release_file in $RELEASE_FILES; do
25 while read -r repo branch ref; do
26 echo "$repo" "$branch" "$ref"
28 branch_actual="$(git ls-remote "https://gerrit.opnfv.org/gerrit/$repo.git" "refs/heads/$branch" | awk '{print $1}')"
30 if [ -n "$branch_actual" ]; then
31 echo "$repo refs/heads/$branch already exists at $branch_actual"
32 echo "RUN releng-release-create-venv.sh"
33 source jjb/releng/releng-release-tagging.sh
35 echo "This is a branching job"
36 source jjb/releng/releng-release-create-branch.sh
39 done < <(python releases/scripts/repos.py -b -f "$release_file")