tinybirdco / ci

Collection of configuration files that enable CI flows for Tinybird projects
MIT License
3 stars 3 forks source link

Find a way to not use AUTHOR to name environments in GitLab #25

Closed alrocar closed 8 months ago

alrocar commented 11 months ago

Right now the environment name on each MR in GitLab is done like this:

ENVIRONMENT_NAME="tmp_ci_${_NORMALIZED_ENV_NAME}_${AUTHOR}"

That means each user can only have one working environment. I tried with CI_MERGE_REQUEST_IID but it's only available on MR open.

Apart from that I haven't found a way to clean up the environment on close a MR.

alrocar commented 11 months ago

Another issue is AUTHOR might change in CI vs in CD, even for the same GitLab user so an Environment created in CI may not be deleted on merge.

alrocar commented 10 months ago

Since we force exit(1) in the CLI, all cleanup jobs are now failing.

Envs are created in the MR as tmp_ci_alrocaralrocartinybirdco and when the MR is merged it tries to delete tmp_ci_AlbertoRomeualrocartinybirdco