diff --git a/docs/reference/universe/aws/cloudformation.md b/docs/reference/universe/aws/cloudformation.md index 38cf4d24..a16640de 100644 --- a/docs/reference/universe/aws/cloudformation.md +++ b/docs/reference/universe/aws/cloudformation.md @@ -4,7 +4,7 @@ sidebar_label: cloudformation # dagger.io/aws/cloudformation -AWS Cloud Formation +AWS CloudFormation ## #Stack @@ -19,10 +19,13 @@ AWS CloudFormation Stack |*config.secretKey* | `dagger.#Secret` |AWS secret key | |*source* | `string` |Source is the Cloudformation template (JSON/YAML string) | |*stackName* | `string` |Stackname is the cloudformation stack | +|*parameters* | `struct` |Stack parameters | |*onFailure* | `*"DO_NOTHING" \| "ROLLBACK" \| "DELETE"` |Behavior when failure to create/update the Stack | |*timeout* | `*10 \| \>=0 & int` |Maximum waiting time until stack creation/update (in minutes) | -|*neverUpdate* | `*false \| bool` |Never update the stack if already exists | +|*neverUpdate* | `*false \| true` |Never update the stack if already exists | ### #Stack Outputs -_No output._ +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*outputs* | `struct` |- | diff --git a/docs/reference/universe/aws/ecr.md b/docs/reference/universe/aws/ecr.md index 0abf3ad4..2091c5f0 100644 --- a/docs/reference/universe/aws/ecr.md +++ b/docs/reference/universe/aws/ecr.md @@ -8,7 +8,7 @@ Amazon Elastic Container Registry (ECR) ## #Credentials -Convert AWS credentials to Docker Registry credentials for ECR +Convert ECR credentials to Docker Login format ### #Credentials Inputs @@ -23,4 +23,7 @@ Convert AWS credentials to Docker Registry credentials for ECR ### #Credentials Outputs -_No output._ +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*username* | `"AWS"` |ECR registry | +|*secret* | `string` |ECR registry secret | diff --git a/docs/reference/universe/aws/rds.md b/docs/reference/universe/aws/rds.md index 334b4f64..d913e955 100644 --- a/docs/reference/universe/aws/rds.md +++ b/docs/reference/universe/aws/rds.md @@ -6,11 +6,11 @@ sidebar_label: rds AWS Relational Database Service (RDS) -## #CreateDB +## #Database Creates a new Database on an existing RDS Instance -### #CreateDB Inputs +### #Database Inputs | Name | Type | Description | | ------------- |:-------------: |:-------------: | @@ -22,36 +22,12 @@ Creates a new Database on an existing RDS Instance |*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | |*dbType* | `string` |Database type MySQL or PostgreSQL (Aurora Serverless only) | -### #CreateDB Outputs +### #Database Outputs | Name | Type | Description | | ------------- |:-------------: |:-------------: | |*out* | `string` |Name of the DB created | -## #CreateUser - -Creates a new user credentials on an existing RDS Instance - -### #CreateUser Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*username* | `string` |Username | -|*password* | `string` |Password | -|*dbArn* | `string` |ARN of the database instance | -|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | -|*grantDatabase* | `*"" \| string` |Name of the database to grants access to | -|*dbType* | `string` |Database type MySQL or PostgreSQL (Aurora Serverless only) | - -### #CreateUser Outputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*out* | `string` |Outputed username | - ## #Instance Fetches information on an existing RDS Instance @@ -72,3 +48,27 @@ Fetches information on an existing RDS Instance |*hostname* | `_\|_` |DB hostname | |*port* | `_\|_` |DB port | |*info* | `_\|_` |- | + +## #User + +Creates a new user credentials on an existing RDS Instance + +### #User Inputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.region* | `string` |AWS region | +|*config.accessKey* | `dagger.#Secret` |AWS access key | +|*config.secretKey* | `dagger.#Secret` |AWS secret key | +|*username* | `string` |Username | +|*password* | `string` |Password | +|*dbArn* | `string` |ARN of the database instance | +|*secretArn* | `string` |ARN of the database secret (for connecting via rds api) | +|*grantDatabase* | `*"" \| string` |Name of the database to grants access to | +|*dbType* | `string` |Database type MySQL or PostgreSQL (Aurora Serverless only) | + +### #User Outputs + +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*out* | `string` |Outputed username | diff --git a/docs/reference/universe/aws/s3.md b/docs/reference/universe/aws/s3.md index 2882e13e..8b114d7f 100644 --- a/docs/reference/universe/aws/s3.md +++ b/docs/reference/universe/aws/s3.md @@ -6,45 +6,24 @@ sidebar_label: s3 AWS Simple Storage Service -## #Put +## #Object -S3 Bucket upload (file or directory) +S3 Bucket object(s) sync -### #Put Inputs +### #Object Inputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*target* | `string` |Target S3 URL (eg. s3://\/\/\) | -|*contentType* | `*"" \| string` |Object content type | -|*always* | `*true \| bool` |Always write the object to S3 | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*config.region* | `string` |AWS region | +|*config.accessKey* | `dagger.#Secret` |AWS access key | +|*config.secretKey* | `dagger.#Secret` |AWS secret key | +|*source* | `dagger.#Artifact` |Source Artifact to upload to S3 | +|*target* | `string` |Target S3 URL (eg. s3://\/\/\) | +|*delete* | `*false \| true` |Delete files that already exist on remote destination | +|*contentType* | `*"" \| string` |Object content type | +|*always* | `*true \| false` |Always write the object to S3 | -### #Put Outputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*url* | `string` |URL of the uploaded S3 object | - -## #Sync - -S3 Bucket sync - -### #Sync Inputs - -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*config.region* | `string` |AWS region | -|*config.accessKey* | `dagger.#Secret` |AWS access key | -|*config.secretKey* | `dagger.#Secret` |AWS secret key | -|*source* | `dagger.#Artifact` |Source Artifact to upload to S3 | -|*target* | `string` |Target S3 URL (eg. s3://\/\/\) | -|*delete* | `*false \| bool` |Files that exist in the destination but not in the source are deleted during sync. | -|*contentType* | `*"" \| string` |Object content type | -|*always* | `*true \| bool` |Always write the object to S3 | - -### #Sync Outputs +### #Object Outputs | Name | Type | Description | | ------------- |:-------------: |:-------------: | diff --git a/docs/reference/universe/gcp/gcr.md b/docs/reference/universe/gcp/gcr.md index 883d9e14..88b86853 100644 --- a/docs/reference/universe/gcp/gcr.md +++ b/docs/reference/universe/gcp/gcr.md @@ -20,6 +20,7 @@ Credentials retriever for GCR ### #Credentials Outputs -| Name | Type | Description | -| ------------- |:-------------: |:-------------: | -|*secret* | `string` |- | +| Name | Type | Description | +| ------------- |:-------------: |:-------------: | +|*username* | `"oauth2accesstoken"` |GCR registry username | +|*secret* | `string` |GCR registry secret | diff --git a/docs/reference/universe/kubernetes/helm.md b/docs/reference/universe/kubernetes/helm.md index 15c2e983..be9b8abe 100644 --- a/docs/reference/universe/kubernetes/helm.md +++ b/docs/reference/universe/kubernetes/helm.md @@ -4,6 +4,8 @@ sidebar_label: helm # dagger.io/kubernetes/helm +Helm package manager + ## #Chart Install a Helm chart diff --git a/examples/jamstack/backend.cue b/examples/jamstack/backend.cue index 200d389c..ad79986e 100644 --- a/examples/jamstack/backend.cue +++ b/examples/jamstack/backend.cue @@ -8,13 +8,14 @@ import ( // Backend configuration backend: { + // Source code to build this container source: git.#Repository | dagger.#Artifact @dagger(input) // Container environment variables environment: { - [string]: string @dagger(input) - } + [string]: string + } @dagger(input) // Public hostname (need to match the master domain configures on the loadbalancer) hostname: string @dagger(input) @@ -39,16 +40,16 @@ backend: { dockerfilePath: *"" | string @dagger(input) // docker build args dockerBuildArgs: { - [string]: string @dagger(input) - } + [string]: string + } @dagger(input) } // Init container runs only once when the main container starts initContainer: { command: [...string] @dagger(input) environment: { - [string]: string @dagger(input) - } + [string]: string + } @dagger(input) } } diff --git a/examples/jamstack/database.cue b/examples/jamstack/database.cue index ab3f470b..46fe445a 100644 --- a/examples/jamstack/database.cue +++ b/examples/jamstack/database.cue @@ -9,7 +9,7 @@ database: { let slug = name dbType: "mysql" | "postgresql" @dagger(input) - db: rds.#CreateDB & { + db: rds.#Database & { config: infra.awsConfig name: slug dbArn: infra.rdsInstanceArn @@ -17,7 +17,7 @@ database: { secretArn: infra.rdsAdminSecretArn } - user: rds.#CreateUser & { + user: rds.#User & { config: infra.awsConfig dbArn: infra.rdsInstanceArn "dbType": dbType diff --git a/examples/simple-s3/main.cue b/examples/simple-s3/main.cue index 3301655b..7235ab19 100644 --- a/examples/simple-s3/main.cue +++ b/examples/simple-s3/main.cue @@ -20,7 +20,7 @@ source: dagger.#Artifact @dagger(input) // Deployed URL url: "\(deploy.url)index.html" @dagger(output) -deploy: s3.#Put & { +deploy: s3.#Object & { always: true config: awsConfig "source": source diff --git a/stdlib/.dagger/env/aws-s3/plan/s3.cue b/stdlib/.dagger/env/aws-s3/plan/s3.cue index 8968493c..dfe20f5a 100644 --- a/stdlib/.dagger/env/aws-s3/plan/s3.cue +++ b/stdlib/.dagger/env/aws-s3/plan/s3.cue @@ -14,44 +14,11 @@ bucket: "dagger-ci" content: "A simple test sentence" -TestS3UploadFile: { - deploy: s3.#Put & { - config: TestConfig.awsConfig - sourceInline: content - target: "s3://\(bucket)/test.txt" - } - - verify: #VerifyS3 & { - config: TestConfig.awsConfig - target: deploy.target - file: "test.txt" - } -} - TestDirectory: dagger.#Artifact -TestS3UploadDir: { - deploy: s3.#Put & { - config: TestConfig.awsConfig - source: TestDirectory - target: "s3://\(bucket)/" - } - - verifyFile: #VerifyS3 & { - config: TestConfig.awsConfig - target: deploy.target - file: "dirFile.txt" - } - - verifyDir: #VerifyS3 & { - config: TestConfig.awsConfig - target: deploy.target - file: "foo.txt" - } -} - -TestS3Sync: { - deploy: s3.#Sync & { +TestS3Object: { + deploy: s3.#Object & { + always: true config: TestConfig.awsConfig source: TestDirectory target: "s3://\(bucket)/" diff --git a/stdlib/alpine/alpine.cue b/stdlib/alpine/alpine.cue index 071c8f20..4e9735ac 100644 --- a/stdlib/alpine/alpine.cue +++ b/stdlib/alpine/alpine.cue @@ -5,13 +5,17 @@ import ( "dagger.io/dagger/op" ) +// Default Alpine version let defaultVersion = "3.13.5@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f" // Base image for Alpine Linux #Image: { + // List of packages to install package: [string]: true | false | string + // Alpine version to install version: string | *defaultVersion + // Use of os package not possible : alpine is a low level component #up: [ op.#FetchContainer & { ref: "index.docker.io/alpine:\(version)" diff --git a/stdlib/aws/cloudformation/cloudformation.cue b/stdlib/aws/cloudformation/cloudformation.cue index 17c0ece9..9cbb4909 100644 --- a/stdlib/aws/cloudformation/cloudformation.cue +++ b/stdlib/aws/cloudformation/cloudformation.cue @@ -1,4 +1,4 @@ -// AWS Cloud Formation +// AWS CloudFormation package cloudformation import ( @@ -23,7 +23,7 @@ import ( // Stack parameters parameters: { ... - } + } @dagger(input) // Behavior when failure to create/update the Stack onFailure: *"DO_NOTHING" | "ROLLBACK" | "DELETE" @dagger(input) @@ -32,7 +32,7 @@ import ( timeout: *10 | uint @dagger(input) // Never update the stack if already exists - neverUpdate: *false | bool @dagger(input) + neverUpdate: *false | true @dagger(input) #files: { "/entrypoint.sh": #Code @@ -48,8 +48,8 @@ import ( } outputs: { - [string]: string @dagger(output) - } + [string]: string + } @dagger(output) outputs: #up: [ op.#Load & { diff --git a/stdlib/aws/ecr/ecr.cue b/stdlib/aws/ecr/ecr.cue index cf2cd5a2..2ee4d7cc 100644 --- a/stdlib/aws/ecr/ecr.cue +++ b/stdlib/aws/ecr/ecr.cue @@ -6,13 +6,13 @@ import ( "dagger.io/os" ) -// Convert AWS credentials to Docker Registry credentials for ECR +// Convert ECR credentials to Docker Login format #Credentials: { // AWS Config config: aws.#Config - // ECR credentials - username: "AWS" + // ECR registry + username: "AWS" @dagger(output) ctr: os.#Container & { image: aws.#CLI & { @@ -22,10 +22,11 @@ import ( command: "aws ecr get-login-password > /out" } + // ECR registry secret secret: { os.#File & { - from: ctr - path: "/out" - } - }.read.data + from: ctr + path: "/out" + } + }.read.data @dagger(output) } diff --git a/stdlib/aws/ecs/run-task.cue b/stdlib/aws/ecs/run-task.cue index 3e6e0b0e..06b848de 100644 --- a/stdlib/aws/ecs/run-task.cue +++ b/stdlib/aws/ecs/run-task.cue @@ -5,8 +5,8 @@ import ( "dagger.io/aws" ) -// RunTask implements ecs run-task for running a single container on ECS -#RunTask: { +// Task implements ecs run-task for running a single container on ECS +#Task: { // AWS Config config: aws.#Config diff --git a/stdlib/aws/eks/eks.cue b/stdlib/aws/eks/eks.cue index c7be43ec..0ac2e0b1 100644 --- a/stdlib/aws/eks/eks.cue +++ b/stdlib/aws/eks/eks.cue @@ -19,7 +19,6 @@ import ( // kubeconfig is the generated kube configuration file kubeconfig: { - @dagger(output) string #up: [ @@ -58,5 +57,5 @@ import ( format: "string" }, ] - } + } @dagger(output) } diff --git a/stdlib/aws/elb/elb.cue b/stdlib/aws/elb/elb.cue index 5c26099e..5923e75e 100644 --- a/stdlib/aws/elb/elb.cue +++ b/stdlib/aws/elb/elb.cue @@ -8,6 +8,7 @@ import ( // Returns an unused rule priority (randomized in available range) #RandomRulePriority: { + // AWS Config config: aws.#Config diff --git a/stdlib/aws/rds/rds.cue b/stdlib/aws/rds/rds.cue index 9145c308..31b429aa 100644 --- a/stdlib/aws/rds/rds.cue +++ b/stdlib/aws/rds/rds.cue @@ -8,7 +8,8 @@ import ( ) // Creates a new Database on an existing RDS Instance -#CreateDB: { +#Database: { + // AWS Config config: aws.#Config @@ -83,7 +84,8 @@ import ( } // Creates a new user credentials on an existing RDS Instance -#CreateUser: { +#User: { + // AWS Config config: aws.#Config @@ -107,7 +109,6 @@ import ( // Outputed username out: { - @dagger(output) string #up: [ @@ -188,11 +189,12 @@ import ( format: "string" }, ] - } + } @dagger(output) } // Fetches information on an existing RDS Instance #Instance: { + // AWS Config config: aws.#Config diff --git a/stdlib/aws/s3/s3.cue b/stdlib/aws/s3/s3.cue index e4fa19ed..0ebb68eb 100644 --- a/stdlib/aws/s3/s3.cue +++ b/stdlib/aws/s3/s3.cue @@ -7,115 +7,29 @@ import ( "dagger.io/aws" ) -// S3 Bucket upload (file or directory) -#Put: { +// S3 Bucket object(s) sync +#Object: { // AWS Config config: aws.#Config - // Source Artifact to upload to S3 - source?: dagger.#Artifact @dagger(input) - - // Source inlined as a string to upload to S3 - sourceInline?: string @dagger(input) - - // Target S3 URL (eg. s3:////) - target: string @dagger(input) - - // Object content type - contentType: string | *"" @dagger(input) - - // Always write the object to S3 - always: bool | *true @dagger(input) - - // URL of the uploaded S3 object - url: { - @dagger(output) - string - - #up: [ - op.#Load & { - from: aws.#CLI & { - "config": config - } - }, - - if sourceInline != _|_ { - op.#WriteFile & { - dest: "/source" - content: sourceInline - } - }, - - op.#Exec & { - if always != _|_ { - "always": always - } - env: { - TARGET: target - CONTENT_TYPE: contentType - } - - if sourceInline == _|_ { - mount: "/source": from: source - } - - args: [ - "/bin/bash", - "--noprofile", - "--norc", - "-eo", - "pipefail", - "-c", - #""" - opts="" - op=cp - if [ -d /source ]; then - op=sync - fi - if [ -n "$CONTENT_TYPE" ]; then - opts="--content-type $CONTENT_TYPE" - fi - aws s3 $op $opts /source "$TARGET" - echo -n "$TARGET" \ - | sed -E 's=^s3://([^/]*)/=https://\1.s3.amazonaws.com/=' \ - > /url - """#, - ] - }, - - op.#Export & { - source: "/url" - format: "string" - }, - ] - } -} - -// S3 Bucket sync -#Sync: { - // AWS Config - config: aws.#Config - // Source Artifact to upload to S3 source: dagger.#Artifact @dagger(input) // Target S3 URL (eg. s3:////) target: string @dagger(input) - // Files that exist in the destination but not in the - // source are deleted during sync. - delete: *false | bool @dagger(input) + // Delete files that already exist on remote destination + delete: *false | true @dagger(input) // Object content type contentType: string | *"" @dagger(input) // Always write the object to S3 - always: bool | *true @dagger(input) + always: *true | false @dagger(input) // URL of the uploaded S3 object url: { - @dagger(output) string #up: [ @@ -166,5 +80,5 @@ import ( format: "string" }, ] - } + } @dagger(output) } diff --git a/stdlib/file/file.cue b/stdlib/file/file.cue deleted file mode 100644 index 226338be..00000000 --- a/stdlib/file/file.cue +++ /dev/null @@ -1,74 +0,0 @@ -// DEPRECATED: see dagger.io/os -package file - -import ( - "strings" - "dagger.io/dagger" - "dagger.io/dagger/op" -) - -#Create: { - filename: !="" @dagger(input) - permissions: int | *0o644 @dagger(input) - contents: string | bytes @dagger(input) - - #up: [ - op.#WriteFile & {dest: filename, content: contents, mode: permissions}, - ] -} - -#Append: { - filename: !="" @dagger(input) - permissions: int | *0o644 @dagger(input) - contents: string | bytes @dagger(input) - from: dagger.#Artifact @dagger(input) - - orig: (#read & {path: filename, "from": from}).data @dagger(output) - - #up: [ - op.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions}, - ] -} - -#Read: { - filename: !="" @dagger(input) - from: dagger.#Artifact @dagger(input) - contents: (#read & {path: filename, "from": from}).data @dagger(output) -} - -#read: { - path: !="" @dagger(input) - from: dagger.#Artifact @dagger(input) - data: { - string - #up: [ - op.#Load & {"from": from}, - op.#Export & {source: path}, - ] - } @dagger(output) -} - -#Glob: { - glob: !="" @dagger(input) - filenames: [...string] @dagger(input) - from: dagger.#Artifact @dagger(input) - files: (_#glob & {"glob": glob, "from": from}).data @dagger(output) - // trim suffix because ls always ends with newline - filenames: strings.Split(strings.TrimSuffix(files, "\n"), "\n") @dagger(output) -} - -_#glob: { - glob: !="" - from: dagger.#Artifact - data: { - string - _tmppath: "/tmp/ls.out" - #up: [ - op.#Load & {"from": from}, - op.#Exec & { - args: ["sh", "-c", "ls \(glob) > \(_tmppath)"] - }, - op.#Export & {source: _tmppath}, - ] - } -} diff --git a/stdlib/gcp/gcr/gcr.cue b/stdlib/gcp/gcr/gcr.cue index f3381a9d..5d32fa72 100644 --- a/stdlib/gcp/gcr/gcr.cue +++ b/stdlib/gcp/gcr/gcr.cue @@ -11,8 +11,10 @@ import ( // GCP Config config: gcp.#Config - // GCR credentials - username: "oauth2accesstoken" + // GCR registry username + username: "oauth2accesstoken" @dagger(output) + + // GCR registry secret secret: { string diff --git a/stdlib/kubernetes/helm/helm.cue b/stdlib/kubernetes/helm/helm.cue index b336c370..82623b6a 100644 --- a/stdlib/kubernetes/helm/helm.cue +++ b/stdlib/kubernetes/helm/helm.cue @@ -1,3 +1,4 @@ +// Helm package manager package helm import ( @@ -10,6 +11,7 @@ import ( // Install a Helm chart #Chart: { + // Helm deployment name name: string @dagger(input) diff --git a/tests/stdlib.bats b/tests/stdlib.bats index c57c708e..3dd6ce73 100644 --- a/tests/stdlib.bats +++ b/tests/stdlib.bats @@ -10,12 +10,6 @@ setup() { "$DAGGER" compute "$TESTDIR"/stdlib/go --input-dir TestData="$TESTDIR"/stdlib/go/testdata } -# FIXME: move to universe/universe.bats -# Assigned to: -@test "stdlib: file" { - "$DAGGER" compute "$TESTDIR"/stdlib/file -} - # FIXME: move to universe/universe.bats # Assigned to: @test "stdlib: kubernetes" { diff --git a/tests/stdlib/file/file.cue b/tests/stdlib/file/file.cue deleted file mode 100644 index 09037a08..00000000 --- a/tests/stdlib/file/file.cue +++ /dev/null @@ -1,112 +0,0 @@ -package f - -import ( - "dagger.io/dagger/op" - "dagger.io/alpine" - "dagger.io/file" -) - -TestCreate: { - _content: "hello world" - - write: file.#Create & { - filename: "/file.txt" - contents: _content - } - - test: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - test "$(cat /file.txt)" = "hello world" - """, - ] - mount: "/file.txt": { - from: write - path: "/file.txt" - } - }, - ] -} - -TestRead: { - read: file.#Read & { - filename: "/etc/alpine-release" - from: alpine.#Image & {version: "3.10.6"} - } - test: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - test "\(read.contents)" = "3.10.6\n" - """, - ] - }, - ] -} - -TestRead2: { - write: file.#Create & { - _content: "hello world" - filename: "/file.txt" - contents: _content - } - - read: file.#Read & { - filename: "/file.txt" - from: write - } - - test: #up: [ - op.#Load & {from: alpine.#Image}, - op.#Exec & { - args: [ - "sh", - "-ec", - """ - test "\(read.contents)" = "hello world" - """, - ] - }, - ] -} - -TestAppend: { - content1: "hello world" - content2: "foo bar" - - write: file.#Create & { - filename: "/file.txt" - contents: content1 - } - append: file.#Append & { - filename: "/file.txt" - contents: content2 - from: write - } - - orig: append.orig - - read: file.#Read & { - filename: "/file.txt" - from: append - } - - new: read.contents - - test: new & "hello worldfoo bar" -} - -TestGlob: { - list: file.#Glob & { - glob: "/etc/r*" - from: alpine.#Image - } - test: list.filenames & ["/etc/resolv.conf"] -}