[zorg] r318326 - jenkins: Do pseudo checkout in benchmark job
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 11:29:40 PST 2017
Author: matze
Date: Wed Nov 15 11:29:40 2017
New Revision: 318326
URL: http://llvm.org/viewvc/llvm-project?rev=318326&view=rev
Log:
jenkins: Do pseudo checkout in benchmark job
Doing the pseudo checkout in the relay job didn't work as the changelog
somehow didn't transfer to the triggered benchmarking jobs (is this a
bug/feature of the jenkins pipeline build step?).
So we do the pseudo checkout as part of the benchmark job instead.
Modified:
zorg/trunk/zorg/jenkins/common.groovy
zorg/trunk/zorg/jenkins/relay.groovy
Modified: zorg/trunk/zorg/jenkins/common.groovy
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/common.groovy?rev=318326&r1=318325&r2=318326&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/common.groovy (original)
+++ zorg/trunk/zorg/jenkins/common.groovy Wed Nov 15 11:29:40 2017
@@ -17,6 +17,33 @@ private def render_template(template_tex
return template_eng.toString()
}
+// Checkout an svn repository with depth 0 to get at the changelog without
+// actually writing files to disk.
+private def pseudo_svn_checkout(name, url) {
+ dir("pseudo-checkout-${name}") {
+ checkout poll: false, changelog: true, scm: [
+ $class: 'SubversionSCM',
+ locations: [[
+ remote: url,
+ depthOption: 'empty',
+ ]]
+ ]
+ }
+}
+
+// Do a pseudo checkout of an llvm repo to get the blamelist filled. This is
+// necessary for relay jobs as with current jenkins we do not want to trigger
+// the relay job with any parameters or blamelists. (If we would do that then
+// jenkins won't merge requests anymore and we would be forced to test
+// every single revision for which we don't have the hardware right now).
+private def pseudo_clang_checkout(revision) {
+ pseudo_svn_checkout 'llvm', "http://llvm.org/svn/llvm-project/llvm/trunk@${revision}"
+ pseudo_svn_checkout 'cfe', "http://llvm.org/svn/llvm-project/cfe/trunk@${revision}"
+ pseudo_svn_checkout 'clang-tools-extra', "http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@${revision}"
+ pseudo_svn_checkout 'compiler-rt', "http://llvm.org/svn/llvm-project/compiler-rt/trunk@${revision}"
+ pseudo_svn_checkout 'libcxx', "http://llvm.org/svn/llvm-project/libcxx/trunk@${revision}"
+}
+
private def post_build() {
// Analyze build log.
def base_url = 'http://labmaster2:8080/green'
@@ -85,12 +112,13 @@ def task_pipeline(label, body) {
def benchmark_pipeline(label, body) {
properties([
parameters([
- string(name: 'ARTIFACT',
- defaultValue: 'http://labmaster2.local/artifacts/clang-stage1-configure-RA_build/latest')
+ string(name: 'ARTIFACT'),
+ string(name: 'LLVM_REV'),
])
])
currentBuild.displayName = basename(params.ARTIFACT)
+ pseudo_clang_checkout(params.LLVM_REV)
task_pipeline(label, body)
}
Modified: zorg/trunk/zorg/jenkins/relay.groovy
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/relay.groovy?rev=318326&r1=318325&r2=318326&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/relay.groovy (original)
+++ zorg/trunk/zorg/jenkins/relay.groovy Wed Nov 15 11:29:40 2017
@@ -17,23 +17,6 @@ private def basename(path) {
return path.drop(path.lastIndexOf('/') + 1)
}
-// Do a pseudo checkout of an llvm repo to get the blamelist filled. This is
-// necessary for relay jobs as with current jenkins we do not want to trigger
-// the relay job with any parameters or blamelists. (If we would do that then
-// jenkins won't merge requests anymore and we would be forced to test
-// every single revision for which we don't have the hardware right now).
-private def pseudo_svn_checkout(name, url) {
- dir("pseudo-checkout-${name}") {
- checkout poll: false, changelog: true, scm: [
- $class: 'SubversionSCM',
- locations: [[
- remote: url,
- depthOption: 'empty',
- ]]
- ]
- }
-}
-
private def relay_steps(job_pattern, artifact_url, last_good_properties_url) {
// The upstream jobs triggering the relay produce a
// "last_good_build.properties" file that contains a reference to the
@@ -48,12 +31,6 @@ curl -fksSO "${last_good_properties_url}
def artifact = "http://labmaster2.local/artifacts/${props.ARTIFACT}"
currentBuild.setDisplayName("r${props.LLVM_REV}")
- pseudo_svn_checkout 'llvm', "http://llvm.org/svn/llvm-project/llvm/trunk@${props.LLVM_REV}"
- pseudo_svn_checkout 'cfe', "http://llvm.org/svn/llvm-project/cfe/trunk@${props.LLVM_REV}"
- pseudo_svn_checkout 'clang-tools-extra', "http://llvm.org/svn/llvm-project/clang-tools-extra/trunk@${props.LLVM_REV}"
- pseudo_svn_checkout 'compiler-rt', "http://llvm.org/svn/llvm-project/compiler-rt/trunk@${props.LLVM_REV}"
- pseudo_svn_checkout 'libcxx', "http://llvm.org/svn/llvm-project/libcxx/trunk@${props.LLVM_REV}"
-
// Trigger all jobs with names matching the `job_pattern` regex.
def joblist = get_matching_jobs(job_pattern)
def parallel_builds = [:]
@@ -63,8 +40,11 @@ curl -fksSO "${last_good_properties_url}
parallel_builds[shortname] = {
def job_params = [
[$class: 'StringParameterValue',
- name:'ARTIFACT',
- value:artifact],
+ name: 'ARTIFACT',
+ value: artifact],
+ [$class: 'StringParameterValue',
+ name: 'LLVM_REV',
+ value: props.LLVM_REV],
]
build job: jobname, parameters: job_params
}
More information about the llvm-commits
mailing list