Skip to content

Commit

Permalink
refactor(build):enable downstream tagging on custom repo
Browse files Browse the repository at this point in the history
Remove the hardcoding of openebs in the downstream
release tagging.

Signed-off-by: kmova <kiran.mova@mayadata.io>
  • Loading branch information
kmova committed May 7, 2020
1 parent f76096d commit ec5754d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ script:
# v1.9.0-custom => should be v1.9.x-custom
# v1.9.1-custom => should be v1.9.x-custom
# Convert the TRAVIS_TAG to the corresponding release branch.
- if [ ! -z $TRAVIS_TAG ] && [ $RELEASE_TAG_DOWNSTREAM = 1 ] && [ "$TRAVIS_REPO_SLUG" == "openebs/jiva-operator" ]; then
#
# Allow for building forked openebs pipelines.
# Tag the downstream repos under current repo org.
- if [ -z $REPO_ORG ]; then
REPO_ORG=$(echo "$TRAVIS_REPO_SLUG" | cut -d'/' -f1);
export REPO_ORG;
fi
- if [ ! -z $TRAVIS_TAG ] && [ $RELEASE_TAG_DOWNSTREAM = 1 ] && [ "$TRAVIS_REPO_SLUG" == "$REPO_ORG/jiva-operator" ]; then
TAG_SUFFIX=$(echo "$TRAVIS_TAG" | cut -d'-' -f2);
if [ "$TAG_SUFFIX" == "$TRAVIS_TAG" ] || [[ $TAG_SUFFIX =~ ^RC ]]; then
REL_SUFFIX="";
Expand All @@ -83,7 +90,7 @@ script:

REL_BRANCH=$(echo $(echo "$TRAVIS_TAG" | cut -d'-' -f1 | rev | cut -d'.' -f2- | rev).x$REL_SUFFIX);

./build/git-release "openebs/jiva-csi" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
./build/git-release "$REPO_ORG/jiva-csi" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
fi
notifications:
email:
Expand Down

0 comments on commit ec5754d

Please sign in to comment.