|
| 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 >> ~/.ssh/known_hosts) |
| 51 | + |
| 52 | +BRANCHES=$(git ls-remote -h $TEMP_REPO | sed 's|^.*refs/heads/||') |
| 53 | + |
| 54 | +# First get top-level branches that correspond to a Jenkins run |
| 55 | +JENKINS_BRANCHES=$(echo $BRANCHES | sed 's/ /\n/g' | 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 's/^jenkins-//;s/-[0-9]*$//') |
| 59 | + RUN=$(echo $i | sed 's/^[a-z-]*-//') |
| 60 | + # Delete only if the job was already prunned in Jenkins |
| 61 | + if (curl -L "https://ci.nodejs.org/job/${JOB}/${RUN}/api/json" | head -n4 | grep -q -- '^<title>Error 404 Not Found</title>$') ; then |
| 62 | + # Get all branches related to the run, including binaries |
| 63 | + DEL_BRANCHES=$(echo $BRANCHES | sed 's/ /\n/g' | 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