The environments.external_url column is not populated when using environment variables.

Summary

When a variable is used to craft the environment URL, nothing is stored in the environments.external_url column. This causes a missing button for the "open environment" functionality.

Steps to reproduce

  • Using CD/CI in gitlab with the following configuration for domain url:
deployment:
    stage: deploy
    script: ./build/script.sh
    environment:
        name: review/$CI_COMMIT_REF_NAME
        url: http://$CI_COMMIT_REF_SLUG
  • The environments.external_url is empty.
  • This is not happening id the URL is a hardcoded string (without variables).

Example Project

https://gitlab.com/shaggyz/pipeline-test

What is the current bug behavior?

The parameter environment.url is ignored when a variable is used to craft the URL. Due this, no "open environment" button is displayed.

What is the expected correct behavior?

The external_url is populated using variables and the button "open environment" is displayed accordingly.

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Debian 9.9 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.2.0-ee Revision: 30032e00da9 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: http://gitlab.fintech.REDACTED.com HTTP Clone URL: http://gitlab.fintech.REDACTED.com/some-group/some-project.git SSH Clone URL: git@gitlab.fintech.REDACTED.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 9.3.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/2 ... yes 3/3 ... yes 4/7 ... yes 2/8 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 8 Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Edited Aug 23, 2019 by Nicolás Daniel Palumbo
Assignee Loading
Time tracking Loading