96 lines
1.9 KiB
YAML
96 lines
1.9 KiB
YAML
name: salty-dog-gitlab-ci
|
|
rules:
|
|
- name: gitlab-stages
|
|
desc: should specify stages
|
|
level: info
|
|
tags:
|
|
- gitlab
|
|
- optional
|
|
|
|
check:
|
|
type: object
|
|
required: [stages]
|
|
properties:
|
|
stages:
|
|
type: array
|
|
items:
|
|
type: string
|
|
|
|
- name: gitlab-job-template
|
|
desc: template jobs should set the stage
|
|
level: info
|
|
tags:
|
|
- gitlab
|
|
- optional
|
|
|
|
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
|
|
|
|
check:
|
|
type: object
|
|
properties:
|
|
after_script:
|
|
type: array
|
|
before_script:
|
|
type: array
|
|
cache:
|
|
type: object
|
|
image:
|
|
type: string
|
|
services:
|
|
type: array
|
|
stages:
|
|
type: array
|
|
types:
|
|
type: array
|
|
variables:
|
|
type: object
|
|
additionalProperties:
|
|
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
|
|
|
|
- name: gitlab-top-level
|
|
desc: should only have jobs and stages at the top level scope
|
|
level: info
|
|
tags:
|
|
- gitlab
|
|
- optional
|
|
|
|
check:
|
|
type: object
|
|
not:
|
|
anyOf:
|
|
- required: [image]
|
|
- required: [services]
|
|
- required: [types]
|
|
- required: [before_script]
|
|
- required: [after_script]
|
|
- required: [variables]
|
|
- required: [cache] |