stdlib: argocd app support

Signed-off-by: Kevin Poirot <kevin@vazee.fr>
This commit is contained in:
Kevin Poirot
2021-08-13 16:43:06 +02:00
committed by Sam Alba
parent f29de14a2f
commit f8f39ca75b
9 changed files with 367 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package app
import (
"alpha.dagger.io/argocd"
"alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
)
TestConfig: argocdConfig: argocd.#Config & {
version: "v2.0.5"
server: "dagger-example-argocd-server.tld"
token: dagger.#Secret & dagger.#Input
}
TestArgocd: #up: [
// Initialize ArgoCD CLI binary
op.#Load & {
from: argocd.#CLI & {
config: TestConfig.argocdConfig
}
},
// Check the binary and its version
op.#Exec & {
args: [
"sh", "-c",
#"""
argocd version --output json | jq -e 'all(.client.Version; startswith("$VERSION"))'
"""#,
]
env: VERSION: TestConfig.argocdConfig.version
},
]