Skip to content

Commit

Permalink
jobs update
Browse files Browse the repository at this point in the history
  • Loading branch information
lerndevopss committed Oct 15, 2019
1 parent d323830 commit 2b1c23f
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 651 deletions.
490 changes: 0 additions & 490 deletions deploy/ansible.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/deploy-prod.yml

This file was deleted.

4 changes: 0 additions & 4 deletions deploy/deploy-qa.yml

This file was deleted.

12 changes: 0 additions & 12 deletions deploy/deploy.yml

This file was deleted.

40 changes: 0 additions & 40 deletions deploy/installDocker.sh

This file was deleted.

18 changes: 0 additions & 18 deletions deploy/inv

This file was deleted.

20 changes: 4 additions & 16 deletions jenkins/jobs/deploy-QA/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,11 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>cd /home/deploy
ansible-playbook -i inv deploy.yml -e &quot;build=$package_build_number&quot;
#docker run -d -P lerndevops/addressbook:$package_build_number</command>
<command>cd $WORKSPACE/deploy
ansible-playbook -i /tmp/inv deploy.yml -e &quot;env=qa build=$package_build_number&quot;
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.parameterizedtrigger.BuildTrigger plugin="[email protected]">
<configs>
<hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
<configs class="empty-list"/>
<projects></projects>
<condition>SUCCESS</condition>
<triggerWithNoParameters>false</triggerWithNoParameters>
<triggerFromChildProjects>false</triggerFromChildProjects>
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
</configs>
</hudson.plugins.parameterizedtrigger.BuildTrigger>
</publishers>
<publishers/>
<buildWrappers/>
</project>
10 changes: 5 additions & 5 deletions jenkins/jobs/job1-Compile/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.12.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/DevOpsClassCodes.git</url>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -28,8 +28,8 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Maven>
<targets>compile</targets>
<mavenName>maven3.6</mavenName>
<targets>clean compile</targets>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
Expand All @@ -48,4 +48,4 @@
</hudson.tasks.BuildTrigger>
</publishers>
<buildWrappers/>
</project>
</project>
6 changes: 3 additions & 3 deletions jenkins/jobs/job2-codereview/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.12.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/DevOpsClassCodes.git</url>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -29,7 +29,7 @@
<builders>
<hudson.tasks.Maven>
<targets>-P metrics pmd:pmd</targets>
<mavenName>maven3.6</mavenName>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
Expand Down
8 changes: 4 additions & 4 deletions jenkins/jobs/job3-unitest/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.12.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/DevOpsClassCodes.git</url>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -29,7 +29,7 @@
<builders>
<hudson.tasks.Maven>
<targets>test</targets>
<mavenName>maven3.6</mavenName>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
Expand All @@ -46,7 +46,7 @@
<completeBuild>true</completeBuild>
</threshold>
</hudson.tasks.BuildTrigger>
<hudson.tasks.junit.JUnitResultArchiver plugin="junit@1.26.1">
<hudson.tasks.junit.JUnitResultArchiver plugin="junit@1.28">
<testResults>target/surefire-reports/*.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<healthScaleFactor>1.0</healthScaleFactor>
Expand Down
8 changes: 4 additions & 4 deletions jenkins/jobs/job4-metrics/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.12.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/DevOpsClassCodes.git</url>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -29,7 +29,7 @@
<builders>
<hudson.tasks.Maven>
<targets>cobertura:cobertura -Dcobertura.report.format=xml</targets>
<mavenName>maven3.6</mavenName>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
Expand All @@ -46,7 +46,7 @@
<completeBuild>true</completeBuild>
</threshold>
</hudson.tasks.BuildTrigger>
<hudson.plugins.cobertura.CoberturaPublisher plugin="cobertura@1.13">
<hudson.plugins.cobertura.CoberturaPublisher plugin="cobertura@1.14">
<coberturaReportFile>target/site/cobertura/coverage.xml</coberturaReportFile>
<onlyStable>false</onlyStable>
<failUnhealthy>false</failUnhealthy>
Expand Down
14 changes: 7 additions & 7 deletions jenkins/jobs/job5-package/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.9.1">
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.12.1">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/DevOpsClassCodes.git</url>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand All @@ -28,8 +28,8 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Maven>
<targets>package</targets>
<mavenName>maven3.6</mavenName>
<targets>clean package</targets>
<mavenName>(Default)</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
Expand All @@ -38,8 +38,8 @@
<hudson.tasks.Shell>
<command>cd $WORKSPACE
docker login -u lerndevops -p $DOCKER_HUB_PWD
docker build -f Dockerfile -t lerndevops/addressbook:$BUILD_NUMBER .
docker push lerndevops/addressbook:$BUILD_NUMBER</command>
docker build -f Dockerfile -t lerndevops/samplejavaapp:$BUILD_NUMBER .
docker push lerndevops/samplejavaapp:$BUILD_NUMBER</command>
</hudson.tasks.Shell>
</builders>
<publishers>
Expand All @@ -61,7 +61,7 @@ docker push lerndevops/addressbook:$BUILD_NUMBER</command>
</hudson.plugins.parameterizedtrigger.BuildTrigger>
</publishers>
<buildWrappers>
<org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper plugin="credentials-binding@1.17">
<org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper plugin="credentials-binding@1.20">
<bindings>
<org.jenkinsci.plugins.credentialsbinding.impl.StringBinding>
<credentialsId>DOCKER_HUB_PWD</credentialsId>
Expand Down
21 changes: 18 additions & 3 deletions jenkins/jobs/job6-deploy.qa/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
Expand All @@ -24,8 +39,8 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>cd /home/deploy
ansible-playbook -i inv deploy.yml -e &quot;env=qa build=$package_build_number&quot;</command>
<command>cd $WORKSPACE/deploy
ansible-playbook -i /tmp/inv deploy.yml -e &quot;env=qa build=$package_build_number&quot;</command>
</hudson.tasks.Shell>
</builders>
<publishers>
Expand Down
26 changes: 0 additions & 26 deletions jenkins/jobs/job6-deploy/config.xml

This file was deleted.

21 changes: 18 additions & 3 deletions jenkins/jobs/job7-deploy.prod/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/lerndevops/samplejavaapp</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
Expand All @@ -24,8 +39,8 @@
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>cd /home/deploy
ansible-playbook -i inv deploy.yml -e &quot;env=prod build=$pbn&quot;</command>
<command>cd $WORKSPACE/deploy
ansible-playbook -i /tmp/inv deploy.yml -e &quot;env=prod build=$pbn&quot;</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
Expand Down
Loading

0 comments on commit 2b1c23f

Please sign in to comment.