added support for username:password

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2021-12-22 11:02:52 -07:00
parent a49d794409
commit 0295dc6340
3 changed files with 62 additions and 37 deletions

View File

@@ -3,27 +3,29 @@ package main
import "alpha.dagger.io/europa/dagger/engine"
engine.#Plan & {
inputs: secrets: TestPAT: command: {
inputs: secrets: token: command: {
name: "sops"
args: ["exec-env", "./privateRepo.enc.yaml", "echo $data"]
}
actions: {
alpine: engine.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
source: "alpine:3.15.0"
}
testRepo: engine.#GitPull & {
remote: "https://github.com/dagger/dagger.git"
ref: "main"
authToken: inputs.secrets.TestPAT.contents
remote: "https://github.com/dagger/dagger.git"
ref: "main"
username: "dagger-test"
password: inputs.secrets.token.contents
}
testContent: engine.#Exec & {
input: alpine.output
always: true
args: ["ls", "-l", "/input/repo | grep 'universe -> stdlib'"]
args: ["ls", "-l", "/repo"]
mounts: inputRepo: {
dest: "/input/repo"
dest: "/repo"
contents: testRepo.output
}
}