Skip to content
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
6 changes: 0 additions & 6 deletions JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,6 @@ pipeline {
}
}
stage('Create preparation Pull-Requests') {
environment {
GITHUB_BOT_TOKEN = credentials('github-bot-token')
}
steps {
script {
def prHeadline = "Prepare ${NEXT_RELEASE_VERSION} development"
Expand Down Expand Up @@ -410,9 +407,6 @@ pipeline {
}
}
stage('Create Github milestones') {
environment {
GITHUB_BOT_TOKEN = credentials('github-bot-token')
}
steps {
script {
def organisations = [ 'eclipse-platform', 'eclipse-jdt', 'eclipse-pde', 'eclipse-equinox' ]
Expand Down
8 changes: 2 additions & 6 deletions JenkinsJobs/Releng/promoteBuild.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ pipeline {
git push --force ${pushURL} "updateMaintenance:refs/heads/update-${MAINTENANCE_BRANCH}"
'''
}
// Create PRs agains the master and maintenance branch
script { withEnv(['GITHUB_BOT_TOKEN=' + credentials('github-bot-token')]) {
script { // Create PRs agains the master and maintenance branch
def masterPR = githubAPI.createPullRequest('eclipse-platform/eclipse.platform.releng.aggregator',
"Update previous release version to ${BUILD_MAJOR}.${BUILD_MINOR} GA across build scripts", """\
Update the the `${MAINTENANCE_BRANCH}` branch with final ${BUILD_MAJOR}.${BUILD_MINOR} release version.
Expand All @@ -282,7 +281,7 @@ pipeline {

**This should not be submitted before ${BUILD_MAJOR}.${BUILD_MINOR} is finally released.**
""".stripIndent(),"update-${MAINTENANCE_BRANCH}", "${MAINTENANCE_BRANCH}", /*skipExistingPR*/ true)
}}
}
}
}
}
Expand All @@ -297,9 +296,6 @@ pipeline {
}
}
stage('Update acknowledgements') {
environment {
GITHUB_BOT_TOKEN = credentials('github-bot-token')
}
steps {
script {
githubAPI.triggerWorkflow('eclipse-platform/www.eclipse.org-eclipse', 'generateAcknowledgements.yml', [ 'eclipse-version': "${BUILD_MAJOR}.${BUILD_MINOR}" ])
Expand Down
7 changes: 3 additions & 4 deletions JenkinsJobs/shared/githubAPI.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ def queryGithubAPI(String method, String endpoint, Map<String, Object> queryPara
query += "-d '" + params + "'"
}
if (IS_DRY_RUN && !method.isEmpty()) {
if (!env.GITHUB_BOT_TOKEN) {
error 'Required GITHUB_BOT_TOKEN not set'
}
echo "Query (not send): ${query}"
return null
}
def response = sh(script: query, returnStdout: true)
def response = withCredentials([string(credentialsId: 'github-bot-token', variable: 'GITHUB_BOT_TOKEN')]) {
return sh(script: query, returnStdout: true)
}
if (response == null || response.isEmpty()) {
if (allowEmptyReponse) {
return null
Expand Down
Loading