Revise Review Apps documentation instructions regarding environment name

Summary

GitLab doesn't allow environment names include invalid characters such as #. Therefore pipelines silently fail to create review environment and the user has no idea why.

Proposal

Clarify the documentation that environment names with special characters are not permitted

From the original issue

Review Apps: Dynamic environments are not getting created with merge_requests only pipelines

I'm trying to create dynamic environments with the Review App feature with my .gitlab-ci.yml and the dynamics environments are not getting created in the Operations->Environments page.

Steps to reproduce

  1. Define some deploy job with only: - merge_requests parameter like:
build:mr:
  stage: build
  script:
    - echo "Running build job"
  only:
    - merge_requests

deploy:mr:
  stage: deploy
  dependencies:
    - build:mr
  script:
    - echo "Running deploy job"
  environment:
    name: review/$CI_COMMIT_REF_NAME
    url: http://$CI_ENVIRONMENT_SLUG.gitlab.com
    on_stop: stop:mr
  only:
    - merge_requests

stop:mr:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - echo "Running stop job"
  when: manual
  environment:
    name: review/$CI_COMMIT_REF_NAME
    action: stop
  1. Create some branch and Merge Request
  2. Push code to that branch
  3. Pipeline runs and job passes
  4. Nothing shows up in the Operations-> Environments page.

Example Project

https://gitlab.com/francovp/environments-not-getting-created-example

What is the current bug behavior?

When a merge request pipeline with a dynamic environment defined, they are not getting created

What is the expected correct behavior?

Dynamic environments should be created according to documentation

Relevant logs and/or screenshots

No review app section in the MR:

image

Possible fixes

I don't know.

Edited Oct 27, 2019 by Orit Golowinski
Assignee Loading
Time tracking Loading