Commit Graph

80 Commits

Author SHA1 Message Date
Aaron Ogata f87f9b72e7 report feature flag changes for approval
refs DE-777

Change-Id: I4bfa74ec75894eb93660e2e8ef0e1d75ec51d927
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/269865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
Product-Review: Ryan Norton <rnorton@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
2021-07-26 13:40:27 +00:00
Kyle Rosenbaum 3ec1d45704 fix jenkins dev branch builds
we had a typo in call function

test plan:
- dev builds rebase successfully

Change-Id: I81c1334f05e2f6083d5e1d83147187877a547357
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/268469
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-07-13 23:12:22 +00:00
Kyle Rosenbaum e2eb4fe25a remove calls to withStarlordDockerLogin
refs DE-719

withStarlordDockerLogin was needed for EKS, but with EC2
no docker login is needed.

test plan:
  - EC2 builds continue to work as expected

Change-Id: Icbd3f28bf2ec6ec52c429c1eaf8fc6ce7bddd46b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267714
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-06-23 22:02:41 +00:00
Kyle Rosenbaum 5677d7531d remove docker_base podTemplate usage, cleanup nodeRequirements usage
refs DE-718

test plan:
  - EC2 builds continue to work as expected

Change-Id: Ibed627a4e1d4b1e40520036df2b8a4e1d29d5fcc
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267159
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
Product-Review: Kyle Rosenbaum <krosenbaum@instructure.com>
2021-06-22 15:19:48 +00:00
Aaron Ogata 682da3f865 convert vendored gems to extendedStage
refs DE-716

Change-Id: I7b3da7250a5c7ba815bae54ce91505c5b9b2a70b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267160
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-06-15 18:21:22 +00:00
Kyle Rosenbaum 0e6ec8ff2e remove EKS specific keys from nodeRequirementsTemplate
refs DE-717

test plan:
 - EC2 builds continue to work properly

Change-Id: I1bc92605cae1f4b246752c3fb032961b65c80bf6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267156
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-06-15 17:43:16 +00:00
Aaron Ogata 9c6e169d55 convert contract tests to using docker bridge network
refs DE-715

Test Plan
1. Contract Tests passes

[canvas-builds-refspec=755cccfd95de9aafca779c0a1f5697fc9eb40b6f]

Change-Id: I077ae015ca7c50cf4d8774958438a948649c2fbf
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267131
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-06-15 16:37:49 +00:00
Aaron Ogata 3dbf596e03 convert contract tests to EKS-compatible syntax
refs DE-707

Change-Id: I0d823124c25b879ff3c572240720f39ba9371909
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267009
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-06-15 13:57:51 +00:00
Aaron Ogata 3998b7a026 convert contract tests to extendedStage pattern
refs DE-707

Test Plan
1. Test count aligns with current master
2. Outcomes publish API step doesn’t publish on pre-merge and does publish on post-merge

Change-Id: Ic69f9b74137ffd36fc5a0964e5880a59457fca36
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266983
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: Ryan Norton <rnorton@instructure.com>
2021-06-14 15:29:15 +00:00
Aaron Ogata 5d33184845 convert linters to EKS-compatible syntax
Test Plan
1. Linters works on EKS
2. Linters works on EC2
3. Linkers runs appropriate stages
4. Yarn changes run appropriate stages
5. Groovy changes run appropriate stages
6. Linters reports back to patchset via gergich

Change-Id: I6c50ab5a6be2e1b7031b56c70ee6e2727e92580e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266509
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-06-11 20:04:35 +00:00
Aaron Ogata 9be94c6f23 restructure filesChangedStage for reusablity
refs DE-706

In order to access the buildConfig variables without duplicating constants in other shared library files, restructure this stage to be in its own files, and provide helper methods for getting / setting changed file state.

Test Plan
1. Normal build runs appropriate stages.
2. Local docker dev changes runs appropriate stages.
3. Groovy linter changes runs appropriate stages.
4. Migration changes run appropriate stages.
5. Spec changes run appropriate stages.
6. Yarn changes run appropriate stages.

Change-Id: I72e35d2b45d4842e195cc27351327a6907b073b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266957
Reviewed-by: Kyle Rosenbaum <krosenbaum@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-06-11 18:57:46 +00:00
Aaron Ogata 90dff6b5ea remove runAsUser root hack
refs DE-706

Test Plan
1. JS job passes

[canvas-builds-refspec=84d438a4b44cd177a0734d468a801fd1a15a333c]

Change-Id: I124a34dc26c018d4205ec32116490052a8655e6a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266849
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-06-11 16:06:12 +00:00
Aaron Ogata 3400c31a83 convert dependency check stage to using npm
refs DE-706

The snykSecurity() plugin doesn’t seem to work on EKS, fortunately we can convert it to using the npm package instead which also reduces complexity.

Test Plan
1. Dependency check runs and reports results to snyk on EC2
2. Dependency check runs and reports results to snyk on EKS

Change-Id: I317ffe8c90cda6754a2ad5df7227224450b86546
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266779
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-06-10 14:10:41 +00:00
Aaron Ogata 0fbf4b027f convert JS job to EKS-compatible syntax
refs DE-687

Convert jobs over to EKS-compatible syntax in order to perform AB testing on EKS builds.

Test Plan
1. EC2 builds JS job with correct number of test results
2. EKS builds JS job with correct number of test results

[canvas-builds-refspec=3f9a35ef55d38ac885c3a4daef03e7e19cd8f4e7]

Change-Id: I350f2983eebeda4aa634daba0579389b3b987c6b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265580
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-06-07 23:05:24 +00:00
Aaron Ogata c52da6c883 move JS distribution to jsStage
refs DE-687

Test Plan
1. Test counts align with current master

Change-Id: I1900817b51f0857c6e22ea8361683cc08f61a19f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266448
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-06-07 16:07:31 +00:00
Aaron Ogata fe5d819183 stop passing delegate manually as function argument
refs DE-687

Test Plan
1. JS test count equals master test count
2. "expected to call" CPS warning doesn't appear

[canvas-builds-refspec=5a9ac2821ed203759e4f0e37f579774a210c81ba]

Change-Id: Id5e5c8c3b80ad5483f8b08913806b2195401e334
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/266238
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-06-03 19:58:12 +00:00
Aaron Ogata 37da99de3c move js stages to shared library
refs DE-687

Test Plan
1. All JS test counts align with latest post-merge

Change-Id: Id803db3f13999e149ecb2dfed32efc66dac61c76
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265419
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-05-21 15:20:26 +00:00
Aaron Ogata e76b7d4274 move docker copy operations to tearDownNode
refs DE-687

Test Plan
1. All test counts align with master for JS jobs

Change-Id: Iffe8ca4f873429b258269d371da3c67c1363a0e4
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265395
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-05-20 20:16:53 +00:00
Andrea Cirulli 70bb73c35b add jenkins file to the groovy linter stage
refs DE-690
flag = none

test-plan:
- Build passes
- Build trigger groovy linter stage if a change to Jenkinsfile is
made
- Build fails if a Jenkinsfile has linter issues

Change-Id: Ifdabb4f28f6124afcb6621844375a8de4b35d453
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265279
Reviewed-by: James Butters <jbutters@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-05-19 20:51:13 +00:00
Andrea Cirulli 796257539e fix linter rules
Fix following linter issues:
- ParameterName
- CouldBeSwitchStatement
- UnusedMethodParameter

refs DE-690
flag = none

test-plan:
- Build passes
- QA build that triggers FSC and executes the spec changed

Change-Id: I11baf5094e96d33bc6be7f5f03d680f34cc1d026
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265266
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-05-19 15:43:33 +00:00
Brian Watson 62db8b77ee Add parsed results as csv to axe selenium
flag=none

closes OUT-4438

Test-plan:
- see axe build corresponding to latest PS
- in Build Artifacts under tmp, there should be axe_results.csv
  compare it against Test Results and verify that specs are mapped
  to specific a11y violations
- in Build Artifacts, verify that rspec_results with nested xml files
  are archived for axe build but not for main build

Change-Id: Ic8c9ccbe9350bde0d0fd6914f16330ca5155a95b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264673
Reviewed-by: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Pat Renner <prenner@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Brian Watson <bwatson@instructure.com>
Product-Review: Brian Watson <bwatson@instructure.com>
2021-05-18 22:56:14 +00:00
Aaron Ogata a1a55bd406 Revert "split rspec / selenium stages by thread"
This reverts commit c131c39e3d.

Reason for revert: broke Jenkins

Change-Id: I9b6f25f4b6f2128cae7e763073d3a3eadcd0ea30
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264748
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-05-18 13:55:22 +00:00
Andrea Cirulli 7a01e4977e add groovy linter stage
refs DE-643
flag = none

Add a linter stage for groovy to the main build:

- Build passes
- Build passes and trigger groovy linter stage if no
linter errors are present
- Build fails on groovy linter stage if a linter issues
is found

Change-Id: I8f3c2f2f577227854e19b1af83400018a4c792db
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265024
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>
2021-05-17 19:43:03 +00:00
Aaron Ogata 073788ed9d movs JS setup / tear down functionality to new pattern
refs DE-687

Test Plan
1. Each JS stage executes all tests
2. Each JS stage build report summary works for failures

Change-Id: I2f9c9347ff6caac22ef3785e6a1a298870961f79
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265049
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
2021-05-17 18:08:13 +00:00
Aaron Ogata c131c39e3d split rspec / selenium stages by thread
refs DE-644

[canvas-builds-refspec=c30dc5a5768e38eb7ef483a6b8b5e7c30af8a25d]

Test Plan
1. RSpec / Selenium use correct number of nodes and run correct number of tests
2. RSpec / Selenium retry according to RERUNS_RETRY value
3. Build Summary Report generates correctly

Change-Id: I886e41a8712bda5a98f58eee0ba42d034a08db25
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265014
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-05-17 14:11:02 +00:00
Aaron Ogata 3f929c0bd2 move rspec / selenium runner to rspecStage
refs DE-444

Test Plan
1. RSpec / Selenium use correct number of nodes and run correct number of tests

Change-Id: I8d6524620e2407ee5a58cb3edb6d7a691ab92763
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265008
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-05-14 19:03:02 +00:00
Aaron Ogata 782b134074 move rspec / selenium tear down hooks to correct location
refs DE-444

Test Plan
1. RSpec / Selenium use correct number of nodes and run correct number of tests
2. Build Summary Report shows test results + HTML page

Change-Id: Icf39240c8f26e78024f4211ed7b12d3c61426b70
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265005
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-05-14 18:30:50 +00:00
Aaron Ogata e74037bf87 move rspec / selenium node setup functions to new format
refs DE-444

Test Plan
1. RSpec / Selenium use correct number of nodes and run correct number of tests

Change-Id: Ie95d0a504ae52ffa8e3540f3bc4facbed9d4fcad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265000
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-05-14 18:00:35 +00:00
Andrea Cirulli 17497b474c fix/skip linter rule issues
fix and skip following linter rules:
- PublicInstanceField
- NoWildcardImport
- UnnecessaryGString

test-plan:
- build passes

Change-Id: I9ad968b6770bf57f0b19e8bd1d04b878301a858b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264998
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-05-14 17:37:29 +00:00
Aaron Ogata 80330a434a remove unnecessary rspec / selenium stage runner wrappers
refs DE-444

Test Plan
1. RSpec / Selenium use correct number of nodes and run correct number of tests

Change-Id: I6a58419513becc2cf587b65e05df3ed75ff6fe43
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264996
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-05-14 17:19:53 +00:00
Aaron Ogata d7bb432cef move environment variables to correct location
refs DE-444

Test Plan
1. RSpec / Selenium obey force failure flag
2. RSpec / Selenium retry once upon test failure
3. RSpec / Selenium use correct number of nodes and run correct number of tests
4. Parallel log build works

[canvas-builds-refspec=5d46b7af0f1d5beb710b02863cf7b98689d0c332]

Change-Id: I7dbc2548f949ec307dec8e7d73d041ab24256072
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264978
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-05-14 17:05:57 +00:00
Aaron Ogata e6e2759196 integrate rspecConfig() and seleniumConfig() into their callers
refs DE-444

Test Plan
1. Rspec / Selenium use appropriate number of nodes
2. Rspec / Selenium retry only once
3. Force failure flag works

Change-Id: I2fde387b410b895f9cf0cade9e5986ee34dd8391
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264904
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-05-13 15:23:22 +00:00
Aaron Ogata 892b3bee6a move uploadParallelLog call to associated job
refs DE-444

This function is only used in one place, and we need to remove this file, so just integrate it into the calling job itself.

Change-Id: Ibda768b6672e1090947e72b1dd820662d895ab7b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264902
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-05-13 15:10:43 +00:00
Aaron Ogata 71207a592f remove unused MAX_FAIL variable
refs DE-444

This extra parameter isn’t used anywhere, so remove it.

Change-Id: I487e7a6d73fdd218f87263fdf1a8970057ae3ef8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264900
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-05-13 14:40:37 +00:00
Aaron Ogata 9e10e34935 prepare rspec / selenium stage generation structure
refs DE-444

Modify the generation of these stages to align with our new extendedStage() conventions in preparation for a refactor of how the stage internals are implemented.

Test Plan
1. All RSpec stages are queued and run the correct tests
2. All Selenium stages are queued and run the correct tests
3. Parallel log build works correctly

Change-Id: Id0a35f84ddf8471f1f06eede608d6ad4dc964dea
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264870
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-05-13 14:23:55 +00:00
Aaron Ogata dd382af5d9 remove unnecessary patchsetTag parameter
refs DE-444

This extra parameter isn’t needed, the cases that use it already have access to env.PATCHSET_TAG.

Change-Id: I60778b9efaccb49c4a2ca64ab0cf37c2f3f83c1e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264874
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-05-13 14:14:20 +00:00
Aaron Ogata 03ed3ace4b remove old coverage code from rspec / selenium
refs DE-462

As part of the EKS transition, we need to restructure the rspec / selenium stages. The coverage code is currently not working and will get in the way of this transition. Remove it for now and refs the coverage restoration ticket so when we bring back the coverage build the code is here for viewing.

Change-Id: I137e7c20674542aac31184c6fd7aa648b6656362
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264859
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-05-12 22:08:32 +00:00
Kyle Rosenbaum 347f73b172 remove docker_processes from core rspec and selenium test runs
refs DE-467

it is no longer possible to spin up multiple docker containers
ona  single rspec or selenium agent when running tests. parallelization
is now exclusively done through multple rspec processes on
a single container.

test plan:
- setting docker_processes ENV variable has no effect
- settting rspec_processes still runs multiple test threads
- tests continue to run as expected given that docker_processes has
been set to 1 for multiple months.

Change-Id: I604d953a71ad220373b6a71d558f46bff29f820e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/263701
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: James Butters <jbutters@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
2021-05-12 19:47:12 +00:00
Andrea Cirulli 5f76e48163 fix UnusedMethodParameter linter issue
refs DE-643
flag = none

test-plan:
- Build passes

Change-Id: I4e00b018158c33f823bae8ebeea1f4e4c37721d3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264706
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-05-11 20:13:03 +00:00
Aaron Ogata 35a01d7e8c move dependency check stage to linters node
refs DE-670

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. As part of this work, transition the dependency check stage to running as part of the Linters set of stages.

Test Plan
1. Dependency Check runs correctly on post-merge build
2. Linters runs correctly on pre-merge build

Change-Id: I16d9fb63b40b6eb9f8e24b4f5c4253538e91bbf0
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264653
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-05-11 14:25:37 +00:00
Aaron Ogata db761b4f69 Revert "move dependency check stage to linters node"
This reverts commit 88829e1074.

Reason for revert: broke post-merge

Change-Id: I91384fd9c2a698eaabe02d1c63a959b8846a749b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264016
Reviewed-by: Kyle Rosenbaum <krosenbaum@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>
2021-05-10 23:47:19 +00:00
Aaron Ogata 88829e1074 move dependency check stage to linters node
refs DE-670

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. As part of this work, transition the dependency check stage to running as part of the Linters set of stages.

Test Plan
1. Dependency Check runs correctly on post-merge build

Change-Id: Ifc9790e481e7d6cf7ba81e9f78b804a955f266b8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264589
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-05-10 23:32:31 +00:00
Aaron Ogata 0194f77f2e pre-pull linters image as part of setup
refs DE-670

By pulling the image as part of setupNode, we get flakey network protection and also only pull the image once per build, instead of once per parallel stage.

Change-Id: I77b2d63a3ab971067604c30001387bbf67ad6c4a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264590
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-05-10 23:31:51 +00:00
Aaron Ogata f8f556d866 split linter stages into own node
refs DE-670

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. As part of this work, transition linter stages into their own node as a sibling stage to Builder.

Test Plan
1. Linters run correctly
2. allow-stages directive works with Linters
3. allow-stages directive works without Linters

Change-Id: Ieae121ae3e79b5e30864f9060042e4453a8093e6
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264569
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-05-10 21:31:15 +00:00
Aaron Ogata 8f2885814c merge master bouncer into Linters parallel stages
refs DE-670

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. As part of this work, transition Master Bouncer to using the Linters image since it uses Git.

Test Plan
1. Master Bouncer runs correctly

Change-Id: I8aa6d2f589326c4f88e313d423f023ec9af8a79f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264555
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-05-10 20:04:09 +00:00
Aaron Ogata c16a81dd02 always upload Linters image to starlord
refs DE-670
refs DE-500

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. To do this, the Linters stage needs to always upload its image so that EKS can pull it.

Test Plan
1. Linters properly reports to the correct gerrit for main builds
2. Linters does not become the runtime bottleneck

Change-Id: Ibe28d47c13f965ee468b49ce6a74e3d08b75715d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264549
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-05-10 19:25:44 +00:00
Aaron Ogata 2869b6e1cb remove need to mount .git directory as volume for Linters
refs DE-670

For the EKS transition, we need to ensure that the Linters stage doesn’t run on the EC2 builder node and instead properly uses EKS containers. To do this, the Linters stage needs to not depend on having the .git directory on the host machine.

Test Plan
1. Linters properly reports to the correct gerrit for main builds
2. Linters properly reports to the correct gerrit for plugin builds
3. Linters does not become the runtime bottleneck
4. Linters yarn.lock diff check works

Change-Id: I49650bfb3feece9614a667d3af5ec9dba8c2e838
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264539
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-05-10 18:57:42 +00:00
Andrea Cirulli 653fa0936e fix parameter name linter issues
refs DE-643
flag = none

test-plan:
- build passes

Change-Id: I5b324cec3b031754c40ac71595b6b6f86bc1ab65
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264431
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-05-07 14:27:56 +00:00
Andrea Cirulli f650b95f9a fix VariableName linter issues
Fix the linter issues and restore the previous behaviour of codeNarc
for final variables

  refs DE-643
  flag = none

  test-plan:
  - build passes

Change-Id: I16f5e388e32fe0aec6789f1f87b0da03b1eacc83
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264362
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-05-06 20:17:43 +00:00
Andrea Cirulli 6859b6eedf fix ImplicitClosureParameter linter issues
refs DE-643
flag = none

Change-Id: If4bc5c0ea42294e2ae1861d3ee802146fa10882f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264246
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@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-05-05 18:44:06 +00:00