Commit Graph

359 Commits

Author SHA1 Message Date
Aaron Ogata 70b06aaa0b apply autoformatter to all files
refs DE-643

Change-Id: I9482afa27e6b8734640741fca784f971f782af26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264050
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-05-03 14:07:45 +00:00
Aaron Ogata 58bd7e4589 treat any non-SUCCESS status as failed
refs DE-656

ExtendedStage supports more alternative statuses than FAILED / SUCCESS now, such as NOT_BUILT, ABORTED_USER and ABORTED_PATCHSET. All of these need to be treated as FAILED conditions.

Test Plan
1. All patchsets start appearing in #canvas_builds-noisy

Change-Id: I0eae928a7d232c730e7c552336c216c09d62bfef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263797
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2021-04-27 22:41:52 +00:00
Kyle Rosenbaum 1e43e05241 add podTemplate and container definition to all applicable stages
refs DE-558, DE-582

[use-kubernetes]
[canvas-builds-refspec=24d3d83e8034ac6ad5380936498e1dcf01ab50eb]

modify the existing nodeRequirements to add podTemplate and
container definitions. initially, the podTemplate to be used
is docker-in-docker. the "use-kubernetes" flag must be set
as well.

test plan:
- build executes on k8s nodes in EKS when "use-kubernetes"
flag is set.
- build executes on EC2 when "use-kubernetes" flag is not set.

Change-Id: I13c68e5420bbf414532518eaf69ac82f9310bfbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263257
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-27 19:47:25 +00:00
Aaron Ogata 8e88be86eb report unknown failure exceptions to Slack
refs DE-630

In order to start auto-killing bad nodes, we’ll need a list of exceptions that represent that state. Start collecting them in #canvas_builds-noisy.

Test Plan
1. Common failure cases don’t report to Slack

[canvas-builds-refspec=e4b78afbb94053b352b1ad7ef514ac1efdcf1558]

Change-Id: I93e57cfe49f4ad190769a101765cd870a6d16ca5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263553
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-26 13:25:59 +00:00
Aaron Ogata 4afde2cb63 split linters stage into multiple stages
refs DE-628

Test Plan
1. Ensure that code / webpack always run
2. Ensure that yarn linters run only when package.json or yarn.lock changes
3. Ensure that build summary report works when each stage fails

[canvas-builds-refspec=f2c74ae95319648ac9fe19f306d7067adda9c534]

Change-Id: I64eb9f794e00737b2f0b87a1d962a4aaaeb174d2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263365
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-22 18:52:00 +00:00
Aaron Ogata 5ad6a24f34 split lintersStage setupNode / tearDownNode functions
refs DE-628

In order to improve the build summary report UX and also to increase compatibility with podTemplate / container, split the setup / tear down pieces of the Linters stage to prepare for moving each piece to its own Jenkins stage.

Test Plan:
1. All linters run and fail if error is found
2. Linters post status to gerrit
3. Plugin build Linters works

Change-Id: I4c4769eed80f201532edc34907f2428ceb465773
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263323
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-21 15:07:24 +00:00
Aaron Ogata 091df4a450 only process sub-job results if RunWrapper exists
refs DE-633

When a sub-job is cancelled, it won’t return a RunWrapper, so it can be null here.

Change-Id: Ia49b81268d6548c58ce9ba35d38175c5fd76705d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263295
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-20 22:42:56 +00:00
Kyle Rosenbaum 16469f7cfa add support for EKS container to protectedNode requirements
refs DE-558, DE-582

[canvas-builds-refspec=f9c80c0ac4b80de60ac50633523e30d5c2eb28b1]

modify the existing nodeRequirements call to pass a Map containing
the label as well as the possibility of container or podTemplate
params. this change only modifies the existing nodeRequirements to
continue using EC2 agents, not EKS.

test plan:
- builds still work as expected acquiring nodes

Change-Id: I0458a13a4c85e37aeb2f5dc56347e27101705646
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263208
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2021-04-20 21:51:16 +00:00
Aaron Ogata 042f00b4d6 unify failed stage parsing logic
refs DE-619

Merge the current logic for handling the main build failures with the logic for sub-jobs to reduce complexity and ensure consistent handling.

Test Plan:
1. Ensure sub-job test results appear
2. Ensure rspec / selenium failure stages appear
3. Ensure sub-job failure stages appear
4. Ensure parent stages do not appear

[canvas-builds-refspec=6e70b5b572e9297f1cd06020ec61a551e7c0d323]

Change-Id: I7410cec5340714b3617a310f83549011a2a0ce0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262979
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-19 23:09:35 +00:00
Aaron Ogata 347c800d3f switch from on-demand to spot executors for primary node
refs DE-338

EKS requires that we stop using on-demand instances for any of our build nodes. Now that the pre-requisite work is done to allow this change, actually switch it over.

Test Plan
1. Spot instance termination of primary node works when Linters job is running

Change-Id: Idac911c2c8266e30dc9cb8f0b7478fc09c8aa543
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263160
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-19 17:07:37 +00:00
Aaron Ogata ef3b427766 fix stable branch building
Change-Id: Ie0569a6e9600f2fb73d931e93edf2c72468ae2fb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263024
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-15 21:19:37 +00:00
Aaron Ogata 5d1fb9b734 convert on*Result -> onStageEnded
refs DE-628

Test Plan:
1. Build summary report works for sub-jobs and normal stages
2. Sub-jobs run cleanupFn

[canvas-builds-refspec=82ccf7ae185871e45c658f225cc664ef05cda74d]

Change-Id: I9d4476b75e6488bcc388a89e9f7cf87150d0ae6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262951
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-15 13:54:20 +00:00
Aaron Ogata 3027dcdbd7 rename handler to hooks
refs DE-628

[canvas-builds-refspec=a5aca2425b1f885f5fcb4298479c0081d73065ff]

Change-Id: I0581d820fc521fb4857c04a28804be1c9a2d19a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262947
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-14 22:50:58 +00:00
Aaron Ogata b3f6ee3b54 fix allow-stages directive
refs DE-621

Change-Id: I77e620defe993e37425cfd1f6e9c78d2574fb922
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262904
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-14 17:37:00 +00:00
Aaron Ogata 1a2b0052f1 convert extendedStage -> protectedNode to nodeRequirements() pattern
refs DE-621

Make the stage configuration aware of its node requirements for future EKS support and allowing nospot to be removed.

Test Plan:
1. RSpec / Selenium build works
2. Contract Tests works
3. JS works
4. FSC works
5. Vendored Gems works

[canvas-builds-refspec=480f3570a6a6ebee5cedaecbb3a089476a008215]

Change-Id: I6cb63df20abe8c1f913db4f1b21bb01bd4d30312
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262898
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-14 15:23:01 +00:00
Aaron Ogata de7559a9c2 avoid cps error when calling post actions
refs DE-624

Jenkins CPS transformation doesn’t correctly transform the Closure inside of the Expando object, but we can use a Map instead that has the same functionality (the property can be accessed using the dot operator).

Test Plan:
1. Build summary report works

Change-Id: Ic3446afa20f6c6ce5aac95e5e0cda06edfa39ef5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262844
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-13 20:52:11 +00:00
Aaron Ogata e18887bf26 move docker cleanup to protectedNode() handler
refs DE-624

As part of making extendedStage() aware of stage node requirements, we need to remove consumers of the cleanupFn() functionality and replace them with extendedStage() compatible patterns.

Test Plan:
1. All stages execute correctly

[canvas-builds-refspec=07f1a75ee23f8f6a9a1bbe062316373b761e7a30]

Change-Id: Ica11b78ebead5c9239dea112677a077654c7090d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-13 18:02:41 +00:00
Aaron Ogata c7ad6e2939 clean-up postFn caller implementation
refs DE-338

Test Plan:
1. Build succeeds when all stages pass, and uploads a summary report.
2. Build fails when any stage fails, and uploads a summary report.

Change-Id: I98d9ce4507ed805caad4fe4857aa9ecef9aceaf9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262780
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-13 14:45:34 +00:00
Aaron Ogata 2d7bf0e26f notify noisy channel on build success / failure
refs DE-620

It can be helpful for monitoring builds after potentially breaking changes are made to have a list of build success / failure in one place.

Change-Id: I5b06d3221e8292740fdcccdb4e1633f9ac30177a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262764
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-13 13:50:09 +00:00
Aaron Ogata f85b577b0e move rspec / selenium stages to root level
refs DE-338

Nospot removal requires all non-build stages to not be wrapped in the protectedNode() function.

Test Plan:
1. RSpec / Selenium stages pass
2. Build Summary Report works correctly

Change-Id: I313b865c1e2758177446905b62a5c7c6f1ed1830
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262748
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-12 21:10:50 +00:00
Aaron Ogata f89a7d81c1 fix naming of db image cache vars
refs DE-338

Eliminate the need for the withEnv() indentation by consistently naming all of these variables.

Test Plan:
1. Migrations caching works correctly

Change-Id: Iaef43c4e4278878e17b90e2190dc0d7a0a42cb26
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262743
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-12 20:17:54 +00:00
Aaron Ogata 18d8422aec actually execute post-build functions after entire build
refs DE-338

After we started moving stages out of the nospot block, we forgot to move the post-actions function out of that block as well. This results in postFn() being called too early.

Test Plan:
1. Build summary report actually captures all stages.

Change-Id: I743827c4f35682e8887918c9041ed833e51ad2f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262712
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-12 17:56:46 +00:00
Aaron Ogata 7391f706ac restore ability to use allows-stages flag
refs DE-338

Now that stages that don’t start with the same name as the waiting stage exist, we need to wrap the waiting stages with obeysAllowStages(false) so that they execute correctly.

Test Plan:
1. allow-stages works with non-JS jobs

[canvas-builds-refspec=871c7a9eb43015c9eb3faccca73742ebb4169166]

Change-Id: I52f1cf1c9778c36030d4582abcebf2ee03577122
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262598
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-09 21:17:44 +00:00
Aaron Ogata 6fa80f4ac4 remove unused function
This functionality has been replaced by protectedNode() only calling this clean-up function when a node has been acquired.

Test Plan:
1. main Jenkins passes

Change-Id: I760fd3aaecf4f626b5dc4c65401483f95cb65923
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262591
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-09 19:30:57 +00:00
Aaron Ogata 9a2de65e0f remove useless echo statements
Change-Id: I116e19c355daf1a4938478c5ef0363d19fa36a1d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262587
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-04-09 18:38:58 +00:00
Aaron Ogata 46caa9d110 move remaining sub-job stage to root level
refs DE-338

Nospot removal requires all non-build stages to not be wrapped in the protectedNode() function.

Test Plan:
1. FSC / CDC Schema Check triggers correctly when files change.

Change-Id: Ieb2ab7490837f3fc5a6dc5a178229fa44b8205b6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262582
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-09 18:21:58 +00:00
Aaron Ogata 5cfe22c368 move Local Docker Dev stage to root level
refs DE-338

Nospot removal requires all non-build stages to not be wrapped in the protectedNode() function.

Test Plan:
1. Local Docker Dev triggers correctly when files change.

Change-Id: I986a85161d567c31606b73553c420cf63bdec455
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262571
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-09 17:29:58 +00:00
Aaron Ogata ddc875d672 move file change detection into own stage
refs DE-617

In order to properly split the stages for nospot removal, none of conditional jobs in Parallel Run Tests should directly depend on a heavyweight executor to know if they need to run.

Test Plan:
1. CDC Schema Check triggers when migrations change.
2. FSC triggers when specs change.
3. Local Docker Dev triggers when related files change.

[canvas-builds-refspec=3828a4bcd9f172fb6cec7046742cb678e3e489bf]

Change-Id: I578e4665d382aa27f03932d172604b20a8a1497d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-09 15:17:20 +00:00
Aaron Ogata ab4a9233e5 convert to extendedStage.required functionality for basic use cases
refs DE-617

extendedStage() has functionality that allows a stage to be required or not. If it is required, the stage is run. If it is not required, it is not run unless explicitly allowed via the allow-stages directive.

Test Plan
1. All pre-merge stages run correctly
1. All post-merge stages run correctly

[canvas-builds-refspec=ee0987058d3d29d8130904b126615a1ab20f9ca2]

Change-Id: Ie9709b50a2a6f75e5687972c49bfe488ee3b6be1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262540
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 23:25:55 +00:00
Andrea Cirulli 87b5082958 move setup stage to new conventions
Move all the logic related to the setup stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Setup stage works the same way
- Main build passes

Change-Id: I32771f8a6262f3dad905ea71d8774cbdf96aac57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262525
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>
2021-04-08 21:27:10 +00:00
Andrea Cirulli 2bee2274a0 move dependency check stage to new conventions
Move all the logic related to the dependency check stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Dependency Check works simulating post-merge

Change-Id: I2164ab028b885cea0f8a72c6c6fb1d09360403c8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262514
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2021-04-08 20:05:09 +00:00
Aaron Ogata 279860185a remove custom skip-rebase flag
refs DE-614

Test Plan:
1. skip-stages=Rebase directive works
2. Rebase stage runs when not skipped

[canvas-builds-refspec=7a02f80338461878f6ec092569182322fb63461d]

Change-Id: If1b2d651eaaea05ef5bb57f84f299a57b11ef5f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262513
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 20:02:57 +00:00
Andrea Cirulli ffe67c6310 move linters stage to new conventions
Move all the logic related to the linter stage to its own
groovy file.

refs DE-615
flag = none

Test-plan:
- Linters works

Change-Id: I4b15b59bf7d76b16ce5f9773d8be4565f08849c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262511
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2021-04-08 20:02:38 +00:00
Aaron Ogata 4a4172d7d7 move Run Migrations to new conventions
refs DE-615

Test Plan:
1. Run Migrations works

Change-Id: I47feba5c2be963882d03404f87b5e5e77abfcbeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262505
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 18:30:35 +00:00
Andrea Cirulli 99ab71113f abstract rebase logic to its own rebaseStage groovy
In order to make the Jenkinsfile more readable move the rebase logic
to a self groovy file rebaseStage. This will also allow to create
unit test against it

[canvas-builds-refspec=fa26046c2b1382a956c3891debcd54eac7ed4166]

refs DE-615
flag = none

test-plan:
- Rebase stage should passes and behaves the same way

Change-Id: I7649346572b3ad6a0684dbdc75ae6ba4682fe5e0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262488
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>
2021-04-08 18:26:17 +00:00
Aaron Ogata d6e8d7ad57 move Build Docker Image to new conventions
refs DE-615

Test Plan:
1. Build Docker Image works
2. Build Docker Image (Pre-Merge) works
3. JS Image build works

[canvas-builds-refspec=fa26046c2b1382a956c3891debcd54eac7ed4166]

Change-Id: I7bdcdb492b48c73316bc194216c0cd4c1fc3c6a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262494
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 18:20:35 +00:00
Aaron Ogata 1f9aa6efe4 move external image tag to post-build function
refs DE-615

In order to abstract our stage implementations into the local shared library in a clean way, we need to prevent referencing isPatchsetPublishable() by the Build Docker Image job.

Test Plan:
1. Ensure that the EXTERNAL_TAG is uploaded after a successful build.

Change-Id: I831d19f51a73f83849a6d173a03744d184fc6798
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262490
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-08 17:46:56 +00:00
Aaron Ogata 674038aa7e move setAlwaysAllowStages() pattern to new chained method convention
refs DE-611

As part of our transition to chained methods to configure stages, move this pattern over as well for completeness.

Test Plan:
1. Corresponding canvas-lms build passes when directive is used.

[canvas-builds-refspec=494be81ae38b517ba87e44ac3d1da0962d4141d6]

Change-Id: Ib75426bf01633bd458312e5cf6f076feb7b8aafc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262476
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-08 15:00:06 +00:00
Aaron Ogata 7ea63cc398 convert buildSummaryReport job stage path to onStageResult()
refs DE-602

We need to align the sub-job stage calling conventions with the closure-based stage calling conventions.

Test Plan:
1. Jenkins main build passes.

[canvas-builds-refspec=578e0565cdbd0db433817eb21062fbccea6c30fe]

Change-Id: I288ae5a1d3bab0ea158725d9270b2045d6335dc4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262456
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-08 14:18:54 +00:00
Aaron Ogata b33dd6121f convert buildSummaryReport normal stage path to onStageResult()
refs DE-602

We need to reduce the different permutations of extendedStage() that live outside of that step. In order to do this, a handler can be registered that provides a pre-defined interface of functions that can be called.

Test Plan:
1. Jenkins main build passes.

[canvas-builds-refspec=0836fe0779bf81547ed1ea1c063ba806dc2a35e5]

Change-Id: I0cc268d09f10459b8417b0386383435b2ac74b74
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262402
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-04-07 21:58:19 +00:00
Aaron Ogata 48652ae22d convert dependsOn to new format
refs DE-600

[canvas-builds-refspec=ed93def481ce2090ad9d91fcb98eeb5b3ffbd24d]

Change-Id: Ife3c650dbe59354253b96ad2edbc5742568a518a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262370
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-06 23:10:18 +00:00
Aaron Ogata 0b9841ef62 convert timings options to new pattern
refs DE-600

[canvas-builds-refspec=a7a7b1003c49452145fe60df41966637d27cf271]

Change-Id: I60fec23e664009fd6632ca530ab4c68b37864988
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262366
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-06 21:46:20 +00:00
Aaron Ogata 1b34dfded2 convert extendedStage usage to new API object
refs DE-600

[canvas-builds-refspec=ae49183baaf598d8d68a8ad9dc07f2c12908e8ec]

Change-Id: I254f1226159e992a1b02f5eaeb10d8f0f98ed0ce
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262358
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-06 21:06:25 +00:00
Aaron Ogata b8e0f3ffc2 remove unused buildSummaryReport parameters
refs DE-597

[canvas-builds-refspec=72f831e2ec786fd6e5be6c0050cfdf852f66b3c6]

Change-Id: I4cf131ca6f72219a3ee1837f37717d3a5f633b92
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262295
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-05 22:25:11 +00:00
Aaron Ogata 8aed2d2175 replace fsc-propagate with general ignore-stage-results
refs DE-597

[canvas-builds-refspec=64831fdcfdcb00f37739df8035e929c150fa5e79]

Change-Id: Ic0784d5c2fdd182a65c39cd3d0f96402abfc564f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/262282
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-04-05 21:52:39 +00:00
Andrea Cirulli c81019a0b2 move rebasehelper to local shared lib
move rebaseHelper function into its own groovy file.

refs DE-587
flag = none

test-plan:
- rebase stage works as expected

Change-Id: I7919f849b2acb4294c666fc896b201fc5ddc8b0a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261653
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
2021-03-25 20:27:31 +00:00
Andrea Cirulli 3f2061ba56 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>
2021-03-24 21:30:59 +00:00
Aaron Ogata 36bd5c152e ensure allow-stages flag works with new waiting pattern
refs DE-338

Change-Id: I18fcafc39b079dd32a4f772edcab0de31eb91c57
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261484
Reviewed-by: Kyle Rosenbaum <krosenbaum@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-03-24 20:31:24 +00:00
Andrea Cirulli 872961eb55 Revert "add the ability to load local shared library"
This reverts commit b4a90a4ffa.

Reason for revert: causing build issues

Change-Id: Icf4c6d0fe26ec073d7b7ad67d1670efdee761c16
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/260738
Tested-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-03-24 16:07:08 +00:00
Andrea Cirulli b4a90a4ffa add the ability to load local shared library
move rspec and distribution into a library folder that
can be loaded as local shared lib to avoid the load code
in the jenkins files.

refs DE-555
flag = none

[canvas-builds-refspec=d4cf97caed1edf2c9c91c48460e94f99e58a4d0a]

Change-Id: Id947a389d22f04126a8654bd5e4957433cddd330
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261289
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>
2021-03-24 16:02:38 +00:00