diff --git a/Jenkinsfile b/Jenkinsfile index e820673a336..4f38776d030 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -310,6 +310,7 @@ def rebaseHelper(branch, commitHistory = 100) { } library "canvas-builds-library@${getCanvasBuildsRefspec()}" +loadLocalLibrary("local-lib", "build/new-jenkins/library") configuration.setUseCommitMessageFlags(env.GERRIT_EVENT_TYPE != 'change-merged') extendedStage.setAlwaysAllowStages([ @@ -765,7 +766,6 @@ pipeline { } } - def distribution = load 'build/new-jenkins/groovy/distribution.groovy' distribution.stashBuildScripts() distribution.addRSpecSuites(stages) diff --git a/Jenkinsfile.parallel_logs b/Jenkinsfile.parallel_logs index 92c2fadb15d..9ab45cc4061 100644 --- a/Jenkinsfile.parallel_logs +++ b/Jenkinsfile.parallel_logs @@ -21,6 +21,7 @@ import org.jenkinsci.plugins.workflow.support.steps.build.DownstreamFailureCause import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException library "canvas-builds-library" +loadLocalLibrary("local-lib", "build/new-jenkins/library") // if the build never starts or gets into a node block, then we // can never load a file. and a very noisy/confusing error is thrown. @@ -85,7 +86,6 @@ pipeline { steps { script { def stages = [:] - def distribution = load 'build/new-jenkins/groovy/distribution.groovy' distribution.stashBuildScripts() @@ -100,7 +100,6 @@ pipeline { stage('Copy Files') { steps { script { - def rspec = load 'build/new-jenkins/groovy/rspec.groovy' rspec.uploadParallelLog() } } diff --git a/build/new-jenkins/groovy/distribution.groovy b/build/new-jenkins/library/vars/distribution.groovy similarity index 88% rename from build/new-jenkins/groovy/distribution.groovy rename to build/new-jenkins/library/vars/distribution.groovy index f475663b703..071dda3ee6d 100644 --- a/build/new-jenkins/groovy/distribution.groovy +++ b/build/new-jenkins/library/vars/distribution.groovy @@ -68,10 +68,10 @@ def stashBuildScripts() { * common helper for adding rspec tests to be ran */ def addRSpecSuites(stages) { - def rspec_node_total = load('build/new-jenkins/groovy/rspec.groovy').rspecConfig().node_total + def rspec_node_total = rspec.rspecConfig().node_total echo 'adding RSpec Test Sets' appendStagesAsBuildNodes(stages, rspec_node_total, 'RSpec Test Set', 'rspec') { index -> - load('build/new-jenkins/groovy/rspec.groovy').runRSpecSuite(rspec_node_total, index) + rspec.runRSpecSuite(rspec_node_total, index) } } @@ -79,10 +79,10 @@ def addRSpecSuites(stages) { * common helper for adding selenium tests to be ran */ def addSeleniumSuites(stages) { - def selenium_node_total = load('build/new-jenkins/groovy/rspec.groovy').seleniumConfig().node_total + def selenium_node_total = rspec.seleniumConfig().node_total echo 'adding Selenium Test Sets' appendStagesAsBuildNodes(stages, selenium_node_total, 'Selenium Test Set', 'selenium') { index -> - load('build/new-jenkins/groovy/rspec.groovy').runSeleniumSuite(selenium_node_total, index) + rspec.runSeleniumSuite(selenium_node_total, index) } } diff --git a/build/new-jenkins/groovy/rspec.groovy b/build/new-jenkins/library/vars/rspec.groovy similarity index 100% rename from build/new-jenkins/groovy/rspec.groovy rename to build/new-jenkins/library/vars/rspec.groovy