Skip to content
This repository has been archived by the owner on May 29, 2023. It is now read-only.

Commit

Permalink
comment pull request for now
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Jun 27, 2022
1 parent ec74293 commit 0f015ec
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ pipeline {
}


stage('Pull Request') {
when {
not {
environment name: 'CHANGE_ID', value: ''
}
environment name: 'CHANGE_TARGET', value: 'master'
}
steps {
node(label: 'docker') {
script {
if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
error "Pipeline aborted due to PR not made from develop or hotfix branch"
}
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_TARGET="$CHANGE_TARGET" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}
}
// stage('Pull Request') {
// when {
// not {
// environment name: 'CHANGE_ID', value: ''
// }
// environment name: 'CHANGE_TARGET', value: 'master'
// }
// steps {
// node(label: 'docker') {
// script {
// if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
// error "Pipeline aborted due to PR not made from develop or hotfix branch"
// }
// withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
// sh '''docker pull eeacms/gitflow'''
// sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_TARGET="$CHANGE_TARGET" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e LANGUAGE=javascript eeacms/gitflow'''
// }
// }
// }
// }
// }


stage('Release') {
Expand Down

0 comments on commit 0f015ec

Please sign in to comment.