Skip to content

Commit

Permalink
#10 docker build steps plugin
Browse files Browse the repository at this point in the history
- added dependencies for installing docker build steps plugin into jenkins image.
- this plugin enables executing docker commands as build steps in jenkins jobs.
- configured the plugin.

NOTE: plugin is building image but tagging steps not working - WIP
  • Loading branch information
savishy committed Aug 4, 2016
1 parent ae77405 commit 491e9de
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
16 changes: 14 additions & 2 deletions dockerfiles/jenkins-ci/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/spring-projects/spring-petclinic</url>
<url>https://github.com/savishy/spring-petclinic</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -18,7 +18,7 @@
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<browser class="hudson.plugins.git.browser.GithubWeb">
<url>https://github.com/spring-projects/spring-petclinic/</url>
<url>https://github.com/savishy/spring-petclinic/</url>
</browser>
<submoduleCfg class="list"/>
<extensions/>
Expand All @@ -39,6 +39,18 @@
<command>export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
./mvnw install</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo &quot;--copy petclinic WAR to docker workspace&quot;
cp -v target/petclinic.war docker/</command>
</hudson.tasks.Shell>
<org.jenkinsci.plugins.dockerbuildstep.DockerBuilder plugin="docker-build-step@1.35">
<dockerCmd class="org.jenkinsci.plugins.dockerbuildstep.cmd.CreateImageCommand">
<dockerFolder>$WORKSPACE/docker</dockerFolder>
<imageTag>$BUILD_NUMBER</imageTag>
<noCache>false</noCache>
<rm>true</rm>
</dockerCmd>
</org.jenkinsci.plugins.dockerbuildstep.DockerBuilder>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
Expand Down
9 changes: 8 additions & 1 deletion dockerfiles/jenkins-ci/plugins.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# deps for credentials
icon-shim:2.0.2
credentials:1.21
credentials:1.22
workflow-step-api:1.14.2
maven-plugin:2.7.1
mailer:1.16
Expand All @@ -21,3 +21,10 @@ git:2.5.3

# deploy to tomcat
deploy:1.10

# dependencies for docker build step
authentication-tokens:1.1
docker-commons:1.2

# docker
docker-build-step:1.35

0 comments on commit 491e9de

Please sign in to comment.