Handle fingerprint option for auth

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-05-21 17:18:30 +02:00
parent 7c4df827c3
commit 4b6315e2fc
11 changed files with 231 additions and 93 deletions

View File

@@ -0,0 +1,20 @@
package docker
import (
"dagger.io/docker"
"dagger.io/dagger"
)
// Run with --input-file key=$HOME/.ssh/<your private server key>
key: dagger.#Artifact
passphrase: dagger.#Secret
user: dagger.#Secret
TestRun: run: docker.#Run & {
host: "143.198.64.230"
ref: "nginx:alpine"
"user": user
"passphrase": passphrase
name: "daggerci-test-simple-\(random)"
"key": key
}

View File

@@ -0,0 +1,20 @@
package docker
import (
"dagger.io/dagger/op"
"dagger.io/alpine"
)
random: {
string
#up: [
op.#Load & {from: alpine.#Image},
op.#Exec & {
always: true
args: ["sh", "-c", "cat /dev/urandom | tr -dc 'a-z' | fold -w 10 | head -n 1 | tr -d '\n' > /rand"]
},
op.#Export & {
source: "/rand"
},
]
}