Skip to content

Cant recreate deleted environment name via CI/CD job environment key

Summary

After deleting an existing stopped env, I cannot recreate it via the environment key of a ci/cd job.

Steps to reproduce

  1. create an environment using the environment button on a CI job

  2. stop and delete it, restart the job or retrigger it via push

  3. see above the job

    image.png

this should be

image.png

Example Project

https://gitlab.com/OrbisK/reproduction-environment-recreating

What is the current bug behavior?

The environment cant be recreated. There are no error messages.

What is the expected correct behavior?

the environment should be recreated

Relevant logs and/or screenshots

example job:

job:
  script:
    - echo "test"
  environment:
    name: test1

First Pipeline to create the env: https://gitlab.com/OrbisK/reproduction-environment-recreating/-/jobs/9303802214

image.png

Pipeline after deletion: https://gitlab.com/OrbisK/reproduction-environment-recreating/-/jobs/9303820466

image.png

Possible fixes