-
Notifications
You must be signed in to change notification settings - Fork 14
/
spec.schema.json
1127 lines (1127 loc) 路 37.3 KB
/
spec.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Azure/dalec/spec",
"$ref": "#/$defs/Spec",
"$defs": {
"ArtifactBuild": {
"properties": {
"steps": {
"items": {
"$ref": "#/$defs/BuildStep"
},
"type": "array",
"description": "Steps is the list of commands to run to build the artifact(s).\nEach step is run sequentially and will be cached accordingly depending on the frontend implementation."
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Env is the list of environment variables to set for all commands in this step group."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"steps"
],
"description": "ArtifactBuild configures a group of steps that are run sequentially along with their outputs to build the artifact(s)."
},
"ArtifactConfig": {
"properties": {
"subpath": {
"type": "string",
"description": "Subpath is the subpath to use in the package for the artifact type.\n\nAs an example, binaries are typically placed in /usr/bin when installed.\nIf you want to nest them in a subdirectory, you can specify it here."
},
"name": {
"type": "string",
"description": "Name is file or dir name to use for the artifact in the package.\nIf empty, the file or dir name from the produced artifact will be used."
}
},
"additionalProperties": false,
"type": "object",
"description": "ArtifactConfig is the configuration for a given artifact type."
},
"ArtifactDirConfig": {
"properties": {
"mode": {
"type": "integer",
"description": "Mode is used to set the file permission bits of the final created directory to the specified mode.\nMode is the octal permissions to set on the dir."
}
},
"additionalProperties": false,
"type": "object",
"description": "ArtifactDirConfig contains information about the directory to be created"
},
"Artifacts": {
"properties": {
"binaries": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "Binaries is the list of binaries to include in the package."
},
"manpages": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "Manpages is the list of manpages to include in the package."
},
"data_dirs": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "DataDirs is a list of read-only architecture-independent data files, to be placed in /usr/share/"
},
"createDirectories": {
"$ref": "#/$defs/CreateArtifactDirectories",
"description": "Directories is a list of various directories that should be created by the package."
},
"configFiles": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "ConfigFiles is a list of files that should be marked as config files in the package."
},
"docs": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "Docs is a list of doc files included in the package"
},
"licenses": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactConfig"
},
"type": "object",
"description": "Licenses is a list of doc files included in the package"
},
"systemd": {
"$ref": "#/$defs/SystemdConfiguration",
"description": "Systemd is the list of systemd units and dropin files for the package"
}
},
"additionalProperties": false,
"type": "object",
"description": "Artifacts describes all the artifacts to include in the package."
},
"BuildStep": {
"properties": {
"command": {
"type": "string",
"description": "Command is the command to run to build the artifact(s).\nThis will always be wrapped as /bin/sh -c \"\u003ccommand\u003e\", or whatever the equivalent is for the target distro."
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Env is the list of environment variables to set for the command."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"command"
],
"description": "BuildStep is used to execute a command to build the artifact(s)."
},
"CacheDirConfig": {
"properties": {
"mode": {
"type": "string",
"enum": [
"shared",
"private",
"locked"
],
"description": "Mode is the locking mode to set on the cache directory\nvalues: shared, private, locked\ndefault: shared"
},
"key": {
"type": "string",
"description": "Key is the cache key to use to cache the directory\ndefault: Value of `Path`"
},
"include_distro_key": {
"type": "boolean",
"description": "IncludeDistroKey is used to include the distro key as part of the cache key\nWhat this key is depends on the frontend implementation\nExample for Debian Buster may be \"buster\"\n\nAn example use for this is with a Go(lang) build cache when CGO is included.\nGo is unable to invalidate cgo and re-using the same cache across different distros may cause issues."
},
"include_arch_key": {
"type": "boolean",
"description": "IncludeArchKey is used to include the architecture key as part of the cache key\nWhat this key is depends on the frontend implementation\nFrontends SHOULD use the buildkit platform arch\n\nAs with [IncludeDistroKey], this is useful for Go(lang) builds with CGO."
}
},
"additionalProperties": false,
"type": "object",
"description": "CacheDirConfig configures a persistent cache to be used across builds."
},
"ChangelogEntry": {
"oneOf": [
{
"required": [
"date"
],
"title": "date"
}
],
"properties": {
"date": {
"type": "string",
"format": "date-time",
"description": "Date is the date of the changelog entry."
},
"author": {
"type": "string",
"description": "Author is the author of the changelog entry. e.g. `John Smith \u003cjohn.smith@example.com\u003e`"
},
"changes": {
"items": {
"type": "string"
},
"type": "array",
"description": "Changes is the list of changes in the changelog entry."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"date",
"author",
"changes"
],
"description": "ChangelogEntry is an entry in the changelog."
},
"CheckOutput": {
"properties": {
"equals": {
"type": "string",
"description": "Equals is the exact string to compare the output to."
},
"contains": {
"items": {
"type": "string"
},
"type": "array",
"description": "Contains is the list of strings to check if they are contained in the output."
},
"matches": {
"type": "string",
"description": "Matches is the regular expression to match the output against."
},
"starts_with": {
"type": "string",
"description": "StartsWith is the string to check if the output starts with."
},
"ends_with": {
"type": "string",
"description": "EndsWith is the string to check if the output ends with."
},
"empty": {
"type": "boolean",
"description": "Empty is used to check if the output is empty."
}
},
"additionalProperties": false,
"type": "object",
"description": "CheckOutput is used to specify the exepcted output of a check, such as stdout/stderr or a file."
},
"Command": {
"properties": {
"dir": {
"type": "string",
"description": "Dir is the working directory to run the command in."
},
"mounts": {
"items": {
"$ref": "#/$defs/SourceMount"
},
"type": "array",
"description": "Mounts is the list of sources to mount into the build steps."
},
"cache_dirs": {
"additionalProperties": {
"$ref": "#/$defs/CacheDirConfig"
},
"type": "object",
"description": "List of CacheDirs which will be used across all Steps"
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Env is the list of environment variables to set for all commands in this step group."
},
"steps": {
"items": {
"$ref": "#/$defs/BuildStep"
},
"type": "array",
"description": "Steps is the list of commands to run to generate the source.\nSteps are run sequentially and results of each step should be cached."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"steps"
],
"description": "Command is used to execute a command to generate a source from a docker image."
},
"CreateArtifactDirectories": {
"properties": {
"Config": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactDirConfig"
},
"type": "object",
"description": "Config is a list of directories the RPM should place under the system config directory (i.e. /etc)"
},
"State": {
"additionalProperties": {
"$ref": "#/$defs/ArtifactDirConfig"
},
"type": "object",
"description": "State is a list of directories the RPM should place under the common directory for shared state and libs (i.e. /var/lib)."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"Config",
"State"
],
"description": "CreateArtifactDirectories describes various directories that should be created on install."
},
"FileCheckOutput": {
"properties": {
"equals": {
"type": "string",
"description": "Equals is the exact string to compare the output to."
},
"contains": {
"items": {
"type": "string"
},
"type": "array",
"description": "Contains is the list of strings to check if they are contained in the output."
},
"matches": {
"type": "string",
"description": "Matches is the regular expression to match the output against."
},
"starts_with": {
"type": "string",
"description": "StartsWith is the string to check if the output starts with."
},
"ends_with": {
"type": "string",
"description": "EndsWith is the string to check if the output ends with."
},
"empty": {
"type": "boolean",
"description": "Empty is used to check if the output is empty."
},
"permissions": {
"type": "integer",
"description": "Permissions is the expected permissions of the file."
},
"is_dir": {
"type": "boolean",
"description": "IsDir is used to set the expected file mode to a directory."
},
"not_exist": {
"type": "boolean",
"description": "NotExist is used to check that the file does not exist."
}
},
"additionalProperties": false,
"type": "object",
"description": "FileCheckOutput is used to specify the expected output of a file."
},
"Frontend": {
"properties": {
"image": {
"type": "string",
"description": "Image specifies the frontend image to forward the build to.\nThis can be left unspecified *if* the original frontend has builtin support for the distro.\n\nIf the original frontend does not have builtin support for the distro, this must be specified or the build will fail.\nIf this is specified then it MUST be used.",
"examples": [
"docker.io/my/frontend:latest"
]
},
"cmdline": {
"type": "string",
"description": "CmdLine is the command line to use to forward the build to the frontend.\nBy default the frontend image's entrypoint/cmd is used."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"image"
],
"description": "Frontend encapsulates the configuration for a frontend to forward a build target to."
},
"GeneratorGomod": {
"properties": {},
"additionalProperties": false,
"type": "object",
"description": "GeneratorGomod is used to generate a go module cache from go module sources"
},
"ImageConfig": {
"properties": {
"entrypoint": {
"type": "string",
"description": "Entrypoint sets the image's \"entrypoint\" field.\nThis is used to control the default command to run when the image is run."
},
"cmd": {
"type": "string",
"description": "Cmd sets the image's \"cmd\" field.\nWhen entrypoint is set, this is used as the default arguments to the entrypoint.\nWhen entrypoint is not set, this is used as the default command to run."
},
"env": {
"items": {
"type": "string"
},
"type": "array",
"description": "Env is the list of environment variables to set in the image."
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Labels is the list of labels to set in the image metadata."
},
"volumes": {
"additionalProperties": {
"properties": {},
"additionalProperties": false,
"type": "object"
},
"type": "object",
"description": "Volumes is the list of volumes for the image.\nVolumes instruct the runtime to bypass the any copy-on-write filesystems and mount the volume directly to the container."
},
"working_dir": {
"type": "string",
"description": "WorkingDir is the working directory to set in the image.\nThis sets the directory the container will start in."
},
"stop_signal": {
"type": "string",
"description": "StopSignal is the signal to send to the container to stop it.\nThis is used to stop the container gracefully.",
"examples": [
"SIGTERM"
]
},
"base": {
"type": "string",
"description": "Base is the base image to use for the output image.\nThis only affects the output image, not the intermediate build image."
},
"post": {
"$ref": "#/$defs/PostInstall",
"description": "Post is the post install configuration for the image.\nThis allows making additional modifications to the container rootfs after the package(s) are installed.\n\nUse this to perform actions that would otherwise require additional tooling inside the container that is not relavent to\nthe resulting container and makes a post-install script as part of the package unnecessary."
},
"user": {
"type": "string",
"description": "User is the that the image should run as."
}
},
"additionalProperties": false,
"type": "object",
"description": "ImageConfig is the configuration for the output image."
},
"PackageConfig": {
"properties": {
"signer": {
"$ref": "#/$defs/PackageSigner",
"description": "Signer is the configuration to use for signing packages"
}
},
"additionalProperties": false,
"type": "object",
"description": "PackageConfig encapsulates the configuration for artifact targets"
},
"PackageDependencies": {
"properties": {
"build": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object",
"description": "Build is the list of packagese required to build the package."
},
"runtime": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object",
"description": "Runtime is the list of packages required to install/run the package."
},
"recommends": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object",
"description": "Recommends is the list of packages recommended to install with the generated package.\nNote: Not all package managers support this (e.g. rpm)"
},
"test": {
"items": {
"type": "string"
},
"type": "array",
"description": "Test lists any extra packages required for running tests\nThese packages are only installed for tests which have steps that require\nrunning a command in the built container.\nSee [TestSpec] for more information."
}
},
"additionalProperties": false,
"type": "object",
"description": "PackageDependencies is a list of dependencies for a package."
},
"PackageSigner": {
"properties": {
"image": {
"type": "string",
"description": "Image specifies the frontend image to forward the build to.\nThis can be left unspecified *if* the original frontend has builtin support for the distro.\n\nIf the original frontend does not have builtin support for the distro, this must be specified or the build will fail.\nIf this is specified then it MUST be used.",
"examples": [
"docker.io/my/frontend:latest"
]
},
"cmdline": {
"type": "string",
"description": "CmdLine is the command line to use to forward the build to the frontend.\nBy default the frontend image's entrypoint/cmd is used."
},
"args": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Args are passed along to the signer frontend as build args"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"image"
],
"description": "PackageSigner is the configuration for defining how to sign a package"
},
"PatchSpec": {
"properties": {
"source": {
"type": "string",
"description": "Source is the name of the source that contains the patch to apply."
},
"strip": {
"type": "integer",
"description": "Strip is the number of leading path components to strip from the patch.\nThe default is 1 which is typical of a git diff."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"source"
],
"description": "PatchSpec is used to apply a patch to a source with a given set of options."
},
"PostInstall": {
"properties": {
"symlinks": {
"additionalProperties": {
"$ref": "#/$defs/SymlinkTarget"
},
"type": "object",
"description": "Symlinks is the list of symlinks to create in the container rootfs after the package(s) are installed.\nThe key is the path the symlink should point to."
}
},
"additionalProperties": false,
"type": "object",
"description": "PostInstall is the post install configuration for the image."
},
"Source": {
"properties": {
"image": {
"$ref": "#/$defs/SourceDockerImage",
"description": "This is an embedded union representing all of the possible source types.\nExactly one must be non-nil, with all other cases being errors.\n\n=== Begin Source Variants ==="
},
"git": {
"$ref": "#/$defs/SourceGit"
},
"http": {
"$ref": "#/$defs/SourceHTTP"
},
"context": {
"$ref": "#/$defs/SourceContext"
},
"build": {
"$ref": "#/$defs/SourceBuild"
},
"inline": {
"$ref": "#/$defs/SourceInline"
},
"path": {
"type": "string",
"description": "Path is the path to the source after fetching it based on the identifier."
},
"includes": {
"items": {
"type": "string"
},
"type": "array",
"description": "Includes is a list of paths underneath `Path` to include, everything else is execluded\nIf empty, everything is included (minus the excludes)"
},
"excludes": {
"items": {
"type": "string"
},
"type": "array",
"description": "Excludes is a list of paths underneath `Path` to exclude, everything else is included"
},
"generate": {
"items": {
"$ref": "#/$defs/SourceGenerator"
},
"type": "array",
"description": "Generate is the list generators to run on the source.\n\nGenerators are used to generate additional sources from this source.\nAs an example the `godmod` generator can be used to generate a go module cache from a go source.\nHow a genator operates is dependent on the actual generator.\nGeneators may also cauuse modifications to the build environment.\n\nCurrently only one generator is supported: \"gomod\""
}
},
"additionalProperties": false,
"type": "object",
"description": "Source defines a source to be used in the build."
},
"SourceBuild": {
"properties": {
"source": {
"$ref": "#/$defs/Source",
"description": "A source specification to use as the context for the Dockerfile build"
},
"dockerfile_path": {
"type": "string",
"description": "DockerfilePath is the path to the build file in the build context\nIf not set the default is assumed by buildkit to be `Dockerfile` at the root of the context."
},
"target": {
"type": "string",
"description": "Target specifies the build target to use.\nIf unset, the default target is determined by the frontend implementation\n(e.g. the dockerfile frontend uses the last build stage as the default)."
},
"args": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Args are the build args to pass to the build."
}
},
"additionalProperties": false,
"type": "object",
"description": "SourceBuild is used to generate source from a DockerFile build."
},
"SourceContext": {
"properties": {
"name": {
"type": "string",
"description": "Name is the name of the build context. By default, it is the magic name\n`context`, recognized by Docker as the default context."
}
},
"additionalProperties": false,
"type": "object",
"description": "SourceContext is used to generate a source from a build context."
},
"SourceDockerImage": {
"properties": {
"ref": {
"type": "string"
},
"cmd": {
"$ref": "#/$defs/Command"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"ref"
]
},
"SourceGenerator": {
"properties": {
"subpath": {
"type": "string",
"description": "Subpath is the path inside a source to run the generator from."
},
"gomod": {
"$ref": "#/$defs/GeneratorGomod",
"description": "Gomod is the go module generator."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"gomod"
],
"description": "SourceGenerator holds the configuration for a source generator."
},
"SourceGit": {
"properties": {
"url": {
"type": "string"
},
"commit": {
"type": "string"
},
"keepGitDir": {
"type": "boolean"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"url",
"commit",
"keepGitDir"
]
},
"SourceHTTP": {
"properties": {
"url": {
"type": "string",
"description": "URL is the URL to download the file from."
},
"digest": {
"type": "string",
"description": "Digest is the digest of the file to download.\nThis is used to verify the integrity of the file.\nForm: \u003calgorithm\u003e:\u003cdigest\u003e"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"url"
],
"description": "SourceHTTP is used to download a file from an HTTP(s) URL."
},
"SourceInline": {
"properties": {
"file": {
"$ref": "#/$defs/SourceInlineFile",
"description": "File is the inline file to generate.\nFile is treated as a literal single file.\n[SourceIsDir] will return false when this is set.\nThis is mutally exclusive with [Dir]"
},
"dir": {
"$ref": "#/$defs/SourceInlineDir",
"description": "Dir creates a directory with the given files and directories.\n[SourceIsDir] will return true when this is set.\nThis is mutally exclusive with [File]"
}
},
"additionalProperties": false,
"type": "object",
"description": "SourceInline is used to generate a source from inline content."
},
"SourceInlineDir": {
"properties": {
"files": {
"additionalProperties": {
"$ref": "#/$defs/SourceInlineFile"
},
"type": "object",
"description": "Files is the list of files to include in the directory.\nThe map key is the name of the file.\n\nFiles with path separators in the key will be rejected."
},
"permissions": {
"type": "integer",
"description": "Permissions is the octal permissions to set on the directory."
},
"uid": {
"type": "integer",
"description": "UID is the user ID to set on the directory and all files and directories within it.\nUID must be greater than or equal to 0"
},
"gid": {
"type": "integer",
"description": "GID is the group ID to set on the directory and all files and directories within it.\nUID must be greater than or equal to 0"
}
},
"additionalProperties": false,
"type": "object",
"description": "SourceInlineDir is used by by [SourceInline] to represent a filesystem directory."
},
"SourceInlineFile": {
"properties": {
"contents": {
"type": "string",
"description": "Contents is the content."
},
"permissions": {
"type": "integer",
"description": "Permissions is the octal file permissions to set on the file."
},
"uid": {
"type": "integer",
"description": "UID is the user ID to set on the directory and all files and directories within it.\nUID must be greater than or equal to 0"
},
"gid": {
"type": "integer",
"description": "GID is the group ID to set on the directory and all files and directories within it.\nUID must be greater than or equal to 0"
}
},
"additionalProperties": false,
"type": "object",
"description": "SourceInlineFile is used to specify the content of an inline source."
},
"SourceMount": {
"properties": {
"dest": {
"type": "string",
"description": "Dest is the destination directory to mount to"
},
"spec": {
"$ref": "#/$defs/Source",
"description": "Spec specifies the source to mount"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"dest",
"spec"
],
"description": "SourceMount is used to take a [Source] and mount it into a build step."
},
"Spec": {
"properties": {
"name": {
"type": "string",
"description": "Name is the name of the package."
},
"description": {
"type": "string",
"description": "Description is a short description of the package."
},
"website": {
"type": "string",
"description": "Website is the URL to store in the metadata of the package."
},
"version": {
"type": "string",
"description": "Version sets the version of the package."
},
"revision": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "Revision sets the package revision.\nThis will generally get merged into the package version when generating the package."
},
"noarch": {
"type": "boolean",
"description": "Marks the package as architecture independent.\nIt is up to the package author to ensure that the package is actually architecture independent.\nThis is metadata only."
},
"conflicts": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object",
"description": "Conflicts is the list of packages that conflict with the generated package.\nThis will prevent the package from being installed if any of these packages are already installed or vice versa."
},
"replaces": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "object",
"description": "Replaces is the list of packages that are replaced by the generated package."
},
"provides": {
"items": {
"type": "string"
},
"type": "array",
"description": "Provides is the list of things that the generated package provides.\nThis can be used to satisfy dependencies of other packages.\nAs an example, the moby-runc package provides \"runc\", other packages could depend on \"runc\" and be satisfied by moby-runc.\nThis is an advanced use case and consideration should be taken to ensure that the package actually provides the thing it claims to provide."
},
"sources": {
"additionalProperties": {
"$ref": "#/$defs/Source"
},
"type": "object",
"description": "Sources is the list of sources to use to build the artifact(s).\nThe map key is the name of the source and the value is the source configuration.\nThe source configuration is used to fetch the source and filter the files to include/exclude.\nThis can be mounted into the build using the \"Mounts\" field in the StepGroup.\n\nSources can be embedded in the main spec as here or overriden in a build request."
},
"patches": {
"additionalProperties": {
"items": {
"$ref": "#/$defs/PatchSpec"
},
"type": "array"
},
"type": "object",
"description": "Patches is the list of patches to apply to the sources.\nThe map key is the name of the source to apply the patches to.\nThe value is the list of patches to apply to the source.\nThe patch must be present in the `Sources` map.\nEach patch is applied in order and the result is used as the source for the build."
},
"build": {
"$ref": "#/$defs/ArtifactBuild",
"description": "Build is the configuration for building the artifacts in the package."
},
"args": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Args is the list of arguments that can be used for shell-style expansion in (certain fields of) the spec.\nAny arg supplied in the build request which does not appear in this list will cause an error.\nAttempts to use an arg in the spec which is not specified here will assume to be a literal string.\nThe map value is the default value to use if the arg is not supplied in the build request."
},
"license": {
"type": "string",
"description": "License is the license of the package."
},
"vendor": {
"type": "string",
"description": "Vendor is the vendor of the package."
},
"packager": {
"type": "string",
"description": "Packager is the name of the person,team,company that packaged the package."
},
"artifacts": {
"$ref": "#/$defs/Artifacts",
"description": "Artifacts is the list of artifacts to include in the package."
},
"targets": {
"additionalProperties": {
"$ref": "#/$defs/Target"
},
"type": "object",
"description": "The list of distro targets to build the package for."
},
"dependencies": {
"$ref": "#/$defs/PackageDependencies",
"description": "Dependencies are the different dependencies that need to be specified in the package.\nDependencies are overwritten if specified in the target map for the requested distro."
},
"package_config": {
"$ref": "#/$defs/PackageConfig",
"description": "PackageConfig is the configuration to use for artifact targets, such as\nrpms, debs, or zip files containing Windows binaries"
},
"image": {
"$ref": "#/$defs/ImageConfig",
"description": "Image is the image configuration when the target output is a container image.\nThis is overwritten if specified in the target map for the requested distro."
},
"changelog": {
"items": {
"$ref": "#/$defs/ChangelogEntry"
},
"type": "array",
"description": "Changelog is the list of changes to the package."
},
"tests": {
"items": {
"$ref": "#/$defs/TestSpec"
},
"type": "array",
"description": "Tests are the list of tests to run for the package that should work regardless of target OS\nEach item in this list is run with a separate rootfs and cannot interact with other tests.\nEach [TestSpec] is run with a separate rootfs, asyncronously from other [TestSpec]."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"name",
"description",
"website",
"version",
"revision",
"license"
],
"description": "Spec is the specification for a package build."
},
"SymlinkTarget": {
"properties": {
"path": {
"type": "string",
"description": "Path is the path where the symlink should be placed"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"path"
],
"description": "SymlinkTarget specifies the properties of a symlink"
},
"SystemdConfiguration": {
"properties": {
"units": {
"additionalProperties": {
"$ref": "#/$defs/SystemdUnitConfig"
},
"type": "object",
"description": "Units is a list of systemd units to include in the package."
},
"dropins": {
"additionalProperties": {
"$ref": "#/$defs/SystemdDropinConfig"
},
"type": "object",
"description": "Dropins is a list of systemd drop in files that should be included in the package"
}
},
"additionalProperties": false,
"type": "object"
},
"SystemdDropinConfig": {
"properties": {
"name": {
"type": "string",
"description": "Name is file or dir name to use for the artifact in the package.\nIf empty, the file or dir name from the produced artifact will be used."
},
"unit": {
"type": "string",
"description": "Unit is the name of the systemd unit that the dropin files should be copied under."
}
},
"additionalProperties": false,
"type": "object",
"required": [
"unit"
]
},
"SystemdUnitConfig": {
"properties": {
"name": {
"type": "string",
"description": "Name is the name systemd unit should be copied under.\nNested paths are not supported. It is the user's responsibility\nto name the service with the appropriate extension, i.e. .service, .timer, etc."
},
"enable": {
"type": "boolean",
"description": "Enable is used to enable the systemd unit on install\nThis determines what will be written to a systemd preset file"
}