Commit Graph

270 Commits

Author SHA1 Message Date
Aaron Ogata 360ddf34a0 improve lint:browser-code debugging
refs DE-465

Change-Id: I560c445ee7bd4b501686bb10bc4ffb64b4b910ad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256692
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-01-14 16:18:14 +00:00
Aaron Ogata 3453d541b7 align migration image naming conventions with other images
refs DE-442

Change-Id: I63d8b34cb23e0e8accf857b88438997c1f63a7d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256513
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-01-12 22:07:26 +00:00
Aaron Ogata 3e92cc4498 move execute function under libraryScript
refs DE-442

[canvas-builds-refspec=eecea52ff75a74be10cd0d2c1434dc917bd726af]

Change-Id: I7412d590e1c08a47eb48b1fd82af9eaf0d5eb145
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256507
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-01-12 00:32:08 +00:00
Aaron Ogata 4aa05e2fcd trim webpack builder label
refs DE-445

[canvas-builds-refspec=c0ddc59f05bca3e6592bbc7f1ae099830a857105]

Change-Id: Ib477d8cf5e3dd124c371b7b41a8b39e28e2376f0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256469
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-01-11 21:58:00 +00:00
Andrea Cirulli 4d672c2f6a add global timeout and reevaluate all timeouts
Add timeout to all builds and set the proper values for the existing
timeouts

refs DE-307
flag = none

test-plan:
- Force the build to timeout and check that jenkins fails the build

Change-Id: I2e3ae36f828da1bc047bf5a2cfbc79c167b84d5f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256171
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-01-11 21:24:03 +00:00
Andrea Cirulli 9b539d008e create flag to allow skipping the ci build
Add a commitFlag that allows the user to skip CI

refs DE-192
flag = none

[canvas-builds-refspec=618e43174bc58f54905421e18b212d96f9eb0b95]

test plan:
- Ensure the build is skipped using the flag
- Ensure a code-review -2 is assigned if the skip ci flag is enabled
- Ensure the build is executed and passes when the flag is removed

Change-Id: I5c57d9959e4650ccd42578672f4df38ca9abce34
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256070
Reviewed-by: Aaron Ogata <aogata@instructure.com>
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>
2021-01-05 20:57:24 +00:00
Aaron Ogata fc93a050e5 use tagged canvas-builds stable branch
Change-Id: Ia5780fc40b551acf3740fa5255057a1820c4a79f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256033
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-01-05 19:31:02 +00:00
Andrea Cirulli 60ba4af98c abstract cache prefix creation
Use canvas-builds to create prefix for cache images

refs DE-435
flag = none

[canvas-builds-refspec=d54d1f4dda757fbbb0372ad26defd8104d838e47]

Change-Id: Id1c6e29cb025f4a660bf891faa95df13f2978c33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255977
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-01-04 20:47:05 +00:00
Andrea Cirulli 524458d77f add ruby 2.7 build
Add a ruby 2.7 build triggerable by a comment on gerrit

refs DE-387
flag = none

test-plan:
- Build passess
- Local dev builds
- Ruby 2.7 build uses the ruby2.7-passenger image for
building the application

Change-Id: I512df9344dbd77e4c592270ef260325f95d8f666
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255797
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@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-01-04 19:17:17 +00:00
Aaron Ogata d346609d9e fix race condition with base image
refs DE-432

[build-registry-path=jenkins/canvas-lms/de-432-try-3]
[change-merged]

Change-Id: I5b83b408470fc42db58031608aa852cdbefcac19
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255506
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>
2020-12-17 17:51:33 +00:00
Aaron Ogata 34c6147bf4 split debug logs for sendSlack() length limit
refs DE-431

[build-registry-path=jenkins/canvas-lms/de-431-try-2]
[change-merged]

Change-Id: I4f7eead3f696535f29603291a5f4e2a863904026
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255503
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>
2020-12-17 17:43:39 +00:00
Aaron Ogata 802e1d854e add valuable build cache logging
refs DE-431

Change-Id: If4a4bb9ee982800239d1f516073bb4b14adb0b75
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255414
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>
2020-12-17 01:48:23 +00:00
Aaron Ogata 96289a36d2 remove no longer useful logging
Change-Id: I5ec2e44e2f1e1286cf453e96f252e59d1ab213be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255405
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>
2020-12-16 23:14:31 +00:00
Andrea Cirulli 570d54abbf abstract pull repos logic for plugins to canvas-builds
refs DE-424
flag = none

test-plan:
- Build passes
- Build fails if the pullRepos step fails

[canvas-builds-refspec=c5814b31bb8bb1f8f812def679654e458b5d295a]

Change-Id: I76ffd3d429c30876dd1897cd7307ed758e1bb7b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255326
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-12-16 22:11:32 +00:00
Aaron Ogata 0750f062d0 cache ruby-runner by MD5SUM
refs DE-421

[build-registry-path=jenkins/canvas-lms/de-421]
[change-merged]

Change-Id: Id101de0be2e69832a1ea558d7540dda6c1788bfe
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255220
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>
2020-12-16 14:35:45 +00:00
Aaron Ogata 5ba8d07034 cache yarn-runner by MD5SUM
refs DE-408

[build-registry-path=jenkins/canvas-lms/de-408-yarn-runner]
[change-merged]

Change-Id: If44f0db0907a935ae12e0b3aefbebe557e61582e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253480
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>
2020-12-15 16:11:35 +00:00
Aaron Ogata 5550d959bb Revert "cache yarn-runner by MD5SUM"
This reverts commit 6ea577d1ae.

Reason for revert: broke Jenkins

Change-Id: I8586baed2bba8878ac2f180363b2c411a5380be3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253479
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>
2020-12-15 01:10:52 +00:00
Aaron Ogata 6ea577d1ae cache yarn-runner by MD5SUM
refs DE-408

[build-registry-path=jenkins/canvas-lms/de-408-yarn-runner]
[change-merged]

Change-Id: Ifaecab20dfeb2b146dd4f642b414b666f5af4116
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255091
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>
2020-12-14 22:57:58 +00:00
Aaron Ogata 94c8143ad1 cache webpack-builder by MD5SUM
refs DE-408

[build-registry-path=jenkins/canvas-lms/de-408-webpack-builder]
[change-merged]

Change-Id: I9d50e674274b21aac92f195937865501e9f49d56
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255062
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>
2020-12-14 21:16:45 +00:00
Andrea Cirulli 177e3f9f72 move get images/tags from canvas-lms to canvas-builds
refs DE-401
flag = none

[canvas-builds-refspec=d7e62613ff4703fa6f0256f52c1b6acc5a341699]

Change-Id: I359da76681f1bf66d6ad7a8c4ba5b2ad662a25a5
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254671
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-12-14 20:55:28 +00:00
Aaron Ogata 70cb526131 split yarn from webpack-builder into yarn-runner
refs DE-412

In order to cache the webpack-builder image by MD5SUM, we need to split it into 2 pieces, yarn-runner / webpack-builder so that changes to the packages directory don’t need to reinstall all of yarn.

[build-registry-path=jenkins/canvas-lms/de-412-pt-2a]
[change-merged]

Change-Id: Ib90920d0a8330ebee0365d530c3d4a0744da779a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255044
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>
2020-12-14 18:49:51 +00:00
Aaron Ogata 6593678c19 upload JS debug image
refs DE-413

Some users want to be able to load the built JS image locally for debugging purposes. We have 3 JS jobs that run in parallel and they all build the image separately. Create a 4th JS job that only runs if this image is requested in order to only upload the image once.

[upload-js-debug-image]

Change-Id: Iaa63971dcdf7bbae0c201a5fd0c8ffc319873a22
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254871
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>
2020-12-10 22:43:16 +00:00
Aaron Ogata be41ac6b76 allow post-merge build to use relevant pre-merge images
refs DE-407

We want to ensure that the pre-merge build cache for new commits is available as soon as possible. To that end, we allow the webpack cache to attempt to use an available pre-merge built image and tag it as the post-merge image.

Also, rename the WEBPACK_CACHE_*_SCOPE variables to CACHE_*_SCOPE in anticipation of ruby / yarn usage.

Test Plan:
1. Make a webpack change
2. Build the PS with a unique build-registry-path
3. Add the change-merged directive to that PS and ensure that the pre-merge build image cache pulls the pre-existing tag, and retags it as the generally available cache image.

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-407]

Change-Id: Ibf86f94c2c91a80b0a0851a00cdea0db2822e4eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254644
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>
2020-12-09 16:26:21 +00:00
Aaron Ogata 1d1c3f4d09 fail step if repo can’t be pulled
Change-Id: I9973fcd55abbe2cd4a599110b3dd95649a3e9763
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254716
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>
2020-12-09 16:18:47 +00:00
Aaron Ogata 59b9853cb9 merge webpack-cache into single prefix
refs DE-407

Now that build arguments are included in the cache ID, we don’t need to have a separate prefix anymore for each type of image.

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-407]

Change-Id: I940bf09b856dc57a9256633fe3a96fac98219c6c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254625
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>
2020-12-08 19:47:03 +00:00
Aaron Ogata 4c75f3f7f7 optimize Setup step
refs DE-406

Test Plan:
1. Ensure normal build pulls all plugins.
2. Ensure plugin build pulls proper version

Change-Id: Icf09e3d08ac9c014d93adbc6d41e480ddb657c1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254482
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>
2020-12-08 14:16:08 +00:00
Aaron Ogata 29c8d5bffa remove obsolete gerrit_builder usage
refs DE-320

Test Plan:
1. Ensure test counts are consistent between current master and this change.

[canvas-builds-refspec=544a8f8710c148035fd39b1118e118ae963f520f]

Change-Id: I56b9ee05321528aef96c92e090cd1b484a525162
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252805
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>
2020-12-07 16:46:01 +00:00
Aaron Ogata 09c7b0ab15 tag patchset-specific webpack-cache images
refs DE-398

Currently, when the webpack-cache image is built, pre-merge builds tag the image with the same format as the post-merge default cache. This causes debugging to be difficult and also prevents the image from being cleaned up later. Fix this by prepending a suffix to each type of image, branch name for post-merge and patchset number for pre-merge.

When we do the above, we can also cache patchset-specific images for free. This will allow rebuilds to use a fully cached docker image if the webpack-related files have not changed.

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-398]
[canvas-builds-refspec=53a5214f29ec16da5ea3aea28d77d0286b1c7deb]

Change-Id: I09e0c8792c688c899ca32b934e86be65202b4102
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254068
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>
2020-12-04 15:51:40 +00:00
Aaron Ogata ba63f0b812 ensure constant load on Jenkins master
refs DE-400

[canvas-builds-refspec=edee3adfdef77f31206a6e2fea22d92579e92db3]

Change-Id: I146e6ab95cae487c39b2c1b2766732d9aaceceff
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254143
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>
2020-12-03 21:04:27 +00:00
Andrea Cirulli b9096bdbae abstract docker tag logic to docker.tagremote canvas-builds
refs DE-396
flag = none



Change-Id: I2a063c19a84e863697a5ecfecaf2d1561e9521be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254093
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-12-03 17:42:10 +00:00
Aaron Ogata 856fdfc172 improve naming of variables for consistency
refs DE-376

Change-Id: I3ebf42aff57ae4234a3b162b679e5c66fe8b279a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254058
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>
2020-12-02 16:04:18 +00:00
Aaron Ogata c6de82ee4c split ruby runner into own image
[change-merged]
[build-registry-path=jenkins/canvas-lms/ruby-runner]

Test Plan:
1. Ensure that changing gems updates the whole image.
2. Ensure that changing npm updates the webpack builder image.
3. Ensure that changing webpack files are reflected in the final image.
4. Ensure that changing packages files are reflected in the final image.
5. Ensure that there are no speed regressions in fully-cached cases.
6. Ensure that caching works as expected.

Change-Id: Icef77195ff912bc0628f27eeda6780f262a8908a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252565
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>
2020-12-01 15:08:21 +00:00
Andrea Cirulli a06b159d06 abstract changed files pattern to git.changedfiles()
move the logic related to changed files in commit check to
canvas-builds


refs DE-366
flag = none

test plan:
- Build passes
- Main Build detect if there was a change in Jenkins file in HEAD
- Local Docker dev Build is triggered if a local dev file changes
- JENKINSFILE_REFSPEC is setted if a Jenkinfiles changes

Change-Id: I497cae9654e1b71b2de5ec3325b9577b30cfeeba
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253555
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>
Reviewed-by: James Butters <jbutters@instructure.com>
2020-11-23 23:33:31 +00:00
Aaron Ogata 5ee68917a5 move around git env vars for reusablitiy
refs DE-394

[canvas-builds-refspec=43d102f7b4e50ee2af1856d70f430d16c11dfc40]

Change-Id: I6f7a839e0f751356b40bb669e22ab83da2955f6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253439
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>
2020-11-23 17:12:00 +00:00
Aaron Ogata 64b20f0c6a move coffeescript to own node
Change-Id: Ia8b95dbff31288b7e4e2b5fbf5839a92b2c5ecd8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253432
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>
2020-11-20 20:55:35 +00:00
Andrea Cirulli 084f72b5b4 move rebase logic to canvas-builds
refs DE-379
flag = none

test-plan:
- Build passes
- Simulate build over 100 commits behind fails
- Forced merge-conflict fails on rebase
- A PS on dev branch rebases on dev and then on master

Change-Id: Id715ad837221f91f4c2931c14b9b3332707c7120
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253092
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>
2020-11-20 19:23:08 +00:00
James Butters cc45c56cb3 always checkout master code
we want to always checkout master code for testing on jenkins, unless
there are changes to our build scripts then pull the gerrit refspec.

flag = none

Test Plan:
- Normal Jenkins build passes.
- changes to docker-compose.new-jeknins* causes sub builds
  to checkout code from gerrit refspec.
- changes to any file in build/new-jenkins/ causes sub
  builds to checkout code from gerrit refspec.
- Normal build with no changes to Jenkinsfile*, build/new-jenkins/,
  or docker-compose.new-jenkins* sub builds checkout master.

Change-Id: If1224a44b52b00f0f056b9552cd562809fc7eaa8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252999
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-11-18 21:48:19 +00:00
Aaron Ogata 5344111714 restructure JS jobs for ruby-runner change
refs DE-376

With the ruby-runner change that is coming, the final image will no longer include the node_modules/ assets, so we have to checkout the WEBPACK_BUILDER separately and copy in the source from the final PATCHSET_TAG.

Change-Id: Ic3c048500e00858bfa39244b308112cbc721783d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252666
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>
2020-11-17 19:25:41 +00:00
Aaron Ogata 84dd6b83bc tag patchset-specific webpack builder
refs DE-376

In order to move our JS jobs to using the WEBPACK_BUILDER_TAG, we need to tag the specific image used for that patchset.

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-376-tag-webpack-builder]

Change-Id: I03b7754b83bd273994909b5009435ebc6fe3ceb9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252987
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>
2020-11-17 19:03:47 +00:00
Aaron Ogata f6e7acb991 Revert "restructure JS jobs for ruby-runner change"
This reverts commit d893385149.

Reason for revert: broke Jenkins

Change-Id: Ic3fe2f4d4940cbad99ab6074741fa7b73ba774a0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252665
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Tested-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-17 17:05:11 +00:00
Aaron Ogata d893385149 restructure JS jobs for ruby-runner change
refs DE-376

With the ruby-runner change that is coming, the final image will no longer include the node_modules/ assets, so we have to checkout the WEBPACK_BUILDER separately and copy in the source from the final PATCHSET_TAG.

Change-Id: Ide3885f41d7ee21f4034331c204c2cafdc76aa28
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252922
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>
2020-11-17 15:33:33 +00:00
Aaron Ogata f2f3e924c0 split final image from webpack-runner image
refs DE-376

Prepare for the ruby-runner change. Prevent the patchset-specific layer(s) from being included in the cache images, since they are virtually guaranteed to be invalidated.

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-376]

Change-Id: Ib97fd7f657830d2ea133159730c3c03d6aa7d919
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252878
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>
2020-11-16 20:57:29 +00:00
Aaron Ogata 82efbe4e8a send patchset link in cache report
[change-merged]
[build-registry-path=jenkins/canvas-lms/better-cache-report]

Change-Id: I9038f2a89ea1f0119dfd76c5d917c4446d8fe79c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252399
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>
2020-11-10 20:36:09 +00:00
Aaron Ogata 0070f199be share dependencies cache image between builds
refs DE-370

[change-merged]
[build-registry-path=jenkins/canvas-lms/de-370]

Test Plan:
1. pre-merge build uses cache
2. post-merge build uses cache for post-merge image
3. post-merge build uses cache for pre-merge image
4. post-merge build reuses webpack-builder for pre-merge

Change-Id: Ie5d5eaad2d9da1f324a87020cb70658d42b0bf94
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252353
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: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-11-10 19:27:39 +00:00
James Butters e430225103 stable branches pull corresponding plugin stable branch
when using stable branches, pull all plugins from same branch.

Test Plan:
- Jenkins build passes
- Jenkins build from stable branch pulls stable branch plugins
- Jenkins plugin build from branch pull canvas and other plugins
  from same branch.
  - test with canvas-lms-refspec commit flag and without

Change-Id: I07d62f9c75413fe2a0c035b43a14634baa814eef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/252250
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-11-09 19:34:59 +00:00
Andrea Cirulli 6270c915d6 move the making stage logic in jenkinsfile to canvas-builds
Moving logic related to the creation of a stage in Jenkinsfile to
canvas-builds.

refs DE-334
flag = none

test-plan:
- Build passes using the new makeFromJob function
- Build behaves as expected that is the same way the current
Jenkinsfile works
- Ensure CDC works forcing a migration
- Ensure FSC works forcing failures

Change-Id: I70b5e68e03166c5a34bf7542c10e8751e15981d6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250770
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-11-09 15:46:00 +00:00
James Butters c979373f50 other branches building on jenkins
[canvas-builds-refspec=de97029ae53f268357222cbdea908873f5c2f7d7]

dev branches will rebase with their head, then rebase with master.
stable branches no rebase.
any other branches will follow the stable branch workflow.

flag = none
closes: DE-18

Test Plan:
- Normal build passes
- dev branch build rebases correctly
- image tags are working with branches, replacing
  forward slash with underscore.

Change-Id: Ibf3f4b97c42b0aea5d49f14bb498a09dae7c091f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251756
QA-Review: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
2020-11-09 14:28:55 +00:00
Aaron Ogata ff0792b354 fail main build if Jenkinsfile differs from master
refs DE-361

Test Plan:
1. Normal build fails for changes to Jenkinsfile
2. Normal build fails for changes to Jenkinsfile.*
3. Jenkinsfile build works for changes to Jenkinsfile via manual trigger
4. Jenkinsfile build works for changes to Jenkinsfile.* via manual trigger


Change-Id: Ie61120a4b1798b39290ba879d28a4614ab57450e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250679
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: James Butters <jbutters@instructure.com>
2020-11-05 17:05:30 +00:00
Andrea Cirulli 11dae30497 successes calls removal
remove all the logic around successes lib from canvas-builds

refs DE-355
flag = none

test-plan:
- Build passes if we use a canvas-builds version that does not
include successes lib
- Build rerun all stage when retriggered from a forced failure
- Build passess

Change-Id: I0127f9992a2a307a953f6cbeac5450a17535801e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251795
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-11-05 15:16:49 +00:00
Aaron Ogata 0fcf8924d0 Revert "fail main build if Jenkinsfile differs from master"
This reverts commit fa3f83d969.

Reason for revert: broke build

Change-Id: I07c1692624aecb12e3866be871b546ff6c80a4eb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250678
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-11-05 14:52:44 +00:00