Revert "Revert "add the ability to load local shared library""

[canvas-builds-refspec=84e5313a87dea47cc544ff1cb8fae728efa1af21]

refs DE-555
flag=none

This reverts commit 872961eb55.

Reason for revert: fixed issue in canvas-builds

Change-Id: Ia5d9232f1bec05724c0062fa6fdec31fd93e2ad4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260740
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
This commit is contained in:
Andrea Cirulli 2021-03-24 20:22:46 +00:00
parent 7c824e39c8
commit 3f2061ba56
4 changed files with 6 additions and 7 deletions

2
Jenkinsfile vendored
View File

@ -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)

View File

@ -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()
}
}

View File

@ -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)
}
}