Skip to content

Commit

Permalink
Remove captain dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Jotschi committed Nov 11, 2017
1 parent 713cb60 commit 846cc52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .jenkins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ RUN chown jenkins: /home/jenkins/.gitconfig

RUN chown jenkins: /opt -R

# Setup docker captain
RUN curl -L https://github.com/harbur/captain/releases/download/v1.1.2/captain_linux_amd64 > /usr/local/bin/captain
RUN chmod +x /usr/local/bin/captain

# Fix docker socket permission issue
RUN groupadd -g 117 docker && usermod -aG docker jenkins

Expand Down
11 changes: 9 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,13 @@ node("docker") {

stage("Docker Build") {
if (Boolean.valueOf(params.runDocker)) {
// demo
sh "rm demo/target/*sources.jar"
sh "cd demo ; docker build -t gentics/mesh-demo:latest -t gentics/mesh-demo:" + version + " . "

// server
sh "rm server/target/*sources.jar"
sh "captain build"
sh "cd server ; docker build -t server/mesh:latest -t gentics/mesh:" + version + " . "
} else {
echo "Docker build skipped.."
}
Expand Down Expand Up @@ -189,7 +193,10 @@ node("docker") {
if (Boolean.valueOf(params.runDocker)) {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'dockerhub_login', passwordVariable: 'DOCKER_HUB_PASSWORD', usernameVariable: 'DOCKER_HUB_USERNAME']]) {
sh 'docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD'
sh "captain push"
sh 'docker push gentics/mesh-demo:latest'
sh 'docker push gentics/mesh-demo:' + version
sh 'docker push gentics/mesh:latest'
sh 'docker push gentics/mesh:' + version
}
}
} else {
Expand Down

0 comments on commit 846cc52

Please sign in to comment.