Hi GitLab Community,
I have a question about git branching and merging.
With GitLab we try to observe a special folder where Liquibase changes are observed. After a change was detected the job should generate a new SQL file. This should only happen, when a developer change happened.
My observation shows that GitLab triggers the job always after a branch as feature branch or when the feature branch is merged to the main branch.
From build.yml:
database-scripts-update:
stage: build
before_script:
- sudo service mysql start
script:
- ci-scripts/update-db-scripts/updateDatabaseFiles.sh 1
rules:
- changes:
- “project/src/main/resources/changes/*.xml”
- if: $CI_PIPELINE_SOURCE == “schedule”
when: always
- if: $CI_PIPELINE_SOURCE == “web”
when: always
- when: manual
allow_failure: true
Does anybody know how I can configure the job that it only runs when a change is manually done?
Thanks,
Markus