Skip to content

Commit

Permalink
Add: bundle test after push
Browse files Browse the repository at this point in the history
  • Loading branch information
gitbluf committed Oct 5, 2023
1 parent 457c344 commit de6b0d5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -34,3 +31,6 @@ jobs:
OWNER: ${{ github.repository_owner }}
TAG: ${{ github.ref_name }}
run: make push
- name: Test bundle
id: test
run: make bundleup
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 30 additions & 0 deletions bundle_test.cue
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}

0 comments on commit de6b0d5

Please sign in to comment.