diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e8564a5..ae93e96 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,9 +23,6 @@ jobs: uses: stefanprodan/timoni/actions/setup@main with: version: 0.14.0 - - name: Test instance build - id: test - run: make test - name: Push id: push env: @@ -34,3 +31,6 @@ jobs: OWNER: ${{ github.repository_owner }} TAG: ${{ github.ref_name }} run: make push + - name: Test bundle + id: test + run: make bundleup diff --git a/Makefile b/Makefile index 46b1f62..58c35c8 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,9 @@ get: ## Update Kubernetes API CUE definitions test: ## Build with test_tool.cue + test_values.cue @cue cmd -t name=test -t namespace=test -t mv=0.0.1 -t kv=1.28.0 build . +bundleup: ## Deploy using demo bundle + @timoni bundle apply -f bundle_test.cue + gen: vet ## Print the CUE generated objects @cue gen diff --git a/bundle_test.cue b/bundle_test.cue new file mode 100644 index 0000000..e795f1b --- /dev/null +++ b/bundle_test.cue @@ -0,0 +1,30 @@ +bundle: { + _env: "none" @timoni(runtime:string:ENV) + _tag: "latest" @timoni(runtime:string:GITHUB_REF_NAME) + apiVersion: "v1alpha1" + name: "demo-app" + instances: { + if _env == "dev" { + redis: { + module: { + url: "oci://ghcr.io/stefanprodan/modules/redis" + version: "7.2.1" + } + namespace: "test" + values: maxmemory: 256 + } + } + deployment: { + module: url: "oci://ghcr.io/schubergphilis/cue-modules/deploy" + module: version: _tag + namespace: "test" + values: { + image: { + repository: "nginx" + digest: "sha256:d2b0e52d7c2e5dd9fe5266b163e14d41ed97fd380deb55a36ff17efd145549cd" + tag: "1.25.1" + } + } + } + } +}