mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
uploading Dockerfile and config XML
This commit is contained in:
parent
4e1f87407d
commit
a54544c148
2 changed files with 54 additions and 0 deletions
2
jenkins-test/Dockerfile
Normal file
2
jenkins-test/Dockerfile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
FROM jenkins/jenkins:lts
|
||||||
|
RUN sudo java -jar /home/ubuntu/jenkins-cli.jar -s http://localhost:8080 create-job job1</var/jenkins/jobs/job1/config.xml
|
52
jenkins-test/config.xml
Normal file
52
jenkins-test/config.xml
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version='1.1' encoding='UTF-8'?>
|
||||||
|
<flow-definition plugin="workflow-job@2.36">
|
||||||
|
<actions>
|
||||||
|
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction plugin="pipeline-model-definition@1.5.0"/>
|
||||||
|
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="pipeline-model-definition@1.5.0">
|
||||||
|
<jobProperties/>
|
||||||
|
<triggers/>
|
||||||
|
<parameters/>
|
||||||
|
<options/>
|
||||||
|
</org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
|
||||||
|
</actions>
|
||||||
|
<description></description>
|
||||||
|
<keepDependencies>false</keepDependencies>
|
||||||
|
<properties/>
|
||||||
|
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.78">
|
||||||
|
<script>pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
tools {
|
||||||
|
// Install the Maven version configured as "M3" and add it to the path.
|
||||||
|
maven "MAVEN3"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
// Get some code from a GitHub repository
|
||||||
|
git 'https://github.com/djgio02/spring-petclinic.git'
|
||||||
|
|
||||||
|
// Run Maven on a Unix agent.
|
||||||
|
sh "mvn -Dmaven.test.failure.ignore=true clean package"
|
||||||
|
|
||||||
|
// To run Maven on a Windows agent, use
|
||||||
|
// bat "mvn -Dmaven.test.failure.ignore=true clean package"
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
// If Maven was able to run the tests, even if some of the test
|
||||||
|
// failed, record the test results and archive the jar file.
|
||||||
|
success {
|
||||||
|
junit '**/target/surefire-reports/TEST-*.xml'
|
||||||
|
archiveArtifacts 'target/*.jar'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<sandbox>true</sandbox>
|
||||||
|
</definition>
|
||||||
|
<triggers/>
|
||||||
|
<disabled>false</disabled>
|
||||||
|
</flow-definition>
|
Loading…
Reference in a new issue