uploading Dockerfile and config XML

This commit is contained in:
root 2020-01-09 04:44:33 +00:00
parent 4e1f87407d
commit a54544c148
2 changed files with 54 additions and 0 deletions

2
jenkins-test/Dockerfile Normal file
View 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
View 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 &quot;M3&quot; and add it to the path.
maven &quot;MAVEN3&quot;
}
stages {
stage(&apos;Build&apos;) {
steps {
// Get some code from a GitHub repository
git &apos;https://github.com/djgio02/spring-petclinic.git&apos;
// Run Maven on a Unix agent.
sh &quot;mvn -Dmaven.test.failure.ignore=true clean package&quot;
// To run Maven on a Windows agent, use
// bat &quot;mvn -Dmaven.test.failure.ignore=true clean package&quot;
}
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 &apos;**/target/surefire-reports/TEST-*.xml&apos;
archiveArtifacts &apos;target/*.jar&apos;
}
}
}
}
}</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>