-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/controller/certifi-2022.12.7
- Loading branch information
Showing
18 changed files
with
192 additions
and
464 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
# This automation is required so Gen3 Engineering can produce a copy of a branch from a forked-repo | ||
# and trigger a Quay image build that is utilized in our CI Pipeline. | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "$GITHUB_USERNAME" | ||
|
||
OUR_REMOTE_URL="https://github.com/uc-cdis/${OUR_GEN3_SERVICE_REPO_NAME}" | ||
URL_PREFIX="https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/uc-cdis/" | ||
OUR_REMOTE_URL="${URL_PREFIX}${OUR_GEN3_SERVICE_REPO_NAME}" | ||
|
||
echo "cloning $OUR_REMOTE_URL..." | ||
git clone $OUR_REMOTE_URL | ||
|
@@ -18,15 +22,19 @@ cd $OUR_GEN3_SERVICE_REPO_NAME | |
|
||
ls -ilha | ||
|
||
set +e | ||
# delete branch if it already exists | ||
branch_exists=$(git ls-remote --heads ${OUR_REMOTE_URL}.git automatedCopy-$NAME_OF_THE_BRANCH) | ||
set -e | ||
|
||
if [[ -z $branch_exists ]]; then | ||
echo "git ls-remote output empty. The branch does not exist." | ||
else | ||
echo "WARN: git ls-remote output is NOT empty." | ||
echo " Deleting the existing automatedCopy branch to create a new copy based on new changes from the forked-repo branch..." | ||
set +e | ||
git branch -D automatedCopy-$NAME_OF_THE_BRANCH | ||
set -e | ||
git push origin --delete automatedCopy-$NAME_OF_THE_BRANCH | ||
fi | ||
|
||
|
@@ -37,10 +45,9 @@ echo "changing origin to pull changes from external repo: https://${EXTERNAL_REP | |
git remote set-url origin https://${EXTERNAL_REPO_REMOTE_URL} | ||
|
||
echo "pulling changes from external branch $NAME_OF_THE_BRANCH" | ||
git pull origin $NAME_OF_THE_BRANCH | ||
git pull origin $NAME_OF_THE_BRANCH --no-rebase | ||
|
||
echo "restore original origin $OUR_REMOTE_URL" | ||
URL_PREFIX="https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/uc-cdis/" | ||
git remote set-url origin ${URL_PREFIX}${OUR_GEN3_SERVICE_REPO_NAME}.git | ||
|
||
echo "finish branch cloning process but pushing local changes to our repo's branch." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.