Improve ArgoCD and fix CI

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-09-09 15:14:49 +02:00
committed by Sam Alba
parent 2a91ae1d80
commit 0fe8b14e78
8 changed files with 48 additions and 64 deletions

View File

@@ -6,23 +6,30 @@ import (
)
TestConfig: argocdConfig: #Config & {
version: dagger.#Input & {*"v2.0.5" | string}
server: dagger.#Input & {*"dagger-example-argocd-server.tld" | string}
token: dagger.#Input & {dagger.#Secret}
version: dagger.#Input & {*"v2.0.5" | string}
server: dagger.#Input & {*"dagger-example-argocd-server.tld" | string}
username: dagger.#Input & {*"admin" | string}
password: dagger.#Input & {dagger.#Secret}
}
TestArgoCD: os.#Container & {
TestClient: os.#Container & {
image: #CLI & {
config: TestConfig.argocdConfig
}
always: true
command: #"""
argocd version --output json | jq -e 'all(.client.Version; startswith("$VERSION"))'
argocd account list | grep "$ARGOCD_USERNAME"
"""#
env: VERSION: TestConfig.argocdConfig.version
env: ARGOCD_USERNAME: TestConfig.argocdConfig.username
}
TestArgoCDStatus: #Status & {
TestApp: #App & {
config: TestConfig.argocdConfig
name: "test"
name: "daggerci-test"
repo: "https://github.com/argoproj/argocd-example-apps.git"
path: "guestbook"
}
TestArgoCDStatus: #Sync & {
config: TestApp.config
application: TestApp.name
}