Skip to content

Commit

Permalink
Merge branch 'master' into jrivero/remove_the_longest_token_ever
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero authored Nov 25, 2024
2 parents 0c0577b + fadf0d4 commit 242a672
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
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 @@ -250,6 +254,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 [email protected] 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

0 comments on commit 242a672

Please sign in to comment.