Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Jenkins 'GitMavenGlassFish_Build' project config, for my blog post, 'Building a Deployment Pipeline Using Git, Maven, Jenkins, JUnit, and GlassFish'. Can be created using restore feature of ThinBackup plugin.
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description>Clean, compile, assemble, test, and deploy application, using Maven, Git, and GlassFish</description>
<logRotator class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>5</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.ChoiceParameterDefinition>
<name>environment</name>
<description>Which GlassFish domain to deploy .war file</description>
<choices class="java.util.Arrays$ArrayList">
<a class="string-array">
<string>development</string>
<string>testing</string>
<string>production</string>
</a>
</choices>
</hudson.model.ChoiceParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<url>C:\Users\gstaffor\Documents\GitServer\glassfish-maven-cd-blogpost.git</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>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Maven>
<targets>clean install -e</targets>
<mavenName>Maven 3.1.1</mavenName>
<pom>HelloGlassFishMaven\pom.xml</pom>
<usePrivateRepository>true</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
</hudson.tasks.Maven>
</builders>
<publishers>
<hudson.tasks.ArtifactArchiver>
<artifacts>**/HelloGlassFishMaven/target/*.war, **/HelloGlassFishMaven/pom.xml, **/HelloGlassFishMaven/passwords/pwdfile_${environment}, **/HelloGlassFishMaven/properties/${environment}.properties</artifacts>
<latestOnly>true</latestOnly>
<allowEmptyArchive>false</allowEmptyArchive>
</hudson.tasks.ArtifactArchiver>
<hudson.tasks.junit.JUnitResultArchiver>
<testResults>**/HelloGlassFishMaven/target/surefire-reports/*.xml</testResults>
<keepLongStdio>false</keepLongStdio>
<testDataPublishers/>
</hudson.tasks.junit.JUnitResultArchiver>
<hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.21">
<configs>
<hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
<configs>
<hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
<properties>environment=${environment}</properties>
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
</configs>
<projects>GitMavanGlassFish_Deploy</projects>
<condition>SUCCESS</condition>
<triggerWithNoParameters>false</triggerWithNoParameters>
</hudson.plugins.parameterizedtrigger.BuildTriggerConfig>
</configs>
</hudson.plugins.parameterizedtrigger.BuildTrigger>
</publishers>
<buildWrappers/>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.