Changing the environment name of a deploy job fails to create deploys for new environment
Summary
When changing the environment name of a deploy job in .gitlab-ci.yml, the new environment is created and visible in the UI, but no deploys are listed for it.
Steps to reproduce
- Install GitLab via the GitLab Development Kit (GDK rev.
6ab2e16and GitLab CE revbf8e174at the time of this writing) - Create and clone a new test repo
- Set up a local CI runner against the test repo
- Add
.gitlab-ci.ymlfile with example contents from https://docs.gitlab.com/ce/ci/environments.html#defining-environments to test repo - Commit & push change to local GitLab
- Observe that the
stagingenvironment got created and has one deploy listed - Change
name: stagingtoname: testingin the deploy job in.gitlab-ci.yml - Commit & push to local GitLab
- Observe that the
testingenvironment got created, but has no deploys listed (even when pushing subsequent commits), although the CI job succeeded.
Expected behavior
I would have expected the testing environment to show a deploy.
Actual behavior
No new deploy is indicated anywhere, neither under the old nor the new environment name.
Relevant logs and/or screenshots
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab application Check
Not sure if this is the right way to run checks for GDK-based GitLab (and whether the missing init script should be installed in that case). But:
$ bundle exec rake gitlab:check RAILS_ENV=development SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by julius:julius?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
2/1 ... ok
2/2 ... ok
2/3 ... ok
2/4 ... ok
3/5 ... ok
4/6 ... ok
4/7 ... ok
5/8 ... ok
1/9 ... ok
Running /home/julius/gitlab-development-kit/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /home/julius/gitlab-development-kit/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... no
Try fixing it:
Install the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
projects have namespace: ...
2/1 ... yes
2/2 ... yes
2/3 ... yes
2/4 ... yes
3/5 ... yes
4/6 ... yes
4/7 ... yes
5/8 ... yes
1/9 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is "/usr/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 26
Checking GitLab ... Finished
Results of GitLab environment info
bundle exec rake gitlab:env:info RAILS_ENV=development
System information
System: Ubuntu 16.04
Current User: julius
Using RVM: yes
RVM Version: 1.27.0
Ruby Version: 2.3.1p112
Gem Version: 2.5.1
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.16.0-pre
Revision: bf8e174
Directory: /home/julius/gitlab-development-kit/gitlab
DB Adapter: postgresql
URL: http://localhost:3000
HTTP Clone URL: http://localhost:3000/some-group/some-project.git
SSH Clone URL: ssh://julius@localhost:2222/some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /home/julius/gitlab-development-kit/repositories/
Hooks: /home/julius/gitlab-development-kit/gitlab-shell/hooks/
Git: /usr/bin/git
