[go: up one dir, main page]

Skip to content

Merge should delete Branch only after `environment.action: stop` finished successfully

When a Merge Request is merged the current (default) behaviour is:

  • delete branch
  • start jobs with
    environment:
       action: stop

This means those jobs will fail if they do not have GIT_STRATEGY=none.

Related Issues: gitlab-foss#28110 (closed), gitlab-foss#23218 (closed)

Proposal

Instead of these two things happening concurrently, I would like them to happen sequentially. First run the teardown job, then delete the branch.

This would not only allow for the usage of the source code inside the teardown job, but it would also allow the branch deletion to be aborted if the teardown unexpectedly fails.

A common usecase is docker-compose down which will not work if you do not have access to the docker-compose.yml file due to the branch deletion.