summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/config/entry/includes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-141-0/+9
|
* fix(gitlab-ci-config): allow strings in the 'include' keywordPaul 🐻2019-04-051-1/+1
| | | | | | | | | | | | This fix is a followup to !24098 which introduced a validation of the `include:` keyword of a gitlab-ci configuration file when triggered from /ci/lint API calls. However, there was a test case missing: the case of a single string as value. I have added a test case for that which shows that the code was not validating it correctly. This commit fixes that to allow all `include:` valid inputs.
* ci(config): validate 'include' keywordPaul B2019-02-191-0/+32
During `.gitlab-ci.yml` configuration file validation there are two cases: 1- either we are validating a file within a project context (a project and a sha is given in option parameters) 2- either we are validating a file with no project context (as in the api POST /ci/lint) In the first case, all `include:` keywords are replaced by the content of the included CI cnfiguration files. In the second case, the `include:` configuration is kept untouched. The current problem arises in the second case when one wants to validate a generic gitlab-ci configuration file with an `include:` keyword from the API. The following error will be raised by the API: `"jobs:include config should be a hash"`. This commit fixes the behavior by validating the `include:` keyword if its present to not parse it as a job definition. Fixes #55863 / #52822