-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to PAT generated GH token #773
Switch to PAT generated GH token #773
Conversation
GITHUB_USERNAME_SECRET="elasticmachine" | ||
export GITHUB_USERNAME_SECRET=$GITHUB_USERNAME_SECRET | ||
export GITHUB_EMAIL_SECRET="elasticmachine@elastic.co" | ||
export GITHUB_TOKEN=$VAULT_GITHUB_TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If ephemeral tokens are used, maybe it's not needed those environment variables.
Are those ephemeral tokens already available for git
commands ?
If they are, we could try to remove the usage of these env. vars in these functions and test it:
package-spec/.buildkite/scripts/test-with-integrations.sh
Lines 56 to 67 in 7aa4539
set_git_config() { | |
git config user.name "${GITHUB_USERNAME_SECRET}" | |
git config user.email "${GITHUB_EMAIL_SECRET}" | |
} | |
git_push_with_auth() { | |
local owner="$1" | |
local repository="$2" | |
local branch="$3" | |
retry 3 git push https://${GITHUB_USERNAME_SECRET}:${GITHUB_TOKEN}@github.com/${owner}/${repository}.git "${branch}" | |
} |
Maybe, it would not be needed to run those git config
commands.
The same would happen for the elastic-package: elastic/elastic-package#1942
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to remove this git config lines and test it, but it is not work and ask to set this parameters.
So I will leave it like it is for now.
test integrations |
Created or updated PR in integrations repository to test this version. Check elastic/integrations#10559 |
test integrations |
test integrations |
Created or updated PR in integrations repository to test this version. Check elastic/integrations#10559 |
Changes was tested. https://buildkite.com/elastic/package-spec-test-with-integrations/builds/43#0190df57-e9b7-4bc6-ae17-8a7cc3aac072 |
💚 Build Succeeded
History
cc @ev1yehor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ev1yehor!
What does this PR do?
Switch to PAT generated GH token
Why is it important?
Checklist
test/packages
that prove my change is effective.spec/changelog.yml
.Related issues