diff --git a/justfile b/justfile index 237c3c6..49c7781 100644 --- a/justfile +++ b/justfile @@ -42,6 +42,13 @@ test-argo: kubectl apply -f tests/app.yaml cargo test --test runner -- --nocapture +test-argowf: + kubectl apply --force-conflicts --server-side -f https://raw.githubusercontent.com/argoproj/argo-workflows/master/manifests/base/crds/full/argoproj.io_workflows.yaml + cargo run --bin kopium -- workflows.argoproj.io > tests/gen.rs + echo "pub type CR = Workflow;" >> tests/gen.rs + kubectl apply -f test/wf.yaml + cargo test --test runner -- --nocapture + test-certmanager: kubectl apply --force-conflicts --server-side -f https://github.com/jetstack/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml cargo run --bin kopium -- -d certificates.cert-manager.io > tests/gen.rs diff --git a/tests/wf.yaml b/tests/wf.yaml new file mode 100644 index 0000000..652b327 --- /dev/null +++ b/tests/wf.yaml @@ -0,0 +1,38 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + name: gen +spec: + entrypoint: argo-cd-ci + arguments: + parameters: + - name: revision + value: master + - name: repo + value: https://github.com/argoproj/argo-cd.git + volumes: + - name: tmp + emptyDir: {} + templates: + - name: ci-builder + inputs: + parameters: + - name: cmd + artifacts: + - name: code + path: /go/src/github.com/argoproj/argo-cd + git: + repo: "{{workflow.parameters.repo}}" + revision: "{{workflow.parameters.revision}}" + container: + image: argoproj/argo-cd-ci-builder:v0.13.1 + imagePullPolicy: Always + command: [bash, -c] + args: ["{{inputs.parameters.cmd}}"] + workingDir: /go/src/github.com/argoproj/argo-cd + resources: + requests: + memory: 1024Mi + cpu: 200m + archiveLocation: + archiveLogs: true