Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 11601

gitlab ci how to trigger a job if only a specific file changes and no others

$
0
0
  • I'm using playwright to build end to end tests. I can write a rule that runs the test script if the test script file was changed.

  • I want to build a rule sequence that doesn't run any of the other jobs (scan, build, deploy, etc.) on a commit if the test script was the only file that changed

  • I also want rules that run the scan, build, deploy, etc. jobs AND the end-to-end test if the test script file and another other file in the repo has changed

  • If tried everything I can think of. The following does not work

rules:    - if: ($CI_COMMIT_BRANCH == $INTEGRATION_BRANCH)      changes:        - ! tests/playwright/*    # Keep integration related jobs from running if only a playwright file changed    - if: ($CI_COMMIT_BRANCH == $INTEGRATION_BRANCH) && ($CI_JOB_NAME != "Integration Verification")      changes:        - tests/playwright/*      when: never    - if: ($CI_COMMIT_BRANCH == $INTEGRATION_BRANCH)    # Make sure we're not running a job intended for the integration branch    - if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH)      when: never

Viewing all articles
Browse latest Browse all 11601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>