FDIO: Fast Data Project introduction to Nordix
[infra/cicd.git] / jjb / global / push-upstream-jobs.sh
index 8bc35dd3fb57f1f25c1c87c8d53d8a4df9d2f766..49af36e76eeb92801afa401140a22f080e236d9b 100755 (executable)
@@ -24,7 +24,6 @@
 # - Author name in Nordix Gerrit equals LFID i.e. need to run "git config --global user.name <LFID>"
 # - infra public key on build server needs to be added to your users SSH Public Keys in ONAP Gerrit
 #
-set -o errexit
 set -o nounset
 set -o pipefail
 
@@ -47,7 +46,7 @@ git config user.name $username
 
 echo "Checking out branch on master with new changes"
 git reset HEAD~1 --soft
-git checkout -b delivery_branch origin/master
+git checkout -b delivery_branch origin/$BRANCH
 
 git config --get remote.upstream.url
 retVal=$?
@@ -62,7 +61,7 @@ fi
 
 echo "Committing changes and pushing upstream"
 git commit -as -m "$message"
-git push upstream HEAD:refs/for/master
+git push upstream HEAD:refs/for/$BRANCH
 
 retVal1=$?
 if [[ $retVal1 -eq 0 ]]