Skip to content

Commit

Permalink
Revert "ci(jenkins): delegate docker setup to the preCommit step" (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Aug 14, 2019
1 parent 1e0f26e commit 8f6b2b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ pipeline {
stage('Sanity checks') {
when {
beforeAgent true
not {
changeRequest()
anyOf {
not { changeRequest() }
expression { return params.Run_As_Master_Branch }
}
}
steps {
withGithubNotify(context: 'Sanity checks', tab: 'tests') {
deleteDir()
unstash 'source'
script {
dir(BASE_DIR){
preCommit(commit: "${GIT_BASE_COMMIT}", junit: true, dockerImage: 'python:3.7-stretch')
docker.image('python:3.7-stretch').inside("-e PATH=${PATH}:${env.WORKSPACE}/bin"){
dir("${BASE_DIR}"){
// registry: '' will help to disable the docker login
preCommit(commit: "${GIT_BASE_COMMIT}", junit: true, registry: '')
}
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion .ci/linting.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ pipeline {
steps {
script {
def sha = getGitCommitSha()
preCommit(commit: "${sha}", junit: true, dockerImage: 'python:3.7-stretch')
docker.image('python:3.7-stretch').inside("-e PATH=${PATH}:${env.WORKSPACE}/bin"){
// registry: '' will help to disable the docker login
preCommit(commit: "${sha}", junit: true, registry: '')
}
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,21 @@ pipeline {
stage('Sanity checks') {
when {
beforeAgent true
not {
changeRequest()
anyOf {
not { changeRequest() }
expression { return params.Run_As_Master_Branch }
}
}
steps {
withGithubNotify(context: 'Sanity checks', tab: 'tests') {
deleteDir()
unstash 'source'
script {
dir(BASE_DIR){
preCommit(commit: "${GIT_BASE_COMMIT}", junit: true, dockerImage: 'python:3.7-stretch')
docker.image('python:3.7-stretch').inside("-e PATH=${PATH}:${env.WORKSPACE}/bin"){
dir("${BASE_DIR}"){
// registry: '' will help to disable the docker login
preCommit(commit: "${GIT_BASE_COMMIT}", junit: true, registry: '')
}
}
}
}
Expand Down

0 comments on commit 8f6b2b8

Please sign in to comment.