Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
deploy.sh: change env var names
Browse files Browse the repository at this point in the history
hub fails to refer .netrc. Pass the token as env var.
  • Loading branch information
darkowlzz committed May 15, 2019
1 parent 8c2a769 commit 947e58c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions scripts/create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -e

# Env vars definitions:-
#
# GH_USER: github username
# GH_EMAIL: github user email
# GH_TOKEN: github user API token with repo access permission only
# GITHUB_USER: github username
# GITHUB_EMAIL: github user email
# GITHUB_TOKEN: github user API token with repo access permission only
# VERSION: release version
# TARGET_REPO: upstream community operator repo
# COMMUNITY_REPO_PATH: community operator repo path
Expand All @@ -25,13 +25,13 @@ declare -a metadatafiles=(

# Setup netrc.
echo "machine github.com
login $GH_USER
password $GH_TOKEN
login $GITHUB_USER
password $GITHUB_TOKEN
" > ~/.netrc

# Configure git.
git config --global user.email "$GH_EMAIL"
git config --global user.name "$GH_USER"
git config --global user.email "$GITHUB_EMAIL"
git config --global user.name "$GITHUB_USER"

# Clone community hub repo.
git clone $TARGET_REPO $COMMUNITY_REPO_PATH
Expand All @@ -48,7 +48,7 @@ done
# Create branch, commit and create a PR.
MESSAGE="Update StorageOS Operator to version ${VERSION}"
pushd $COMMUNITY_REPO_PATH
hub remote add fork https://github.com/$GH_USER/community-operators
hub remote add fork https://github.com/$GITHUB_USER/community-operators
git checkout -b $VERSION
git add *
git commit -m "$MESSAGE"
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [ "$1" = "tagged" ]; then
# Create a PR to community-operator repo.
docker run --rm -ti \
-v $PWD:/go/src/github.com/storageos/cluster-operator \
-e GH_USER=$GH_USER \
-e GH_EMAIL=$GH_EMAIL \
-e GH_TOKEN=$API_TOKEN \
-e GITHUB_USER=$GH_USER \
-e GITHUB_EMAIL=$GH_EMAIL \
-e GITHUB_TOKEN=$API_TOKEN \
-e VERSION=$TRAVIS_TAG \
-e TARGET_REPO="https://github.com/operator-framework/community-operators/" \
-e COMMUNITY_REPO_PATH="/go/src/github.com/operator-framework/community-operators/" \
Expand Down

0 comments on commit 947e58c

Please sign in to comment.