Multi pipelines for same repo and Token problems

token
pipelines
ci
#1

Hi everyone,

We are working on Gitlab CI. We found some problems when setting up the CI pipeline and we are seeking ways to solve them.

  1. How to support multiple pipelines for one repo. For example, before-merge and post-merge pipelines.

    What we do today is to create all the steps from multiple pipelines in one gitlab-ci.yml, and skip the not relevant ones based on the trigger or other conditions, as a workaround. However, this way seems not that elegant.

  2. The READONLY token: Push not working with authentication failed.

    Gitlab will clone the repo for us before the execution, however, in that step, it seems a READONLY token is applied and used for cloning the repo.

    We have to put a workaround to push back a tag during the release process for example. We update the origin to the repo URL without username and token so git will refer to .netrc file. We found an issues https://gitlab.com/gitlab-org/gitlab-runner/issues/1070 . Not sure whether this is a design choice.

Thanks!