# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
set -e -o pipefail
+set -x
GIT_URL=${GIT_URL:-https://gerrit.opnfv.org/gerrit}
STREAM=${STREAM:-'nostream'}
echo "--> Verifying $RELEASE_FILES."
for release_file in $RELEASE_FILES; do
- # Verify the release file schema
- python releases/scripts/verify_schema.py \
- -s releases/schema.yaml \
- -y $release_file
# Verify tag for each repo exist and are attached to commits on stable-branch
while read -r repo tag ref
echo "$tag does not exist"
TAG_EXISTS=false
else
- git cat-file tag $tag
+ git cat-file commit $tag
TAG_EXISTS=true
fi
# If the tag doesn't exist and we're in a merge job,
# everything has been verified up to this point and we
# are ready to create the tag.
- git config --global user.name "jenkins-ci"
+ git config --global user.name "fbot"
git config --global user.email "jenkins-opnfv-ci@opnfv.org"
echo "--> Creating $tag tag for $repo at $ref"
git tag -am "$tag" $tag $ref
echo "--> Pushing tag"
- echo "[noop] git push origin $tag"
+ git push origin $tag
else
# For non-merge jobs just output the ref info.
git show -s --format="%h %s %d" $ref
popd &> /dev/null
echo "--> Done verifing $repo"
- done < <(python releases/scripts/repos.py -f $release_file)
+ done < <(python3 releases/scripts/repos.py -f $release_file)
done