forked from dagger/dagger
/
schema.graphqls
2263 lines (1768 loc) · 58.8 KB
/
schema.graphqls
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
"""
Indicates that a field may resolve to different values when called repeatedly
with the same inputs, or that the field has side effects. Impure fields are never cached.
"""
directive @impure(
"""
Explains why this element is impure, i.e. whether it performs side effects or
yield a different result with the same arguments.
"""
reason: String!
) on FIELD_DEFINITION
"""
Indicates that a field's selection can be removed from any query without
changing the result. Meta fields are dropped from cache keys.
"""
directive @meta on FIELD_DEFINITION
"""Key value object that represents a build argument."""
input BuildArg {
"""The build argument name."""
name: String!
"""The build argument value."""
value: String!
}
"""Sharing mode of the cache volume."""
enum CacheSharingMode {
"""Shares the cache volume amongst many build pipelines"""
SHARED
"""Keeps a cache volume for a single build pipeline"""
PRIVATE
"""
Shares the cache volume amongst many build pipelines, but will serialize the writes
"""
LOCKED
}
"""A directory whose contents persist across runs."""
type CacheVolume {
"""A unique identifier for this CacheVolume."""
id: CacheVolumeID!
}
"""
The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
"""
scalar CacheVolumeID
"""An OCI-compatible container, also known as a Docker container."""
type Container {
"""
Turn the container into a Service.
Be sure to set any exposed ports before this conversion.
"""
asService: Service!
"""Returns a File representing the container serialized to a tarball."""
asTarball(
"""
Force each layer of the image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the
engine's cache, that will be used (this can result in a mix of compression
algorithms for different layers). If this is unset and a layer has no
compressed blob in the engine's cache, then it will be compressed using Gzip.
"""
forcedCompression: ImageLayerCompression
"""
Use the specified media types for the image's layers.
Defaults to OCI, which is largely compatible with most recent container
runtimes, but Docker may be needed for older runtimes without OCI support.
"""
mediaTypes: ImageMediaTypes = OCIMediaTypes
"""
Identifiers for other platform specific containers.
Used for multi-platform images.
"""
platformVariants: [ContainerID!] = []
): File!
"""Initializes this container from a Dockerfile build."""
build(
"""Additional build arguments."""
buildArgs: [BuildArg!] = []
"""Directory context used by the Dockerfile."""
context: DirectoryID!
"""Path to the Dockerfile to use."""
dockerfile: String = "Dockerfile"
"""
Secrets to pass to the build.
They will be mounted at /run/secrets/[secret-name] in the build container
They can be accessed in the Dockerfile using the "secret" mount type and
mount path /run/secrets/[secret-name], e.g. RUN
--mount=type=secret,id=my-secret curl http://example.com?token=$(cat
/run/secrets/my-secret)
"""
secrets: [SecretID!] = []
"""Target build stage to build."""
target: String = ""
): Container!
"""Retrieves default arguments for future commands."""
defaultArgs: [String!]!
"""
Retrieves a directory at the given path.
Mounts are included.
"""
directory(
"""The path of the directory to retrieve (e.g., "./src")."""
path: String!
): Directory!
"""Retrieves entrypoint to be prepended to the arguments of all commands."""
entrypoint: [String!]!
"""Retrieves the value of the specified environment variable."""
envVariable(
"""The name of the environment variable to retrieve (e.g., "PATH")."""
name: String!
): String
"""Retrieves the list of environment variables passed to commands."""
envVariables: [EnvVariable!]!
"""
EXPERIMENTAL API! Subject to change/removal at any time.
Configures all available GPUs on the host to be accessible to this container.
This currently works for Nvidia devices only.
"""
experimentalWithAllGPUs: Container!
"""
EXPERIMENTAL API! Subject to change/removal at any time.
Configures the provided list of devices to be accesible to this container.
This currently works for Nvidia devices only.
"""
experimentalWithGPU(
"""List of devices to be accessible to this container."""
devices: [String!]!
): Container!
"""
Writes the container as an OCI tarball to the destination file path on the host.
Return true on success.
It can also export platform variants.
"""
export(
"""
Force each layer of the exported image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the
engine's cache, that will be used (this can result in a mix of compression
algorithms for different layers). If this is unset and a layer has no
compressed blob in the engine's cache, then it will be compressed using Gzip.
"""
forcedCompression: ImageLayerCompression
"""
Use the specified media types for the exported image's layers.
Defaults to OCI, which is largely compatible with most recent container
runtimes, but Docker may be needed for older runtimes without OCI support.
"""
mediaTypes: ImageMediaTypes = OCIMediaTypes
"""
Host's destination path (e.g., "./tarball").
Path can be relative to the engine's workdir or absolute.
"""
path: String!
"""
Identifiers for other platform specific containers.
Used for multi-platform image.
"""
platformVariants: [ContainerID!] = []
): Boolean!
"""
Retrieves the list of exposed ports.
This includes ports already exposed by the image, even if not explicitly added with dagger.
"""
exposedPorts: [Port!]!
"""
Retrieves a file at the given path.
Mounts are included.
"""
file(
"""The path of the file to retrieve (e.g., "./README.md")."""
path: String!
): File!
"""Initializes this container from a pulled base image."""
from(
"""
Image's address from its registry.
Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main").
"""
address: String!
): Container!
"""A unique identifier for this Container."""
id: ContainerID!
"""
The unique image reference which can only be retrieved immediately after the 'Container.From' call.
"""
imageRef: String!
"""Reads the container from an OCI tarball."""
import(
"""File to read the container from."""
source: FileID!
"""
Identifies the tag to import from the archive, if the archive bundles multiple tags.
"""
tag: String = ""
): Container!
"""Retrieves the value of the specified label."""
label(
"""The name of the label (e.g., "org.opencontainers.artifact.created")."""
name: String!
): String
"""Retrieves the list of labels passed to container."""
labels: [Label!]!
"""Retrieves the list of paths where a directory is mounted."""
mounts: [String!]!
"""Creates a named sub-pipeline."""
pipeline(
"""Description of the sub-pipeline."""
description: String = ""
"""Labels to apply to the sub-pipeline."""
labels: [PipelineLabel!] = []
"""Name of the sub-pipeline."""
name: String!
): Container!
"""The platform this container executes and publishes as."""
platform: Platform!
"""
Publishes this container as a new image to the specified address.
Publish returns a fully qualified ref.
It can also publish platform variants.
"""
publish(
"""
Registry's address to publish the image to.
Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main").
"""
address: String!
"""
Force each layer of the published image to use the specified compression algorithm.
If this is unset, then if a layer already has a compressed blob in the
engine's cache, that will be used (this can result in a mix of compression
algorithms for different layers). If this is unset and a layer has no
compressed blob in the engine's cache, then it will be compressed using Gzip.
"""
forcedCompression: ImageLayerCompression
"""
Use the specified media types for the published image's layers.
Defaults to OCI, which is largely compatible with most recent registries,
but Docker may be needed for older registries without OCI support.
"""
mediaTypes: ImageMediaTypes = OCIMediaTypes
"""
Identifiers for other platform specific containers.
Used for multi-platform image.
"""
platformVariants: [ContainerID!] = []
): String!
"""Retrieves this container's root filesystem. Mounts are not included."""
rootfs: Directory!
"""
Return an interactive terminal for this container using its configured shell
if not overridden by args (or sh as a fallback default).
"""
shell(
"""
If set, override the container's default shell and invoke these arguments instead.
"""
args: [String!]
): Terminal!
"""
The error stream of the last executed command.
Will execute default command if none is set, or error if there's no default.
"""
stderr: String!
"""
The output stream of the last executed command.
Will execute default command if none is set, or error if there's no default.
"""
stdout: String!
"""
Forces evaluation of the pipeline in the engine.
It doesn't run the default command if no exec has been set.
"""
sync: ContainerID!
"""Retrieves the user to be set for all commands."""
user: String!
"""Configures default arguments for future commands."""
withDefaultArgs(
"""
Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]).
"""
args: [String!]!
): Container!
"""Set the default command to invoke for the "shell" API."""
withDefaultShell(
"""The args of the command to set the default shell to."""
args: [String!]!
): Container!
"""Retrieves this container plus a directory written at the given path."""
withDirectory(
"""Identifier of the directory to write"""
directory: DirectoryID!
"""
Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
"""
exclude: [String!] = []
"""
Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
"""
include: [String!] = []
"""
A user:group to set for the directory and its contents.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the written directory (e.g., "/tmp/directory")."""
path: String!
): Container!
"""Retrieves this container but with a different command entrypoint."""
withEntrypoint(
"""Entrypoint to use for future executions (e.g., ["go", "run"])."""
args: [String!]!
"""Don't remove the default arguments when setting the entrypoint."""
keepDefaultArgs: Boolean = false
): Container!
"""Retrieves this container plus the given environment variable."""
withEnvVariable(
"""
Replace `${VAR}` or `$VAR` in the value according to the current environment
variables defined in the container (e.g., "/opt/bin:$PATH").
"""
expand: Boolean = false
"""The name of the environment variable (e.g., "HOST")."""
name: String!
"""The value of the environment variable. (e.g., "localhost")."""
value: String!
): Container!
"""
Retrieves this container after executing the specified command inside it.
"""
withExec(
"""
Command to run instead of the container's default command (e.g., ["run", "main.go"]).
If empty, the container's default command is used.
"""
args: [String!]!
"""
Provides dagger access to the executed command.
Do not use this option unless you trust the command being executed; the
command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.
"""
experimentalPrivilegedNesting: Boolean = false
"""
Execute the command with all root capabilities. This is similar to running a
command with "sudo" or executing "docker run" with the "--privileged" flag.
Containerization does not provide any security guarantees when using this
option. It should only be used when absolutely necessary and only with
trusted commands.
"""
insecureRootCapabilities: Boolean = false
"""
Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
"""
redirectStderr: String = ""
"""
Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
"""
redirectStdout: String = ""
"""
If the container has an entrypoint, ignore it for args rather than using it to wrap them.
"""
skipEntrypoint: Boolean = false
"""
Content to write to the command's standard input before closing (e.g., "Hello world").
"""
stdin: String = ""
): Container!
"""
Expose a network port.
Exposed ports serve two purposes:
- For health checks and introspection, when running services
- For setting the EXPOSE OCI field when publishing the container
"""
withExposedPort(
"""Optional port description"""
description: String
"""Skip the health check when run as a service."""
experimentalSkipHealthcheck: Boolean = false
"""Port number to expose"""
port: Int!
"""Transport layer network protocol"""
protocol: NetworkProtocol = TCP
): Container!
"""
Retrieves this container plus the contents of the given file copied to the given path.
"""
withFile(
"""
A user:group to set for the file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the copied file (e.g., "/tmp/file.txt")."""
path: String!
"""Permission given to the copied file (e.g., 0600)."""
permissions: Int
"""Identifier of the file to copy."""
source: FileID!
): Container!
"""
Retrieves this container plus the contents of the given files copied to the given path.
"""
withFiles(
"""
A user:group to set for the files.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location where copied files should be placed (e.g., "/src")."""
path: String!
"""Permission given to the copied files (e.g., 0600)."""
permissions: Int
"""Identifiers of the files to copy."""
sources: [FileID!]!
): Container!
"""
Indicate that subsequent operations should be featured more prominently in the UI.
"""
withFocus: Container!
"""Retrieves this container plus the given label."""
withLabel(
"""The name of the label (e.g., "org.opencontainers.artifact.created")."""
name: String!
"""The value of the label (e.g., "2023-01-01T00:00:00Z")."""
value: String!
): Container!
"""
Retrieves this container plus a cache volume mounted at the given path.
"""
withMountedCache(
"""Identifier of the cache volume to mount."""
cache: CacheVolumeID!
"""
A user:group to set for the mounted cache directory.
Note that this changes the ownership of the specified mount along with the
initial filesystem provided by source (if any). It does not have any effect
if/when the cache has already been created.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the cache directory (e.g., "/cache/node_modules")."""
path: String!
"""Sharing mode of the cache volume."""
sharing: CacheSharingMode = SHARED
"""Identifier of the directory to use as the cache volume's root."""
source: DirectoryID
): Container!
"""Retrieves this container plus a directory mounted at the given path."""
withMountedDirectory(
"""
A user:group to set for the mounted directory and its contents.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the mounted directory (e.g., "/mnt/directory")."""
path: String!
"""Identifier of the mounted directory."""
source: DirectoryID!
): Container!
"""Retrieves this container plus a file mounted at the given path."""
withMountedFile(
"""
A user or user:group to set for the mounted file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the mounted file (e.g., "/tmp/file.txt")."""
path: String!
"""Identifier of the mounted file."""
source: FileID!
): Container!
"""
Retrieves this container plus a secret mounted into a file at the given path.
"""
withMountedSecret(
"""
Permission given to the mounted secret (e.g., 0600).
This option requires an owner to be set to be active.
"""
mode: Int = 256
"""
A user:group to set for the mounted secret.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the secret file (e.g., "/tmp/secret.txt")."""
path: String!
"""Identifier of the secret to mount."""
source: SecretID!
): Container!
"""
Retrieves this container plus a temporary directory mounted at the given path.
"""
withMountedTemp(
"""Location of the temporary directory (e.g., "/tmp/temp_dir")."""
path: String!
): Container!
"""Retrieves this container plus a new file written at the given path."""
withNewFile(
"""Content of the file to write (e.g., "Hello world!")."""
contents: String = ""
"""
A user:group to set for the file.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the written file (e.g., "/tmp/file.txt")."""
path: String!
"""Permission given to the written file (e.g., 0600)."""
permissions: Int = 420
): Container!
"""
Retrieves this container with unset default arguments for future commands.
"""
withoutDefaultArgs: Container!
"""Retrieves this container with an unset command entrypoint."""
withoutEntrypoint(
"""Don't remove the default arguments when unsetting the entrypoint."""
keepDefaultArgs: Boolean = false
): Container!
"""Retrieves this container minus the given environment variable."""
withoutEnvVariable(
"""The name of the environment variable (e.g., "HOST")."""
name: String!
): Container!
"""Unexpose a previously exposed port."""
withoutExposedPort(
"""Port number to unexpose"""
port: Int!
"""Port protocol to unexpose"""
protocol: NetworkProtocol = TCP
): Container!
"""
Indicate that subsequent operations should not be featured more prominently in the UI.
This is the initial state of all containers.
"""
withoutFocus: Container!
"""Retrieves this container minus the given environment label."""
withoutLabel(
"""
The name of the label to remove (e.g., "org.opencontainers.artifact.created").
"""
name: String!
): Container!
"""
Retrieves this container after unmounting everything at the given path.
"""
withoutMount(
"""Location of the cache directory (e.g., "/cache/node_modules")."""
path: String!
): Container!
"""
Retrieves this container without the registry authentication of a given address.
"""
withoutRegistryAuth(
"""
Registry's address to remove the authentication from.
Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
"""
address: String!
): Container!
"""Retrieves this container with a previously added Unix socket removed."""
withoutUnixSocket(
"""Location of the socket to remove (e.g., "/tmp/socket")."""
path: String!
): Container!
"""
Retrieves this container with an unset command user.
Should default to root.
"""
withoutUser: Container!
"""
Retrieves this container with an unset working directory.
Should default to "/".
"""
withoutWorkdir: Container!
"""
Retrieves this container with a registry authentication for a given address.
"""
withRegistryAuth(
"""
Registry's address to bind the authentication to.
Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).
"""
address: String!
"""The API key, password or token to authenticate to this registry."""
secret: SecretID!
"""The username of the registry's account (e.g., "Dagger")."""
username: String!
): Container!
"""Retrieves the container with the given directory mounted to /."""
withRootfs(
"""Directory to mount."""
directory: DirectoryID!
): Container!
"""
Retrieves this container plus an env variable containing the given secret.
"""
withSecretVariable(
"""The name of the secret variable (e.g., "API_SECRET")."""
name: String!
"""The identifier of the secret value."""
secret: SecretID!
): Container!
"""
Establish a runtime dependency on a service.
The service will be started automatically when needed and detached when it is
no longer needed, executing the default command if none is set.
The service will be reachable from the container via the provided hostname alias.
The service dependency will also convey to any files or directories produced by the container.
"""
withServiceBinding(
"""A name that can be used to reach the service from the container"""
alias: String!
"""Identifier of the service container"""
service: ServiceID!
): Container!
"""
Retrieves this container plus a socket forwarded to the given Unix socket path.
"""
withUnixSocket(
"""
A user:group to set for the mounted socket.
The user and group can either be an ID (1000:1000) or a name (foo:bar).
If the group is omitted, it defaults to the same as the user.
"""
owner: String = ""
"""Location of the forwarded Unix socket (e.g., "/tmp/socket")."""
path: String!
"""Identifier of the socket to forward."""
source: SocketID!
): Container!
"""Retrieves this container with a different command user."""
withUser(
"""The user to set (e.g., "root")."""
name: String!
): Container!
"""Retrieves this container with a different working directory."""
withWorkdir(
"""The path to set as the working directory (e.g., "/app")."""
path: String!
): Container!
"""Retrieves the working directory for all commands."""
workdir: String!
}
"""
The `ContainerID` scalar type represents an identifier for an object of type Container.
"""
scalar ContainerID
"""Reflective module API provided to functions at runtime."""
type CurrentModule {
"""A unique identifier for this CurrentModule."""
id: CurrentModuleID!
"""The name of the module being executed in"""
name: String!
"""
The directory containing the module's source code loaded into the engine (plus
any generated code that may have been created).
"""
source: Directory!
"""
Load a directory from the module's scratch working directory, including any
changes that may have been made to it during module function execution.
"""
workdir(
"""
Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
"""
exclude: [String!] = []
"""
Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
"""
include: [String!] = []
"""Location of the directory to access (e.g., ".")."""
path: String!
): Directory!
"""
Load a file from the module's scratch working directory, including any changes
that may have been made to it during module function execution.Load a file
from the module's scratch working directory, including any changes that may
have been made to it during module function execution.
"""
workdirFile(
"""Location of the file to retrieve (e.g., "README.md")."""
path: String!
): File!
}
"""
The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
"""
scalar CurrentModuleID
"""A directory."""
type Directory {
"""Load the directory as a Dagger module"""
asModule(
"""
An optional subpath of the directory which contains the module's source code.
This is needed when the module code is in a subdirectory but requires parent
directories to be loaded in order to execute. For example, the module source
code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
If not set, the module source code is loaded from the root of the directory.
"""
sourceSubpath: String = "/"
): Module!
"""Gets the difference between this directory and an another directory."""
diff(
"""Identifier of the directory to compare."""
other: DirectoryID!
): Directory!
"""Retrieves a directory at the given path."""
directory(
"""Location of the directory to retrieve (e.g., "/src")."""
path: String!
): Directory!
"""Builds a new Docker container from this directory."""
dockerBuild(
"""Build arguments to use in the build."""
buildArgs: [BuildArg!] = []
"""Path to the Dockerfile to use (e.g., "frontend.Dockerfile")."""
dockerfile: String = "Dockerfile"
"""The platform to build."""
platform: Platform
"""
Secrets to pass to the build.
They will be mounted at /run/secrets/[secret-name].
"""
secrets: [SecretID!] = []
"""Target build stage to build."""
target: String = ""
): Container!
"""Returns a list of files and directories at the given path."""
entries(
"""Location of the directory to look at (e.g., "/src")."""
path: String
): [String!]!
"""Writes the contents of the directory to a path on the host."""
export(
"""Location of the copied directory (e.g., "logs/")."""
path: String!
): Boolean!
"""Retrieves a file at the given path."""
file(
"""Location of the file to retrieve (e.g., "README.md")."""
path: String!
): File!
"""Returns a list of files and directories that matche the given pattern."""
glob(
"""Pattern to match (e.g., "*.md")."""
pattern: String!
): [String!]!
"""A unique identifier for this Directory."""
id: DirectoryID!
"""Creates a named sub-pipeline."""
pipeline(
"""Description of the sub-pipeline."""
description: String = ""
"""Labels to apply to the sub-pipeline."""
labels: [PipelineLabel!] = []
"""Name of the sub-pipeline."""
name: String!
): Directory!
"""Force evaluation in the engine."""
sync: DirectoryID!
"""Retrieves this directory plus a directory written at the given path."""
withDirectory(
"""Identifier of the directory to copy."""
directory: DirectoryID!
"""
Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
"""