Reputation: 435
Trying to check my .gitlab-ci.yml
for errors and discovered this through the CI Lint in CI/CD section. The following section throws syntax incorrect even though it's according to https://my.gitlab-instance/help/ci/environments
environment:
name: staging
url: https://staging.example.com
Produces this lint error:
Status: syntax is incorrect
Error: jobs:environment config contains unknown keys: name, url
Even trying to hack away with adding dashes like this
environment:
- name: staging
- url: https://staging.example.com
Which gives this instead
Status: syntax is incorrect
Error: jobs:environment config should be a hash
Any ideas how to do this correct?
Upvotes: 2
Views: 7699
Reputation: 435
The team updated Gitlab instance to latest version and the lint error have since disappeared. No idea if this was the actual fix to the lint error but seemed to be working since then.
Upvotes: 2