File tree Expand file tree Collapse file tree 3 files changed +50
-22
lines changed Expand file tree Collapse file tree 3 files changed +50
-22
lines changed Original file line number Diff line number Diff line change 99 only_branch_master_parent_repo : &only_branch_master_parent_repo
1010 - ' master@saltstack-formulas/template-formula'
1111 # `stage`
12- stage_constraints : &stage_constraints 'constraints '
12+ stage_schema : &stage_schema 'schema '
1313 stage_lint : &stage_lint 'lint'
1414 stage_release : &stage_release 'release'
1515 stage_test : &stage_test 'test'
1616 # `image`
1717 image_commitlint : &image_commitlint 'myii/ssf-commitlint:11'
18+ image_cuelang : &image_cuelang
19+ name : ' myii/ssf-cue:0.3.2' # instead of cuelang/cue
20+ entrypoint : ['/bin/bash', '-c']
1821 image_dindruby : &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3'
1922 image_dindrubybionic : &image_dindrubybionic 'myii/ssf-dind-ruby-bionic:1_2.5.1'
2023 image_precommit : &image_precommit
4245# ##############################################################################
4346stages :
4447 - *stage_lint
48+ - *stage_schema
4549 - *stage_test
4650 - *stage_release
4751variables :
@@ -101,6 +105,15 @@ rubocop:
101105 script :
102106 - ' rubocop -d -P -S --enable-pending-cops'
103107
108+ cue :
109+ allow_failure : true
110+ stage : *stage_schema
111+ image : *image_cuelang
112+ variables :
113+ RULES : ' TEMPLATE/parameters/schema.cue'
114+ script :
115+ - ' cue vet -v $(find . -name "*.yaml") ${RULES} --schema "#Values"'
116+
104117# ##############################################################################
105118# Define `test` template
106119# ##############################################################################
Original file line number Diff line number Diff line change 1313---
1414values :
1515 pkg :
16- name : TEMPLATE-fedora
16+ name : 11
17+ # TEMPLATE-fedora
1718 service :
1819 name : service-fedora
1920...
Original file line number Diff line number Diff line change 11// -*- coding : utf-8 -*-
22// vim : ft=yaml
3+
4+ //
5+ // Data Constaints - Example from Saltstack-formulas
36//
4- // Constraints Schema :
5- // This is not a prescriptive or forced schema! Many variants of
6- // formula (and yaml data) exist in the salt user community.
7- // Therefore the use of cue '?' and "aliases" is recommended.
87
9- // template-formula
10- # template: {
11- pkg? : name?: string
8+ # Schema: #Values
9+
10+ //
11+ // Rule
12+ //
13+ # Optional: {
14+ pkg? :
15+ name? : string
1216 rootgroup? : string
1317 hide_output? : bool
1418 dir_mode? : =~"^0?[124567]{3}$" // any mode of length 3, with 0 prefix optional
2731 winner? : string
2832 ...
2933}
30- values? : {...#template} // probable yaml namespace
3134
3235//
33- // support formula diversity :-)
36+ // Schema Name
3437//
38+ # Values: {
39+ values? : {...#Optional}
40+ }
41+ values? : {...#Values} // Namespace
42+
3543
36- template? : {...#template} // another probable namespace
44+ //
45+ // Older schema
46+ //
47+ # TEMPLATE: {
48+ TEMPLATE? : {...#Optional}
49+ }
50+ TEMPLATE? : {...#Optional}
3751
38- Debian? : # template
39- Suse? : # template
40- Gentoo? : # template
41- Arch? : # template
42- Alpine? : # template
43- FreeBSD? : # template
44- OpenBSD? : # template
45- Solaris? : # template
46- Windows? : # template
47- MacOS? : # template
52+ Debian? : # Optional
53+ Suse? : # Optional
54+ Gentoo? : # Optional
55+ Arch? : # Optional
56+ Alpine? : # Optional
57+ FreeBSD? : # Optional
58+ OpenBSD? : # Optional
59+ Solaris? : # Optional
60+ Windows? : # Optional
61+ MacOS? : # Optional
You can’t perform that action at this time.
0 commit comments