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 85b8b42 Update rat.pipeline
85b8b42 is described below
commit 85b8b428b3c81bbcb1a8d1c8bcbb1eb47e90b0fc
Author: Evan Zelkowitz <[email protected]>
AuthorDate: Thu Sep 23 16:57:47 2021 -0600
Update rat.pipeline
---
jenkins/github/rat.pipeline | 39 ++++++++++++++++++++++++++++++---------
1 file changed, 30 insertions(+), 9 deletions(-)
diff --git a/jenkins/github/rat.pipeline b/jenkins/github/rat.pipeline
index d1342df..3823b2f 100644
--- a/jenkins/github/rat.pipeline
+++ b/jenkins/github/rat.pipeline
@@ -15,8 +15,24 @@ pipeline {
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'
}
@@ -25,16 +41,21 @@ pipeline {
steps {
echo 'Starting build'
dir('src') {
- sh('head -1 README')
- sh('autoreconf -if && ./configure')
- sh('rm -f lib/ts/stamp-h1')
+ // For Jenkins debugging. We comit the top of README in
our debug PRs.
+ sh('head README')
- // Run RAT
- sh('make rat | tee RAT.txt')
+ sh '''#!/bin/bash
+ set -x
+ autoreconf -if && ./configure
+ rm -f lib/ts/stamp-h1
- // Mark as failed if there are any unknown licesnes
- sh('grep \'0 Unknown Licenses\' RAT.txt > /dev/null ||
exit -1')
- sh('exit 0')
+ # Run RAT
+ make rat | tee RAT.txt
+
+ # Mark as failed if there are any unknown licenses
+ grep '0 Unknown Licenses' RAT.txt > /dev/null || exit
-1
+ exit 0
+ '''
}
}
}