Commit Graph

47 Commits

Author SHA1 Message Date
Aaron Ogata 70a0336523 use flakey network protection for js job
Change-Id: I9450cb2e94ac9542dde1219324cec5d348032c0c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/258326
Reviewed-by: James Butters <jbutters@instructure.com>
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-02-08 15:48:17 +00:00
Aaron Ogata a8102ab205 cache JS runner image
refs DE-490

Change-Id: I83f15e273f0b6fa059ab259780db4f3ac026805f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/257869
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>
2021-02-03 19:30:30 +00:00
Ahmad Amireh 46f8efd61f modernize canvas_quizzes
fixes FOO-1409
flag  = none

no more client_apps, canvas_quizzes now lives as part of canvas-lms
proper inside app/jsx/, which makes the build leaner and leaves us with
one less thing to reason about

logical changes:

- converted from AMD to ES modules
- upgraded to recent react + react-router
- dropped RSVP in favor of native Promises
- used CanvasModal instead of home-grown Dialog
- removed dead code; notifications in particular were fishy as there had
  no dependents at all and did not even show up in the graph
- ported tests to Jest, added more unit ones and two integration ones
- removed "config.onError" and now throws errors where appropriate
- disabled console statements in non-dev

:: test plan ::

- create a (old-school) quiz containing all types of questions
- as 3 distinct students, take the quiz and try to randomize your
  answers

at this point it's helpful to have a reference to compare the screens; I
replicated the quiz on my production sandbox for this

- go to /courses/:id/quizzes/:id/submissions/:id/log
  - verify it looks OK
  - click on a specific question in the stream and verify the question
    inspector widget works OK
  - go back to stream and push "View table"
  - verify the table and its controls are OK

- go to /courses/:id/quizzes/:id/statistics
  - verify it looks OK
  - click on ? in the discrimination index chart and verify it displays
    a dialog with help content
  - click on "X respondents" in one of the charts and verify it displays
    a dialog with the respondent names
  - verify the interactive charts do interact as expected (no logic
    changed here so just a quick glance)
  - link to "View in SpeedGrader" for essay-like questions works

Change-Id: I79af5ff4f1479503b5e2528b613255dde5bc45d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/256118
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2021-01-14 22:45:10 +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
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
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 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
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 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
Andrea Cirulli ba4ad02c38 abstract checkout code in jenkinsfiles
refs DE-351
flag = none

test-plan:
- Build passes
- Test FSC is working

Change-Id: Id3844dd12600e5d3a80d267bf67916c4d43d2548
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251743
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-04 20:58:00 +00:00
James Butters 986c935bdf checkout Jenkinsfile from master
These changes need to be accompanied by changes
to Jenkins config:
  - main-canvas-postgres-12-ruby-2.6 and
  main-canvas-postgres-12-ruby-2.6-postmerge, SCM
  refspec changed to master
  - sub-builds scm changed from canvas-lms-refspec
  to JENKINSFILE_REFSPEC defaulting to master
  - add Jenkins parameter JENKINSFILE_REFSPEC to sub-builds
  - add new Jenkins build for main Jenkinsfile changes
  - main build don't trigger on Jenkinsfile changes using
    forbidden path.

Testing once merged:
- verify builds without Jenkinfile changes pull the master
  version of Jenkinsfile
  - verify sub-builds as well
- verify gerrit with Jenkinsfile changes triggers new build
  - verify sub-builds get Jenkinsfiles from gerrit not master
  - test a combination of Jenkinsfiles, not just the main one
  - verify main build is not triggered
- run a plugin build without canvas-lms-refspec
- run a plugin build with canvas-lms-refspec

Change-Id: Ic6be8b446f80d57f7b0f25c77e6cffb959e03236
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251634
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: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-11-03 03:08:08 +00:00
Aaron Ogata 2dcc3df114 introduce canvas-builds-refspec commit flag
refs DE-349

[canvas-builds-refspec=f04c7902ccabadb61cee13fa93f09b1184925b84]

Test Plan:
1. Build pulls master when flag does not exist
2. Build pulls specified commit when flag exists
3. Build pulls master for post-merge when flag exists

Change-Id: I365efd3a305d08f7a3df76fd44799756104b4c1f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251635
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-02 19:33:54 +00:00
Andrea Cirulli 9127a73426 add timeout to cleanup function callback executed by protectednode
in some cases if the node removal happened after the code checks for a
node removal event the cleanup steps are executed and they can cause
extremely long running build. A fix to that is the introduction of a
timeout in the cleanup function.

refs DE-306
flag=none

test-plan:
- Canvas-lms build passess

Change-Id: Ia739bbdc1b72eac8ae7e95d5d36ebd698ce6d56e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249252
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
2020-10-05 19:26:58 +00:00
Aaron Ogata dbf584aafb fix JS failures
After upgrading to Ubuntu, Chrome takes up more memory than it does on Alpine, and the node becomes overloaded, resulting in timeouts. Reducing the coffeescript split to 1 node results in no timeouts after 40 test runs with no speed regression.

refs DE-260

Change-Id: I45efbfecb1a2fc25a7d89f91de925f2b6e84f25a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247622
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@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>
2020-09-14 16:24:01 +00:00
Aaron Ogata 4b796a818e restore junit parallel uploads
refs DE-219

Test Plan:
Run the build several times and ensure the test count is consistent

Change-Id: Id773ef534efa4514543596fdc53bac565a5bd349
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/245762
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2020-08-24 14:37:28 +00:00
James Butters 89bc0fa2e0 iterate through xmls for junit upload
seems to be a bug with jekins uploading bulk of junit xmls, iterating
through the xmls and uploading one by one gives an accurate junit
report.

closes: DE-171
flag = none

Test Plan:
  -Compare mulitple test runs for consistent test count

Change-Id: I7fef862bfcce00e2f60458c6c8c3fbe713b3d39c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/244199
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-08-04 20:54:01 +00:00
Aaron Ogata 35d6f26216 protect JS jobs against spot instance failures
refs DE-139

[skip-docker-build]

Test Plan:
1. Ensure job passes with 0 node removals
2. Ensure job retries upon node removal
3. Ensure job runs finally / clean-up block(s) correctly

Change-Id: Ib728acf0600ee5c42d5be8c72c00da4b29e570ca
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/243215
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
2020-07-22 21:40:35 +00:00
Aaron Ogata a65d266b36 spec: split coffeescript job
refs DE-128

Test Plan:
1. Ensure that the number of tests run per JS job is the same
2. Ensure that test reporting works correctly

Change-Id: I0e7f3d37627a7d13d108cf562d001bcf41e2ea8a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242560
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-07-17 17:39:35 +00:00
Aaron Ogata ff78f2bf0b automatically split jsg nodes
refs DE-123

Test Plan:
1. Ensure that the number of tests run per JS job is the same
2. Ensure that test reporting works correctly

flag = none

Change-Id: If25f6f4fe6af6d8982b5aed62c61c65b1d4daca9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242341
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-07-15 21:50:27 +00:00
Aaron Ogata 1153f0aa41 archive test results report as artifact
Change-Id: I804f98167ab236e25019dac9fde878bfd83ef8a3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242228
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: Alex Slaughter <aslaughter@instructure.com>
2020-07-09 03:19:49 +00:00
Aaron Ogata 7fdf364dff split JS job to reduce timeouts
Jest automatically parallelizes tests, and is causing the node to have too high of a load. Splitting this into its own job reduces our timeout failure rates significantly.

Test Plan:
1. Ensure JS test results are accurate
2. Ensure JS skips build execution if previously successful

refs DE-38

Change-Id: Iaabf83bac02427d2686ff407209b3496cf0ca485
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/242095
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-07-07 21:00:24 +00:00
Aaron Ogata 06c7e3ee86 protect against retriable errors in docker pull
refs DE-25

Test Plan:

It’s hard to get Jenkins to intentionally fail with this error, but to test the retry logic we can use the following alternative:
1. Modify the shell script to look for “requested access to the resource is denied” or some easily reproducible error.
2. Run “./docker-with-flakey-network-protection.sh pull invalid_image”
3. Verify that the retry logic works correctly
4. Verify that the happy path works correctly

flag = none

Change-Id: I4ec53d639dbc8d25fff526792a02b8fe6861f564
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241671
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-07-02 14:03:48 +00:00
Aaron Ogata 16c8df703a only pull necessary docker images for JS build
flag = none

Change-Id: I65b9ae8e72884681fff32b926b380417ee1eac60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/241280
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2020-06-26 20:28:24 +00:00
Rex Fleischer c5c3820042 use shared library for configuration
fixes: CCI-389

Test-Plan:
we need to run all the builds that we can for this:
- the current build needs to pass
- main-for-plugins needs to be ran
- master-bouncer
- dive?
- translations

Change-Id: Iae7f9dad7668b90653a0b9a8edc20ec69fa109c3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/240345
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Ryan Norton <rnorton@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-06-18 18:36:49 +00:00
James Butters 335f6c8c46 spec: more parallel of docker, better even
using the option project-name with docker-compose allows
us to have all services separate for each group of tests.

test plan:
Jenkins passes all build
logs are copied out of containers for archiving/test reports
run with force-failure flag


flag = none
closes: CCI-341

Change-Id: I99820f64023dde17a1b75e76bcec2dfe84529e91
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236029
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-05-11 15:07:18 +00:00
S. Jacob Powell 263d065a93 Add force-failure flags for selenium and rspec
test plan:
Here is a forced failure for all (force-failure):
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Fmain-canvas/detail/main-canvas/28534/pipeline/363

Here is a forced failure for rspec(force-failure-rspec):
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Fmain-canvas/detail/main-canvas/28558/pipeline

Here is a forced failure for selenium (force-failure-selenium):
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Fmain-canvas/detail/main-canvas/28559/pipeline

Here is a forced failure for JS (force-failure-js):
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Fmain-canvas/detail/main-canvas/28561/pipeline

Feel free to run these locally, just pass in an env var to the test when
running it, and set it to 1 (FORCE_FAILURE=1 <test command>)

fixes CCI-316

flag = none

Change-Id: Ida6e25f5c1df71074ea26298c8f1b640df1b7a45
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/233265
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-04-22 18:42:53 +00:00
Derek Bender 9d82924df1 Add timeouts to Javascript builds
Closes: CCI-327

flag = none

Test plan:
- builds pass, there's no simple way to make these timeouts get
  triggered but they're also dead simple.

Change-Id: I6ef1abcd8360ae84c7164ced4194f0f54d12667b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/234307
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-04-16 16:53:53 +00:00
Derek Bender 68d03c9e94 Add verbose flags to builds
Closes: CCI-248
flag = none

Test Plan: builds pass

Change-Id: Ia0421d4036eb1655a10497363e0327779c69746b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/229446
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
2020-03-18 13:41:00 +00:00
Derek Bender 78123c4cb6 Multiple rubies and postgres on Jenkins
Closes: CCI-214
flag = none

Test plan:
- The following builds pass:
  - main-canvas
  - main-for-coverage
  - main-canvas-postgres-12
  - main-canvas-ruby-2.6
  - main-canvas-postgres-12-ruby-2.6

Change-Id: I253d0cc8f0a808d8453fd3cbe1cfc3400ec8b12a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227304
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
2020-03-10 22:30:51 +00:00
Derek Bender f682c195c8 Filter printenv in jenkins output
Filters keys ending in _KEY or _SECRET

Closes: CCI-202
flag = none

Test Plan:
- keys like GERGICH_KEY are no longer printed in the builds

Change-Id: I3c6b7cc882ba36b291dc44ac5fe9c958aa24cd60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/224898
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-02-04 14:14:08 +00:00
Rex Fleischer f729a6a63e add sentry env to js tests when running coverage
note that deprecation aggregation should only
happen when running coverage because of memory.

fixes: CCI-190
flag = none

Test-Plan:
ensure that things get to sentry when running coverage

Change-Id: I8916cd050843c231161693b0e072687cf27120f3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223994
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-28 16:45:48 +00:00
Rex Fleischer a68dfbdd9e nightly coverage report build
fixes: CCI-199
flag = none

test-plan:
run the build manually and ensure it publishes the coverage report

Change-Id: I7fac17a850edf5e748883aa9ddf565c6d1285b12
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223834
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-24 15:45:58 +00:00
S. Jacob Powell e52fe12c36 Allow forcing a failure in each JS stage
This is a great canary for making sure we
report failures correctly,
when they happen.

test plan:
With the force-failure flag,
it should fail all JS stages
Otherwise, they pass like normal.
The flag sets the "FORCED_FAILURE"
environment variable to "true"
to fail the stages.

See
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Ftest-suites%2FJS/detail/JS/5269/pipeline
For an example of this flag being set.

fixes: CCI-188

flag = none

Change-Id: I32a51550d17140c6ed8c5423a31f98d7e71282bc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223294
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-01-20 21:18:25 +00:00
Rex Fleischer 2b00f52086 make coverage run based on build param
flag = none

Change-Id: I557dcb86e7693ee9a4596056fb55262081d3980e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223674
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-17 17:20:04 +00:00
Rex Fleischer 27663b0b02 copy coverage only when tests pass
fixes: CCI-193
flag=none

Test-Plan:
make sure the builds work

Change-Id: Ia070f61061a3a859e33b8764cc6beda21e7ce37c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223500
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-16 22:18:31 +00:00
James Butters 59b40491bf improve the junit testResults fileset
we were seaching the entire repo for any xml to publish,
this change tells it to only search the tmp directory
since that is where we are copying those xmls to publish.

flag = none

Change-Id: Id35d78c808853c68289a1e9bc80b055b0b204df2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/223438
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2020-01-16 15:50:35 +00:00
Rex Fleischer 58e4cab04a pull js coverage from test runs and upload an aggregate
[force-run-coverage]

fixes: CCI-112
flag = none

Test-Plan:
find the coverage is published at:
https://code-coverage.inseng.net/canvas-lms-js/coverage/

Change-Id: I43757aa7b137f2494822743e860f91194a8d0ce6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222083
Reviewed-by: Jacob Powell <spowell@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2020-01-15 19:36:57 +00:00
S. Jacob Powell 85fe2246e9 Ensure all JS stages output test results
test plan:
See the following link for examples of failing in each stage,
as well as the test output being correctly loaded into
the Tests tab:
https://jenkins.inst-ci.net/blue/organizations/jenkins/Canvas%2Ftest-suites%2FJS/detail/JS/5082/pipeline

fixes: CCI-178

flag = none

Change-Id: I43c16ce7b589eb69cbe266c0929a722325ece2cf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222604
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-01-15 06:01:08 +00:00
S. Jacob Powell 24850ffabd Get JS test failure outputs in Jenkins
test plan:
Any JS failures will show up in the tests tab

fixes: CCI-130
flag = none

Change-Id: I9822d0817e650cb6ea691d0d483d366449cce7d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/222332
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
2020-01-08 18:22:24 +00:00
Rex Fleischer ce69038367 add canvas quizzes tests
fixes: CCI-137
flag = none

Test-Plan:
make a change to the canvas quizzes app and see if the build
works as expected

Change-Id: Ib5350cf2dfa9118ec203233a6d3f617ae7cb6394
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220755
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-12-16 22:54:30 +00:00
Rex Fleischer 4e2ce175d8 allow the docker-cleanup script to fail
fixes: CCI-151

flag = none

Test-Plan:
make sure it runs through the pipeline correctly

Change-Id: Ib1b76010b8122dcb76d9f257a1f2d674f6afc2c1
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220247
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Robert Lamb <rlamb@instructure.com>
QA-Review: Rex Fleischer <rfleischer@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-12-12 16:26:24 +00:00
Rex Fleischer 84cb85fdd7 add cleanup to jenkinsfiles
fixes: CCI-148

flag = none

Test-Plan:
look through the logs on each build and ensure the pre-clean runs

Change-Id: I1e10ab43deeb4dbcaa7b9c4f08ea3737675ebdf4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220000
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
2019-12-10 17:14:57 +00:00
Robert Lamb 88c7f56502 spec: Clean up Jenksinfile for JS test suite
Test plan: Build still passes and runs all JS tests.

Change-Id: If5a379feaf0c67c59c83ab67d1db7b56ffdbf6c0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219113
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2019-12-03 22:16:32 +00:00
Robert Lamb 75054ff4f5 Rename build/new-jenkins/frontend/ to js/
Fixes: CCI-120

Test plan: New Jenkins JS build passes

Change-Id: I772e1a2d2a30d62cfcb875d1c6c08e2177f9f311
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218959
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
2019-12-03 00:56:38 +00:00
Robert Lamb f98fe4fae7 Rename Frontend build to JS and oncomment
fixes: CCI-120

test plan: Jenkins build passes and runs the JS test suite

Change-Id: If924af6c0eceece51f826c4cd337735d24081b1e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/218463
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
Reviewed-by: S. Jacob Powell <spowell@instructure.com>
2019-11-27 17:20:25 +00:00