Skip to content

Commit 01ed446

Browse files
committed
jenkins: add deleted git-clean-tmp-repo job
This job no longer works because Jenkins requires a token. Replaced by: nodejs#1515
1 parent 765d908 commit 01ed446

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

jenkins/xml/git-clean-tmp-repo.xml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version='1.1' encoding='UTF-8'?>
2+
<project>
3+
<actions/>
4+
<description></description>
5+
<keepDependencies>false</keepDependencies>
6+
<properties>
7+
<hudson.security.AuthorizationMatrixProperty>
8+
<inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"/>
9+
<permission>hudson.model.Item.Build:nodejs*build</permission>
10+
<permission>hudson.model.Item.Cancel:nodejs*build</permission>
11+
<permission>hudson.model.Item.Configure:nodejs*build</permission>
12+
<permission>hudson.model.Item.Discover:nodejs*build</permission>
13+
<permission>hudson.model.Item.Read:nodejs*build</permission>
14+
<permission>hudson.model.Item.Workspace:nodejs*build</permission>
15+
<permission>hudson.model.Run.Replay:nodejs*build</permission>
16+
<permission>hudson.model.Run.Update:nodejs*build</permission>
17+
</hudson.security.AuthorizationMatrixProperty>
18+
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
19+
<projectUrl>https://github.com/nodejs/node/</projectUrl>
20+
<displayName></displayName>
21+
</com.coravy.hudson.plugins.github.GithubProjectProperty>
22+
<com.sonyericsson.rebuild.RebuildSettings plugin="[email protected]">
23+
<autoRebuild>false</autoRebuild>
24+
<rebuildDisabled>false</rebuildDisabled>
25+
</com.sonyericsson.rebuild.RebuildSettings>
26+
<hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]">
27+
<maxConcurrentPerNode>0</maxConcurrentPerNode>
28+
<maxConcurrentTotal>0</maxConcurrentTotal>
29+
<categories class="java.util.concurrent.CopyOnWriteArrayList"/>
30+
<throttleEnabled>false</throttleEnabled>
31+
<throttleOption>project</throttleOption>
32+
<limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams>
33+
<paramsToUseForLimit></paramsToUseForLimit>
34+
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
35+
</properties>
36+
<scm class="hudson.scm.NullSCM"/>
37+
<assignedNode>jenkins-workspace</assignedNode>
38+
<canRoam>false</canRoam>
39+
<disabled>false</disabled>
40+
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
41+
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
42+
<triggers/>
43+
<concurrentBuild>true</concurrentBuild>
44+
<builders>
45+
<hudson.tasks.Shell>
46+
<command>#!/bin/bash -ex
47+
48+
git init
49+
50+
grep -q ^$TEMP_REPO_SERVER ~/.ssh/known_hosts || (ssh-keyscan -t rsa $TEMP_REPO_SERVER &gt;&gt; ~/.ssh/known_hosts)
51+
52+
BRANCHES=$(git ls-remote -h $TEMP_REPO | sed &apos;s|^.*refs/heads/||&apos;)
53+
54+
# First get top-level branches that correspond to a Jenkins run
55+
JENKINS_BRANCHES=$(echo $BRANCHES | sed &apos;s/ /\n/g&apos; | grep ^jenkins- | grep -v -- -bin)
56+
for i in $JENKINS_BRANCHES; do
57+
if [[ $i =~ ^jenkins-[a-z-]*-[0-9]*$ ]] ; then
58+
JOB=$(echo $i | sed &apos;s/^jenkins-//;s/-[0-9]*$//&apos;)
59+
RUN=$(echo $i | sed &apos;s/^[a-z-]*-//&apos;)
60+
# Delete only if the job was already prunned in Jenkins
61+
if (curl -L &quot;https://ci.nodejs.org/job/${JOB}/${RUN}/api/json&quot; | head -n4 | grep -q -- &apos;^&lt;title&gt;Error 404 Not Found&lt;/title&gt;$&apos;) ; then
62+
# Get all branches related to the run, including binaries
63+
DEL_BRANCHES=$(echo $BRANCHES | sed &apos;s/ /\n/g&apos; | grep ^$i)
64+
for j in $DEL_BRANCHES; do
65+
git push $TEMP_REPO :$j
66+
done
67+
fi
68+
fi
69+
done
70+
</command>
71+
</hudson.tasks.Shell>
72+
</builders>
73+
<publishers/>
74+
<buildWrappers>
75+
<hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="[email protected]">
76+
<colorMapName>xterm</colorMapName>
77+
</hudson.plugins.ansicolor.AnsiColorBuildWrapper>
78+
<com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="[email protected]">
79+
<credentialIds>
80+
<string>dea9092d-214b-471a-be5d-5343dd7755c1</string>
81+
</credentialIds>
82+
<ignoreMissing>false</ignoreMissing>
83+
</com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
84+
</buildWrappers>
85+
</project>

0 commit comments

Comments
 (0)