Skip to content
代码片段 群组 项目
提交 cbce94ac 编辑于 作者: Frédéric Caplette's avatar Frédéric Caplette
浏览文件

Merge branch '360766-update-ci-validator-json-schema' into 'master'

Add cyclonedx to pipeline validation schema

See merge request gitlab-org/gitlab!94241
No related branches found
No related tags found
无相关合并请求
......@@ -245,6 +245,10 @@
"terraform": {
"$ref": "#/definitions/string_file_list",
"description": "Path to file or list of files with terraform plan(s)."
},
"cyclonedx": {
"$ref": "#/definitions/string_file_list",
"markdownDescription": "Path to file or list of files with cyclonedx report(s). [Learn More](https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscyclonedx)."
}
}
}
......
......@@ -24,12 +24,14 @@ import ReleaseAssetsLinksMissingJson from './json_tests/negative_tests/release_a
import RetryUnknownWhenJson from './json_tests/negative_tests/retry_unknown_when.json';
// YAML POSITIVE TEST
import ArtifactsYaml from './yaml_tests/positive_tests/artifacts.yml';
import CacheYaml from './yaml_tests/positive_tests/cache.yml';
import FilterYaml from './yaml_tests/positive_tests/filter.yml';
import IncludeYaml from './yaml_tests/positive_tests/include.yml';
import RulesYaml from './yaml_tests/positive_tests/rules.yml';
// YAML NEGATIVE TEST
import ArtifactsNegativeYaml from './yaml_tests/negative_tests/artifacts.yml';
import CacheNegativeYaml from './yaml_tests/negative_tests/cache.yml';
import IncludeNegativeYaml from './yaml_tests/negative_tests/include.yml';
......@@ -63,6 +65,7 @@ describe('positive tests', () => {
FilterYaml,
IncludeYaml,
RulesYaml,
ArtifactsYaml,
}),
)('schema validates %s', (_, input) => {
expect(input).toValidateJsonSchema(schema);
......@@ -84,6 +87,7 @@ describe('negative tests', () => {
// YAML
CacheNegativeYaml,
IncludeNegativeYaml,
ArtifactsNegativeYaml,
}),
)('schema validates %s', (_, input) => {
expect(input).not.toValidateJsonSchema(schema);
......
# invalid artifact:reports:cyclonedx
cyclonedx no paths:
artifacts:
reports:
cyclonedx:
cyclonedx not a report:
artifacts:
cyclonedx: foo
cyclonedx not an array or string:
artifacts:
reports:
cyclonedx:
paths:
- foo
- bar
# valid artifact:reports:cyclonedx
cyclonedx string path:
artifacts:
reports:
cyclonedx: foo
cyclonedx glob path:
artifacts:
reports:
cyclonedx: "*.foo"
cylonedx list of string paths:
artifacts:
reports:
cyclonedx:
- foo
- ./bar/baz
cylonedx mixed list of string paths and globs:
artifacts:
reports:
cyclonedx:
- ./foo
- "bar/*.baz"
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册