Skip to content

Commit

Permalink
Use a crendential helper to inject user/pass
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Nov 18, 2024
1 parent 65a5967 commit b8b2270
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jenkins-scripts/dsl/test.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ test_credentials_token_job.with
cd homebrew-simulation
git config user.name 'osrfbuild' --replace-all
git config user.email '[email protected]' --replace-all
set +x
git config url."https://osrfbuild:\${GITHUB_TOKEN}@github.com/osrfbuild/homebrew-simulation.git".InsteadOf https://github.com/osrfbuild/homebrew-simulation.git
set -x
# Use a credential helper https://git-scm.com/docs/gitfaq#http-credentials-environment
git config credential.helper '!f() { echo username=\${OSRFBUILD_USER}; echo "password=\${OSRFBUILD_TOKEN}"; };f'
git checkout -b _test_job_osrfbuild_
git commit --allow-empty -m "testing commit"
# protect token from errors
Expand Down

0 comments on commit b8b2270

Please sign in to comment.