Skip to content

Commit 242a672

Browse files
authored
Merge branch 'master' into jrivero/remove_the_longest_token_ever
2 parents 0c0577b + fadf0d4 commit 242a672

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

jenkins-scripts/dsl/brew_release.dsl

+9-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ release_job.with
6262
label Globals.nontest_label("master")
6363

6464
wrappers {
65-
preBuildCleanup()
65+
preBuildCleanup()
66+
credentialsBinding {
67+
// crendetial name needs to be in sync with provision code at infra/osrf-chef repo
68+
string('GITHUB_TOKEN', 'osrfbuild-token')
69+
}
6670
}
6771

6872
parameters
@@ -250,6 +254,10 @@ bottle_job_hash_updater.with
250254
wrappers
251255
{
252256
preBuildCleanup()
257+
credentialsBinding {
258+
// crendetial name needs to be in sync with provision code at infra/osrf-chef repo
259+
string('GITHUB_TOKEN', 'osrfbuild-token')
260+
}
253261
}
254262

255263
parameters

jenkins-scripts/lib/_homebrew_github_commit.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ${GIT} push -u pr_head ${PULL_REQUEST_BRANCH}
6666

6767
# Create a pull request if one doesn't yet exist
6868
if [ -z "${PULL_REQUEST_URL}" ]; then
69-
# Check for hub command
69+
# Check for hub command. It requires a GITHUB_TOKEN to work
7070
HUB=hub
7171
if ! which ${HUB} ; then
7272
if [ ! -s hub-linux-amd64-2.2.3.tgz ]; then

jenkins-scripts/lib/_homebrew_github_setup.bash

-12
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,6 @@ if [[ -z $(ssh -T git@github.com 2>&1 | grep successfully) ]]; then
2828
fi
2929
fi
3030

31-
GITHUB_TOKEN_FILE="/var/lib/jenkins/.github_token"
32-
if [[ ! -f ${GITHUB_TOKEN_FILE} ]]; then
33-
echo "The hub cli tool needs a valid token at file ${GITHUB_TOKEN_FILE}"
34-
echo "The file was not found"
35-
exit 1
36-
fi
37-
38-
set +x # keep password secret
39-
export GITHUB_TOKEN=`cat $GITHUB_TOKEN_FILE`
40-
set -x # back to debug
41-
echo '# END SECTION'
42-
4331
echo '# BEGIN SECTION: download linuxbrew'
4432
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
4533
echo '# END SECTION'

0 commit comments

Comments
 (0)