Skip to content
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

Remove filesystem token for Brew. Use crendential plugin #1213

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion jenkins-scripts/dsl/brew_release.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ release_job.with
label Globals.nontest_label("master")

wrappers {
preBuildCleanup()
preBuildCleanup()
credentialsBinding {
// crendetial name needs to be in sync with provision code at infra/osrf-chef repo
string('GITHUB_TOKEN', 'osrfbuild-token')
}
}

parameters
Expand Down Expand Up @@ -253,6 +257,10 @@ bottle_job_hash_updater.with
wrappers
{
preBuildCleanup()
credentialsBinding {
// crendetial name needs to be in sync with provision code at infra/osrf-chef repo
string('GITHUB_TOKEN', 'osrfbuild-token')
}
}

parameters
Expand Down
2 changes: 1 addition & 1 deletion jenkins-scripts/lib/_homebrew_github_commit.bash
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ${GIT} push -u pr_head ${PULL_REQUEST_BRANCH}

# Create a pull request if one doesn't yet exist
if [ -z "${PULL_REQUEST_URL}" ]; then
# Check for hub command
# Check for hub command. It requires a GITHUB_TOKEN to work
HUB=hub
if ! which ${HUB} ; then
if [ ! -s hub-linux-amd64-2.2.3.tgz ]; then
Expand Down
12 changes: 0 additions & 12 deletions jenkins-scripts/lib/_homebrew_github_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ if [[ -z $(ssh -T git@github.com 2>&1 | grep successfully) ]]; then
fi
fi

GITHUB_TOKEN_FILE="/var/lib/jenkins/.github_token"
if [[ ! -f ${GITHUB_TOKEN_FILE} ]]; then
echo "The hub cli tool needs a valid token at file ${GITHUB_TOKEN_FILE}"
echo "The file was not found"
exit 1
fi

set +x # keep password secret
export GITHUB_TOKEN=`cat $GITHUB_TOKEN_FILE`
set -x # back to debug
echo '# END SECTION'

echo '# BEGIN SECTION: download linuxbrew'
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo '# END SECTION'
Expand Down
Loading