rules(gitlab-ci): start validating jobs
This commit is contained in:
parent
9c1b7ae13d
commit
13159057d5
|
@ -14,4 +14,50 @@ rules:
|
|||
stages:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
type: string
|
||||
|
||||
- name: gitlab-job-template
|
||||
desc: template jobs should set the stage
|
||||
level: info
|
||||
tags:
|
||||
- gitlab
|
||||
- optional
|
||||
|
||||
select: '$'
|
||||
check:
|
||||
type: object
|
||||
patternProperties:
|
||||
"\\..+":
|
||||
type: object
|
||||
required: [stage]
|
||||
properties:
|
||||
stage:
|
||||
type: string
|
||||
|
||||
- name: gitlab-job-script
|
||||
desc: jobs must have a script
|
||||
level: info
|
||||
tags:
|
||||
- gitlab
|
||||
- important
|
||||
|
||||
select: '$'
|
||||
check:
|
||||
type: object
|
||||
patternProperties:
|
||||
"^(?!stages$|\\.)":
|
||||
type: object
|
||||
required: [script]
|
||||
properties:
|
||||
after_script:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
before_script:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
script:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
Loading…
Reference in New Issue