Skip to content

Commit

Permalink
pipeline adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdoherty committed Oct 8, 2021
1 parent 67a6445 commit 7716790
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ steps:
inputs:
secureFile: 'rp-azure-pipeline-github.pem'
- bash: |
# eval $(ruby -e "require 'openssl'; require 'jwt'; private_pem = File.read(ENV['GITHUB_PEM_PATH']); private_key = OpenSSL::PKey::RSA.new(private_pem); payload = { iat: Time.now.to_i - 60, exp: Time.now.to_i + (10 * 60), iss: ENV['GITHUB_APP_ID'] }; jwt = JWT.encode(payload, private_key, 'RS256'); puts 'PUSH_JWT='+jwt;")
# TOKEN=$(curl -s -X POST \
# -H "Authorization: Bearer $PUSH_JWT" \
# -H "Accept: application/vnd.github.v3+json" \
# https://api.github.com/app/installations/$GITHUB_APP_INSTALLATION_ID/access_tokens \
# | jq -r '.token')
# git remote add github https://x-access-token:[email protected]/rocket-pool/$REPO_NAME
# git fetch github
# git push github HEAD:$(Build.SourceBranch) -f --verbose
# git push github HEAD:$(Build.SourceBranch) -f --tags --verbose
eval $(ruby -e "require 'openssl'; require 'jwt'; private_pem = File.read(ENV['GITHUB_PEM_PATH']); private_key = OpenSSL::PKey::RSA.new(private_pem); payload = { iat: Time.now.to_i - 60, exp: Time.now.to_i + (10 * 60), iss: ENV['GITHUB_APP_ID'] }; jwt = JWT.encode(payload, private_key, 'RS256'); puts 'PUSH_JWT='+jwt;")
TOKEN=$(curl -s -X POST \
-H "Authorization: Bearer $PUSH_JWT" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/app/installations/$GITHUB_APP_INSTALLATION_ID/access_tokens \
| jq -r '.token')
git remote add github https://x-access-token:[email protected]/rocket-pool/$REPO_NAME
git fetch github
git push github HEAD:$(Build.SourceBranch) -f --verbose
git push github HEAD:$(Build.SourceBranch) -f --tags --verbose
displayName: 'Push to Github'
env:
GITHUB_PEM_PATH: $(githubPEM.secureFilePath)
Expand Down

0 comments on commit 7716790

Please sign in to comment.