[zorg] r317549 - Point pipelines to git repositories

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 00:15:01 PST 2017


Author: matze
Date: Tue Nov  7 00:15:01 2017
New Revision: 317549

URL: http://llvm.org/viewvc/llvm-project?rev=317549&view=rev
Log:
Point pipelines to git repositories

Turns out the 'readTrusted' command I used in my pipeline definitions
fails for subversion repositories. Point the pipelines to the git mirror
of zorg to avoid this problem.

Note that I cannot use git.llvm.org right now, because the greendragon
DNS configuration hides it; Resolving the IP manually like other
greendragon jobs do doesn't work either because it invalidates the SSL
certificate.

Modified:
    zorg/trunk/zorg/jenkins/jobs/config
    zorg/trunk/zorg/jenkins/jobs/update_jobs.sh
    zorg/trunk/zorg/jenkins/jobs/util/make_pipeline.py

Modified: zorg/trunk/zorg/jenkins/jobs/config
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/config?rev=317549&r1=317548&r2=317549&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/config (original)
+++ zorg/trunk/zorg/jenkins/jobs/config Tue Nov  7 00:15:01 2017
@@ -1,2 +1,3 @@
 URL="http://lab.llvm.org:8080/green/"
-PIPELINE_SVN_URL="http://llvm.org/svn/llvm-project/zorg/trunk"
+#PIPELINE_SVN_URL="http://llvm.org/svn/llvm-project/zorg/trunk"
+PIPELINE_GIT_URL="https://github.com/llvm-mirror/zorg.git"

Modified: zorg/trunk/zorg/jenkins/jobs/update_jobs.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/update_jobs.sh?rev=317549&r1=317548&r2=317549&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/update_jobs.sh (original)
+++ zorg/trunk/zorg/jenkins/jobs/update_jobs.sh Tue Nov  7 00:15:01 2017
@@ -16,7 +16,7 @@ for i in jobs/*; do
     fi
 
     echo "GEN ${DESTFILE}"
-    util/make_pipeline.py "${PIPELINE_SVN_URL}" "${PIPELINE_GIT_PATH}" description.txt > "$DESTFILE"
+    util/make_pipeline.py "${PIPELINE_GIT_URL}" "${PIPELINE_GIT_PATH}" description.txt > "$DESTFILE"
 done
 
 if test "${1-}" = "-d"; then

Modified: zorg/trunk/zorg/jenkins/jobs/util/make_pipeline.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/jobs/util/make_pipeline.py?rev=317549&r1=317548&r2=317549&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/jobs/util/make_pipeline.py (original)
+++ zorg/trunk/zorg/jenkins/jobs/util/make_pipeline.py Tue Nov  7 00:15:01 2017
@@ -3,7 +3,7 @@ import sys
 import re
 from xml.sax.saxutils import escape
 
-pipeline_svn_url = sys.argv[1]
+pipeline_git_url = sys.argv[1]
 pipeline_git_path = sys.argv[2]
 description = open(sys.argv[3]).read()
 
@@ -23,24 +23,21 @@ template = '''\
     {extra_properties}
   </properties>
   <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps at 2.41">
-    <scm class="hudson.scm.SubversionSCM" plugin="subversion at 2.9">
-      <locations>
-        <hudson.scm.SubversionSCM_-ModuleLocation>
-          <remote>{pipeline_svn_url}</remote>
-          <credentialsId></credentialsId>
-          <local>.</local>
-          <depthOption>infinity</depthOption>
-          <ignoreExternalsOption>true</ignoreExternalsOption>
-        </hudson.scm.SubversionSCM_-ModuleLocation>
-      </locations>
-      <excludedRegions></excludedRegions>
-      <includedRegions></includedRegions>
-      <excludedUsers></excludedUsers>
-      <excludedRevprop></excludedRevprop>
-      <excludedCommitMessages></excludedCommitMessages>
-      <workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/>
-      <ignoreDirPropChanges>false</ignoreDirPropChanges>
-      <filterChangelog>false</filterChangelog>
+    <scm class="hudson.plugins.git.GitSCM" plugin="git at 3.6.1">
+      <configVersion>2</configVersion>
+      <userRemoteConfigs>
+        <hudson.plugins.git.UserRemoteConfig>
+          <url>{pipeline_git_url}</url>
+        </hudson.plugins.git.UserRemoteConfig>
+      </userRemoteConfigs>
+      <branches>
+        <hudson.plugins.git.BranchSpec>
+          <name>*/master</name>
+        </hudson.plugins.git.BranchSpec>
+      </branches>
+      <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
+      <submoduleCfg class="list"/>
+      <extensions/>
     </scm>
     <scriptPath>{pipeline_git_path}</scriptPath>
     <lightweight>true</lightweight>
@@ -66,7 +63,7 @@ if 'relay' in pipeline_git_path:
 '''
 
 variables = {
-    "pipeline_svn_url": escape(pipeline_svn_url),
+    "pipeline_git_url": escape(pipeline_git_url),
     "pipeline_git_path": escape(pipeline_git_path),
     "extra_properties": extra_properties,
 }




More information about the llvm-commits mailing list