This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new 98bde03  Adding a cmake.pipeline for PR builds (#136)
98bde03 is described below

commit 98bde03bf61234d53903f9773bc1873b03984eb6
Author: Brian Neradt <[email protected]>
AuthorDate: Fri Mar 31 15:12:12 2023 -0500

    Adding a cmake.pipeline for PR builds (#136)
    
    Co-authored-by: bneradt <[email protected]>
---
 jenkins/github/cmake.pipeline | 67 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/jenkins/github/cmake.pipeline b/jenkins/github/cmake.pipeline
new file mode 100644
index 0000000..f47d551
--- /dev/null
+++ b/jenkins/github/cmake.pipeline
@@ -0,0 +1,67 @@
+pipeline {
+    agent {
+        docker {
+            image 'ci.trafficserver.apache.org/ats/rockylinux:8'
+            registryUrl 'https://ci.trafficserver.apache.org/'
+            label 'docker'
+            args '-v ${HOME}/ccache:/tmp/ccache:rw'
+        }
+    }
+    environment {
+        CCACHE_DIR = "/tmp/ccache"
+        CCACHE_BASEDIR = "${WORKSPACE}"
+    }
+    stages {
+        stage('Clone') {
+            steps {
+                dir('src') {
+                    echo "${sha1}"
+                    checkout([$class: 'GitSCM',
+                        branches: [[name: sha1]],
+                        extensions: [
+                            // We have to set an idenity for the merge step 
because Git requires
+                            // the user.name and user.email to be set to do a 
merge.
+                            [$class: "UserIdentity",
+                                name: "ATS CI User",
+                                email: "[email protected]"
+                            ],
+                            [$class: "PreBuildMerge",
+                                options: [
+                                    mergeTarget: "${GITHUB_PR_TARGET_BRANCH}",
+                                    fastForwardMode: "NO_FF",
+                                    mergeRemote: "origin",
+                                    mergeStrategy: "DEFAULT"
+                                ]
+                            ],
+                        ],
+                        userRemoteConfigs: [[url: github_url, refspec: 
'+refs/pull/*:refs/remotes/origin/pr/*']]])
+                    sh 'git show -n 10 --decorate --graph --oneline --no-patch'
+                }
+                echo 'Finished Cloning'
+            }
+        }
+        stage('Build: cmake') {
+            steps {
+                echo 'Starting cmake build'
+                dir('src') {
+                    sh '''#!/bin/bash
+                        set -x
+                        set -e
+                        source /opt/rh/gcc-toolset-11/enable
+                        mkdir cmake-build-release
+                        cd cmake-build-release
+                        cmake -DCMAKE_BUILD_TYPE:STRING=Release 
-DOPENSSL_ROOT_DIR=/opt/openssl-quic ..
+                        make -j4
+                        '''
+                }
+                echo 'Finished cmake build'
+            }
+        }
+    }
+    
+    post { 
+        cleanup { 
+            cleanWs()
+        }
+    }
+}

Reply via email to