-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathjenkins.demo-docker.config.xml.sh
executable file
·73 lines (71 loc) · 2.59 KB
/
jenkins.demo-docker.config.xml.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
BUILD_NUMBER='$BUILD_NUMBER'
SNAPSHOT_BUILD_NUMBER='$SNAPSHOT_BUILD_NUMBER'
GERRIT_NAME=${GERRIT_NAME:-gerrit}
JENKINS_WEBURL=${JENKINS_WEBURL:-http://jenkins:8080/jenkins}
cat <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>SNAPSHOT_BUILD_NUMBER</name>
<description></description>
<defaultValue></defaultValue>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<url>ssh://jenkins@${GERRIT_NAME}:29418/demo-docker</url>
<credentialsId>jenkins-master</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>refs/heads/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<assignedNode>master</assignedNode>
<canRoam>false</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<com.cloudbees.dockerpublish.DockerBuilder plugin="[email protected]">
<server plugin="[email protected]">
<uri>tcp://172.17.0.1:2375</uri>
</server>
<registry plugin="[email protected]"/>
<repoName>openfrontier/demo</repoName>
<noCache>true</noCache>
<forcePull>false</forcePull>
<buildContext>dockerProject</buildContext>
<skipBuild>false</skipBuild>
<skipDecorate>true</skipDecorate>
<repoTag>${BUILD_NUMBER}</repoTag>
<skipPush>true</skipPush>
<createFingerprint>true</createFingerprint>
<skipTagLatest>true</skipTagLatest>
<buildAdditionalArgs>--build-arg jenkins_url=${JENKINS_WEBURL} --build-arg build_number=${SNAPSHOT_BUILD_NUMBER}</buildAdditionalArgs>
<forceTag>true</forceTag>
</com.cloudbees.dockerpublish.DockerBuilder>
</builders>
<publishers/>
<buildWrappers/>
</project>
EOF