Cleanup inputs, outputs and proxy

Superceded by Client API.

Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
Helder Correia
2022-03-08 20:45:28 -01:00
parent 2a6962ddc8
commit 24d3f82fc7
54 changed files with 101 additions and 1083 deletions

View File

@@ -7,15 +7,16 @@ import (
)
dagger.#Plan & {
inputs: secrets: sops: command: {
client: commands: sops: {
name: "sops"
args: ["-d", "--extract", "[\"AWS\"]", "../../../secrets_sops.yaml"]
stdout: dagger.#Secret
}
actions: {
sopsSecrets: dagger.#DecodeSecret & {
format: "yaml"
input: inputs.secrets.sops.contents
input: client.commands.sops.stdout
}
getCallerIdentity: cli.#Command & {

View File

@@ -7,27 +7,27 @@ import (
)
dagger.#Plan & {
inputs: {
directories: awsConfig: {
path: "./"
client: {
filesystem: ".": read: {
contents: dagger.#FS
include: ["config"]
}
secrets: sops: command: {
commands: sops: {
name: "sops"
args: ["-d", "--extract", "[\"AWS\"]", "../../secrets_sops.yaml"]
stdout: dagger.#Secret
}
}
actions: {
sopsSecrets: dagger.#DecodeSecret & {
format: "yaml"
input: inputs.secrets.sops.contents
input: client.commands.sops.stdout
}
getCallerIdentity: aws.#Container & {
always: true
configFile: inputs.directories.awsConfig.contents
configFile: client.filesystem.".".read.contents
credentials: aws.#Credentials & {
accessKeyId: sopsSecrets.output.AWS_ACCESS_KEY_ID.contents

View File

@@ -7,15 +7,16 @@ import (
)
dagger.#Plan & {
inputs: secrets: sops: command: {
client: commands: sops: {
name: "sops"
args: ["-d", "--extract", "[\"AWS\"]", "../../secrets_sops.yaml"]
stdout: dagger.#Secret
}
actions: {
sopsSecrets: dagger.#DecodeSecret & {
format: "yaml"
input: inputs.secrets.sops.contents
input: client.commands.sops.stdout
}
getCallerIdentity: aws.#Container & {

View File

@@ -8,14 +8,14 @@ import (
)
dagger.#Plan & {
inputs: directories: testhello: path: "./data/hello"
client: filesystem: "./data/hello": read: contents: dagger.#FS
actions: tests: build: {
_baseImage: alpine.#Build
simple: {
build: go.#Build & {
source: inputs.directories.testhello.contents
source: client.filesystem."./data/hello".read.contents
}
exec: docker.#Run & {

View File

@@ -5,6 +5,8 @@ setup() {
}
@test "bash" {
dagger up
dagger up ./build.cue
dagger up ./container.cue
dagger up ./image.cue
dagger up ./test.cue
}

View File

@@ -6,10 +6,10 @@ import (
)
dagger.#Plan & {
inputs: directories: testhello: path: "./data/hello"
client: filesystem: "./data/hello": read: contents: dagger.#FS
actions: tests: test: simple: go.#Test & {
source: inputs.directories.testhello.contents
source: client.filesystem."./data/hello".read.contents
package: "./greeting"
}
}

View File

@@ -10,9 +10,10 @@ import (
)
dagger.#Plan & {
inputs: secrets: test: command: {
client: commands: sops: {
name: "sops"
args: ["-d", "../../test_secrets.yaml"]
stdout: dagger.#Secret
}
actions: tests: {
@@ -20,7 +21,7 @@ dagger.#Plan & {
// Configuration common to all tests
common: {
testSecrets: dagger.#DecodeSecret & {
input: inputs.secrets.test.contents
input: client.commands.sops.stdout
format: "yaml"
}

View File

@@ -8,16 +8,16 @@ import (
)
dagger.#Plan & {
inputs: directories: {
testdata: path: "./data/foo"
testdata2: path: "./data/bar"
client: filesystem: {
"./data/foo": read: contents: dagger.#FS
"./data/bar": read: contents: dagger.#FS
}
actions: tests: {
// Configuration for all tests
common: {
data: inputs.directories.testdata.contents
data: client.filesystem."./data/foo".read.contents
}
// Run yarn.#Build