V
V
Vladimir Kuts2021-08-11 11:11:06
Continuous Integration
Vladimir Kuts, 2021-08-11 11:11:06

Canceling an individual stage run in Gitlab CI/CD?

I have CI/CD set up for a project.
After committing to the current branch for development, statistical analysis of the code is performed, unit tests and integration tests are run.
Is it possible to specify in a separate commit that, for example, - unit tests, integration tests for this particular commit - do not run. Let's just say comments are added to the code or documentation, or to a script that is not related to the project's functionality. And then the tests are resource-intensive and take a long time. And manually climbing into the interface to stop them is such a thing ... As well as changing .gitlab-ci.yml every time ...
I saw an article where a solution was described on how to do this, including a certain keyword in the commit text, but unfortunately lost her.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-08-11
@fox_12

job:
  script: echo "Долгий тест!"
  rules:
    - if: '$CI_COMMIT_MESSAGE =~ /регулярка-стопслово/' 
      when: never

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question