Skip to content

Commit

Permalink
Merge pull request #127 from linkernetworks/johnlin/disable-jenkin-tr…
Browse files Browse the repository at this point in the history
…avic-build

disable docker build from jenkins and travis
  • Loading branch information
Hung-Wei Chiu authored Jul 19, 2018
2 parents 3c8346b + 228d27c commit bc43ff9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ script:
# # Start to test and produce the coverage report
- sudo -E PATH=$PATH TEST_GRPC=1 TEST_PROMETHEUS=1 make src.test-coverage-minikube
# # Build the docker image if need it
- if [ "$TRAVIS_BRANCH" == "develop" ]; then docker build --tag sdnvortex/vortex --file ./dockerfiles/Dockerfile . ; fi
# - if [ "$TRAVIS_BRANCH" == "develop" ]; then docker build --tag sdnvortex/vortex --file ./dockerfiles/Dockerfile . ; fi

before_deploy:
- echo $DOCKER_HUB_PASSWORD | docker login -u $DOCKER_HUB_USER --password-stdin
# before_deploy:
# - echo $DOCKER_HUB_PASSWORD | docker login -u $DOCKER_HUB_USER --password-stdin

deploy:
provider: script
script: docker tag sdnvortex/vortex sdnvortex/vortex:develop && docker push sdnvortex/vortex:develop
on:
branch: develop
# deploy:
# provider: script
# script: docker tag sdnvortex/vortex sdnvortex/vortex:develop && docker push sdnvortex/vortex:develop
# on:
# branch: develop

after_success:
- cp build/src/coverage.txt coverage.txt
Expand Down
62 changes: 31 additions & 31 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,36 +91,36 @@
}
}
}
stage("Build Image"){
when {
branch 'develop'
}
steps {
script {
dir ("src/github.com/linkernetworks/vortex") {
docker.build("sdnvortex/vortex" , "--file ./dockerfiles/Dockerfile .")
}
}
}
}
stage("Push Image"){
when {
branch 'develop'
}
steps {
script {
withCredentials([
usernamePassword(
credentialsId: 'eb1d8dd2-afd2-49d3-bbef-605de4f664d2',
usernameVariable: 'DOCKER_USER',
passwordVariable: 'DOCKER_PASS'
)
]) {
sh 'echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin'
}
docker.image("sdnvortex/vortex").push("develop")
}
}
}
// stage("Build Image"){
// when {
// branch 'develop'
// }
// steps {
// script {
// dir ("src/github.com/linkernetworks/vortex") {
// docker.build("sdnvortex/vortex" , "--file ./dockerfiles/Dockerfile .")
// }
// }
// }
// }
// stage("Push Image"){
// when {
// branch 'develop'
// }
// steps {
// script {
// withCredentials([
// usernamePassword(
// credentialsId: 'eb1d8dd2-afd2-49d3-bbef-605de4f664d2',
// usernameVariable: 'DOCKER_USER',
// passwordVariable: 'DOCKER_PASS'
// )
// ]) {
// sh 'echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin'
// }
// docker.image("sdnvortex/vortex").push("develop")
// }
// }
// }
}
}

0 comments on commit bc43ff9

Please sign in to comment.