Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable docker build from jenkins and travis #127

Merged
merged 1 commit into from
Jul 19, 2018
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
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")
// }
// }
// }
}
}