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

eze 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 501475e  Update autest.pipeline
501475e is described below

commit 501475eae68781579b37abad9578d5f74772e9b2
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Thu Sep 23 16:54:14 2021 -0600

    Update autest.pipeline
---
 jenkins/github/autest.pipeline | 89 +++++++++++++++++++++++++++++++-----------
 1 file changed, 67 insertions(+), 22 deletions(-)

diff --git a/jenkins/github/autest.pipeline b/jenkins/github/autest.pipeline
index bc6ac34..19e6942 100644
--- a/jenkins/github/autest.pipeline
+++ b/jenkins/github/autest.pipeline
@@ -3,18 +3,39 @@ pipeline {
         docker {
             image 'controller.trafficserver.org/ats/centos:8'
             registryUrl 'https://controller.trafficserver.org/'
-            args '--init --cap-add=SYS_PTRACE --network=host -u root'
+            args '--init --cap-add=SYS_PTRACE --network=host -v 
${HOME}/ccache:/tmp/ccache:rw'
             label 'docker'
         }
     }
+    environment {
+        CCACHE_DIR = "/tmp/ccache"
+        CCACHE_BASEDIR = "${WORKSPACE}"
+    }    
     stages {
         stage('Clone') {
             steps {
                 dir('src') {
+                    echo "${sha1}"
                     checkout([$class: 'GitSCM',
                         branches: [[name: sha1]],
-                        extensions: [],
+                        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'
             }
@@ -23,12 +44,27 @@ pipeline {
             steps {
                 echo 'Starting build'
                 dir('src') {
-                    sh('source /opt/rh/gcc-toolset-9/enable')
-                    sh('update-crypto-policies --set LEGACY')
-                    sh('autoreconf -fiv')
-                    sh('./configure --enable-experimental-plugins 
--enable-example-plugins --prefix=/tmp/ats/ --enable-werror --enable-debug 
--enable-wccp --enable-luajit')
-                    sh('make -j4')
-                    sh('make install')
+                    // For Jenkins debugging. We comit the top of README in 
our debug PRs.
+                    sh('head README')
+
+                    sh '''#!/bin/bash
+                    
+                       set -x
+                       source /opt/rh/gcc-toolset-9/enable
+                       sudo update-crypto-policies --set LEGACY
+
+                       # We want to pick up the OpenSSL-QUIC version of curl 
in /opt/bin.
+                       # The HTTP/3 AuTests depend upon this, so update the 
PATH accordingly.
+                       export PATH=/opt/bin:${PATH}
+
+                       # Change permissions so that all files are readable
+                       # (default user umask may change and make these 
unreadable)
+                       sudo chmod -R o+r .
+                       autoreconf -fiv
+                       ./configure --with-openssl=/opt/openssl-quic 
--enable-experimental-plugins --enable-example-plugins --prefix=/tmp/ats 
--enable-werror --enable-debug --enable-wccp --enable-luajit --enable-ccache
+                       make -j4
+                       make install
+                       '''
                 }
             }
         }
@@ -37,19 +73,25 @@ pipeline {
                 echo 'Starting AuTest'
                 dir('src/tests') {
                     sh '''
-                        set +e
-                        mkdir -p ${WORKSPACE}/output/${GITHUB_PR_NUMBER}
-                        ./autest.sh --ats-bin /tmp/ats/bin/ --sandbox 
/tmp/sandbox -f active_timeout runroot_manager || true
-                        if [ -n "$(ls -A /tmp/sandbox/)" ]; then
-                            cp -rf /tmp/sandbox/ 
${WORKSPACE}/output/${GITHUB_PR_NUMBER}/
-                            chmod -R 777 ${WORKSPACE}
-                            exit 1
-                        else
-                            touch 
${WORKSPACE}/output/${GITHUB_PR_NUMBER}/No_autest_failures
-                            chmod -R 777 ${WORKSPACE}
-                            exit 0
-                        fi
-                        '''
+                       set +e
+                       # We want to pick up the OpenSSL-QUIC version of curl 
in /opt/bin.
+                       # The HTTP/3 AuTests depend upon this, so update the 
PATH accordingly.
+                       export PATH=/opt/bin:${PATH}
+                       
+                       export_dir="${WORKSPACE}/output/${GITHUB_PR_NUMBER}"
+                       mkdir -p ${export_dir}
+                       ./autest.sh --ats-bin /tmp/ats/bin/ --sandbox 
/tmp/sandbox || true
+                       if [ -n "$(ls -A /tmp/sandbox/)" ]; then
+                           cp -rf /tmp/sandbox/ "${export_dir}"
+                           ls "${export_dir}"
+                           sudo chmod -R 777 ${WORKSPACE}
+                           exit 1
+                       else
+                           touch ${export_dir}/No_autest_failures
+                           sudo chmod -R 777 ${WORKSPACE}
+                           exit 0
+                       fi
+                       '''
                 }
             }
         }
@@ -57,7 +99,10 @@ pipeline {
     
     post { 
         always {
-            archiveArtifacts artifacts: 'output/**/*', fingerprint: false, 
allowEmptyArchive: true
+            // We exclude socket files because archiveArtifacts doesn't deal 
well with
+            // their file type.
+            archiveArtifacts artifacts: 'output/**/*', fingerprint: false, 
allowEmptyArchive: true, excludes: '**/*.sock, **/cache.db'
+            echo "See the build job description for a link to the sandbox."
         }
         cleanup { 
             cleanWs()

Reply via email to