No stages/jobs found when configuring single jobs with default stages.
Summary
We have a number of CI templates where only the .pre stage is defined within a job block. In some cases we also have a single job in ci with stage: test. Since the latest release it seems that Gitlab now considers these jobs as non-existent.
Steps to reproduce
- Create a test project with the following in .gitlab-ci.yml
test:
stage: test
script: echo
No CI will run and attempting to add a manual pipeline will fail with error "No stages/jobs for this pipeline."
- Explicitly add
stages:to .gitlab-ci.yml
stages:
- test
test:
stage: test
script: echo
CI will now run fine. Subsequently removing stages, will also fix it going forward.
What is the current bug behavior?
Default stages are ignored unless explicitly called out. If .pre is the only stage, even when explicitly called out in stages:, the error remains.
What is the expected correct behavior?
Default stages such as test, build, deploy, .pre and .post work even in CI config with only a single job.
System information
System: Ubuntu 16.04
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.6.5p114
Gem Version: 2.7.10
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 5.0.7
Git Version: 2.24.1
Sidekiq Version:5.2.7
Go Version: unknown
GitLab information
Version: 12.8.1-ee
Revision: 13bae744d5c
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 10.9
URL: REDACTED
HTTP Clone URL: REDACTED/some-group/some-project.git
SSH Clone URL: git@REDACTED:some-group/some-project.git
Elasticsearch: yes
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 11.0.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