diff --git a/rules/gitlab-ci.yml b/rules/gitlab-ci.yml index 6adbfcf..839a5e2 100644 --- a/rules/gitlab-ci.yml +++ b/rules/gitlab-ci.yml @@ -14,4 +14,50 @@ rules: stages: type: array items: - type: string \ No newline at end of file + 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 \ No newline at end of file