Skip to content

Fix startup_css_changed to not check `ee` if FOSS_ONLY

What does this MR do and why?

This MR fixes the pipeline failure in !70000 (merged) which was caused by ee/ being removed for as-if-foss therefore caught by an overly greedy git diff check.

How to set up and validate locally

To test that this works in the happy path:

  1. Run ./scripts/frontend/startup_css/startup_css_changed.sh && echo "PASS".
  2. The PASS message should show up.

To test that this would catch ee/ errors correctly:

  1. Make a random change to ee/app/assets/stylesheets/startup/startup-signin.scss.
  2. Run ./scripts/frontend/startup_css/startup_css_changed.sh && echo "PASS".
  3. The PASS should not show and a diff for how to fix the job should be printed.
  4. Run FOSS_ONLY=1 ./scripts/frontend/startup_css/startup_css_changed.sh && echo "PASS"
  5. The PASS should show up.

To test that this would catch CE errors correctly:

  1. Make a random change to app/assets/stylesheets/startup/startup-signin.scss.
  2. Run ./scripts/frontend/startup_css/startup_css_changed.sh && echo "PASS".
  3. The PASS should not show and a diff for how to fix the job should be printed.
  4. Run FOSS_ONLY=1 ./scripts/frontend/startup_css/startup_css_changed.sh && echo "PASS"
  5. The PASS should not show and a diff for how to fix the job should be printed.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #341245 (closed)

Edited by Paul Slaughter

Merge request reports