Skip to content

Commit

Permalink
Merge pull request #47 from arangodb/fixed-tag-for-jenkins
Browse files Browse the repository at this point in the history
Use single image tag to prevent polluting the docker hub
  • Loading branch information
ewoutp authored Mar 13, 2018
2 parents d7b3196 + e09dceb commit 7314042
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Jenkinsfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,16 @@ def kubeConfigRoot = "/home/jenkins/.kube"
def buildTestSteps(String kubeConfigRoot, String kubeconfig) {
return {
timestamps {
lock("${kubeconfig}-${params.TESTNAMESPACE}-${env.GIT_COMMIT}") {
withCredentials([string(credentialsId: 'ENTERPRISEIMAGE', variable: 'DEFAULTENTERPRISEIMAGE')]) {
withEnv([
"DEPLOYMENTNAMESPACE=${params.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${params.DOCKERNAMESPACE}",
"ENTERPRISEIMAGE=${params.ENTERPRISEIMAGE}",
"IMAGETAG=${env.GIT_COMMIT}",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
"LONG=${params.LONG ? 1 : 0}",
]) {
sh "make run-tests"
}
withCredentials([string(credentialsId: 'ENTERPRISEIMAGE', variable: 'DEFAULTENTERPRISEIMAGE')]) {
withEnv([
"DEPLOYMENTNAMESPACE=${params.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${params.DOCKERNAMESPACE}",
"ENTERPRISEIMAGE=${params.ENTERPRISEIMAGE}",
"IMAGETAG=jenkins-test",
"KUBECONFIG=${kubeConfigRoot}/${kubeconfig}",
"LONG=${params.LONG ? 1 : 0}",
]) {
sh "make run-tests"
}
}
}
Expand All @@ -59,6 +57,7 @@ def buildCleanupSteps(String kubeConfigRoot, String kubeconfig) {
pipeline {
options {
buildDiscarder(logRotator(daysToKeepStr: '7', numToKeepStr: '10'))
lock resource: 'k8s-operator'
}
agent any
parameters {
Expand All @@ -75,7 +74,7 @@ pipeline {
withEnv([
"DEPLOYMENTNAMESPACE=${params.TESTNAMESPACE}-${env.GIT_COMMIT}",
"DOCKERNAMESPACE=${params.DOCKERNAMESPACE}",
"IMAGETAG=${env.GIT_COMMIT}",
"IMAGETAG=jenkins-test",
"LONG=${params.LONG ? 1 : 0}",
]) {
sh "make"
Expand Down

0 comments on commit 7314042

Please sign in to comment.