[commit: ghc] wip/jenkins: Move to scripted pipeline (412efb2)

git at git.haskell.org git at git.haskell.org
Thu May 18 00:53:12 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/jenkins
Link       : http://ghc.haskell.org/trac/ghc/changeset/412efb210f1035d9ef53cf3118eab8aee962e0c1/ghc

>---------------------------------------------------------------

commit 412efb210f1035d9ef53cf3118eab8aee962e0c1
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed May 17 20:52:58 2017 -0400

    Move to scripted pipeline


>---------------------------------------------------------------

412efb210f1035d9ef53cf3118eab8aee962e0c1
 Jenkinsfile | 60 +++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 24c2949..b87d1dd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,37 +1,35 @@
-def buildGhc() {
-  steps {
-    sh 'git submodule update --init --recursive'
-    def speed = 'NORMAL'
-    if (params.nightly) {
-      speed = 'SLOW'
-    }
-    writeFile 'mk/build.mk'
-              '''
-              Validating=YES
-              ValidateSpeed=${speed}
-              ValidateHpc=NO
-              BUILD_DPH=NO
-              '''
-    sh '''
-        ./boot
-        ./configure --enable-tarballs-autodownload
-        make THREADS=${params.threads} test
-        '''
-  }
-}
+#!groovy
 
-pipeline {
-  agent any
-  parameters {
-    booleanParam(name: 'build_docs', defaultValue: false, description: 'build and upload documentation')
-    string(name: 'threads', defaultValue: '2', description: 'available parallelism')
-    booleanParam(name: 'nightly', defaultValue: false, description: 'are we building a nightly?')
-  }
+properties(
+  [
+    parameters(
+      booleanParam(name: 'build_docs', defaultValue: false, description: 'build and upload documentation')
+      string(name: 'threads', defaultValue: '2', description: 'available parallelism')
+      booleanParam(name: 'nightly', defaultValue: false, description: 'are we building a nightly?')
+    )
+  ])
 
+def buildGhc() {
   stages {
     stage('Build') {
       steps {
-        buildGhc()
+        sh 'git submodule update --init --recursive'
+        def speed = 'NORMAL'
+        if (params.nightly) {
+          speed = 'SLOW'
+        }
+        writeFile 'mk/build.mk'
+                  '''
+                  Validating=YES
+                  ValidateSpeed=${speed}
+                  ValidateHpc=NO
+                  BUILD_DPH=NO
+                  '''
+        sh '''
+            ./boot
+            ./configure --enable-tarballs-autodownload
+            make THREADS=${params.threads} test
+            '''
       }
     }
 
@@ -53,3 +51,7 @@ pipeline {
     }
   }
 }
+
+node {
+  buildGhc()
+}



More information about the ghc-commits mailing list