Skip to content
This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Commit e0150b1

Browse files
committed
[OREP-191][SS-RM] Fixing github release token in Jenkinsfile.
1 parent f5762e3 commit e0150b1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Jenkinsfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project_name = 'terraform-provider-nsx'
44
project_owner = 'sky-uk'
55

66
project_src_path = "github.com/${project_owner}/${project_name}"
7-
git_credentials_id = '51e7ba41-d78c-4e30-802d-9b424fa0ab63'
8-
git_helper_credentials_id = 'paas-jenkins-pipelines-deploy-key'
7+
github_token_id = 'svc-paas-github-access-token-as-text'
8+
git_credentials_id = 'svc-paas-github-deploy-key'
99

1010
version_file = 'VERSION'
1111
major_version = null
@@ -32,7 +32,7 @@ slackHelper.notificationWrapper(slackChannel, currentBuild, env, true) {
3232
deleteDir()
3333
git_branch = env.BRANCH_NAME
3434
checkout scm
35-
gitHelper.prepareGit('paas-jenkins', 'paas-jenkins@jenkins.paas.int.ovp.bskyb.com')
35+
gitHelper.prepareGit('svc-paas-github', 'svc-paas-github@jenkins.paas.int.ovp.bskyb.com')
3636

3737
stage 'version'
3838
if (autoincVersion()) {
@@ -75,7 +75,7 @@ slackHelper.notificationWrapper(slackChannel, currentBuild, env, true) {
7575
}
7676
}
7777
// we only release from master
78-
if (git_branch == 'master' && !gitHelper.isLastCommitFromUser('paas-jenkins')) {
78+
if (git_branch == 'master' && !gitHelper.isLastCommitFromUser('svc-paas-github')) {
7979
stage 'release'
8080
def approved = true
8181
timeout(time: 2, unit: 'HOURS') {
@@ -95,8 +95,9 @@ slackHelper.notificationWrapper(slackChannel, currentBuild, env, true) {
9595

9696
echo "Creating GitHub Release v${version()}"
9797

98-
withCredentials([string(credentialsId: 'c7203be2-2bd2-407a-9876-86be3496e5e8', variable: 'GITHUB_TOKEN')]) {
99-
def github_release_response = gitHelper.createGitHubRelease(GITHUB_TOKEN, project_owner, project_name, version(), git_branch)
98+
withCredentials([string(credentialsId: github_token_id, variable: 'GITHUB_TOKEN')]) {
99+
def github_release_response = gitHelper.createGitHubRelease(env.GITHUB_TOKEN, project_owner, project_name, version(), git_branch)
100+
echo "${github_release_response}"
100101
// FIXME: this is not working yet
101102
// echo "Attaching artifacts to GitHub Release v${version()}"
102103
// gitHelper.uploadToGitHubRelease(project_github_token, project_owner, project_name, github_release_response.id, "${pwd()}/coverage.html", 'application/html')
@@ -109,7 +110,7 @@ slackHelper.notificationWrapper(slackChannel, currentBuild, env, true) {
109110
}
110111

111112
def loadHelpers() {
112-
fileLoader.withGit('[email protected]:sky-uk/paas-jenkins-pipelines.git', 'master', git_helper_credentials_id, '') {
113+
fileLoader.withGit('[email protected]:sky-uk/paas-jenkins-pipelines.git', 'master', git_credentials_id, '') {
113114
this.gitHelper = fileLoader.load('lib/helpers/git')
114115
this.shellHelper = fileLoader.load('lib/helpers/shell')
115116
this.goHelper = fileLoader.load('lib/helpers/go')

0 commit comments

Comments
 (0)