aws: use secrets

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-05-26 18:03:48 -07:00
parent 9c0e2d1d95
commit 40d4c95bff
14 changed files with 219 additions and 154 deletions

View File

@@ -2,6 +2,7 @@ package ecr
import (
"dagger.io/dagger"
"dagger.io/dagger/op"
"dagger.io/aws"
)
@@ -15,14 +16,37 @@ import (
// ECR credentials
username: "AWS"
secret: out @dagger(output)
secret: {
@dagger(output)
string
aws.#Script & {
always: true
"config": config
export: "/out"
code: """
aws ecr get-login-password > /out
"""
#up: [
op.#Load & {
from: aws.#CLI & {
"config": config
}
},
op.#Exec & {
always: true
args: [
"/bin/bash",
"--noprofile",
"--norc",
"-eo",
"pipefail",
"-c",
#"""
aws ecr get-login-password > /out
"""#
]
},
op.#Export & {
source: "/out"
format: "string"
}
]
}
}