fix(rules/gitlab): handle include
This commit is contained in:
parent
e0ec508fc5
commit
b84e7b80c6
|
@ -51,6 +51,8 @@ rules:
|
|||
type: object
|
||||
image:
|
||||
type: string
|
||||
include:
|
||||
type: array
|
||||
services:
|
||||
type: array
|
||||
stages:
|
||||
|
@ -77,7 +79,7 @@ rules:
|
|||
type: string
|
||||
|
||||
- name: gitlab-top-level
|
||||
desc: should only have jobs and stages at the top level scope
|
||||
desc: should only have includes and stages at the top level scope
|
||||
level: info
|
||||
tags:
|
||||
- gitlab
|
||||
|
@ -85,12 +87,22 @@ rules:
|
|||
|
||||
check:
|
||||
type: object
|
||||
not:
|
||||
anyOf:
|
||||
- required: [image]
|
||||
- required: [services]
|
||||
- required: [types]
|
||||
- required: [before_script]
|
||||
- required: [after_script]
|
||||
- required: [variables]
|
||||
- required: [cache]
|
||||
allOf:
|
||||
- properties:
|
||||
include:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
stages:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- not:
|
||||
anyOf:
|
||||
- required: [image]
|
||||
- required: [services]
|
||||
- required: [types]
|
||||
- required: [before_script]
|
||||
- required: [after_script]
|
||||
- required: [variables]
|
||||
- required: [cache]
|
Loading…
Reference in New Issue