Commit d32b2188 authored by Lukas 'Eipi' Eipert's avatar Lukas 'Eipi' Eipert Committed by Lin Jen-Shin

Run QA frontend jobs when dependencies are updated

The QA jobs purpose is to catch if we utilize JavaScript that cannot be
executed on one of the node LTS versions we support for from-source
builds.

Currently we execute the QA jobs on master.

1. This means that they are executed unnecessarily, e.g. on docs only
   branches.
2. The thing which breaks the QA jobs are likely dependency updates, as
   we just test the webpack compilation and dependencies and
   subdependencies are usually requiring newer node versions. So we
   should be executing these checks on branches that update
   dependencies.

Recently we had a red master, because one dependency update required a
newer node version and the pipeline was green [0], [1].

Therefore I am proposing that we run the QA frontend jobs in merge
requests which are changing our package.json or yarn.lock file, as we
want to know if a dependency update would fail our build _before_ a red
master happens.

[0]: https://gitlab.com/gitlab-org/gitlab/-/issues/202187
[1]: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24413
parent 7c6fc698
......@@ -80,6 +80,9 @@
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
.frontend-dependency-patterns: &frontend-dependency-patterns
- "{package.json,yarn.lock}"
.qa-patterns: &qa-patterns
- ".dockerignore"
- "qa/**/*"
......@@ -270,6 +273,9 @@
rules:
- <<: *if-master-refs
when: on_success
- <<: *if-merge-request
changes: *frontend-dependency-patterns
when: on_success
################
# Memory rules #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment