diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..97ee409 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Development + +## Contributing + +Code contributions are done through [GitHub Pull requests](https://github.com/grafana/grafana-crossplane-libsonnet/pulls), each pull request requires CI to pass and at least one review. We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), pull requests will generally be merged with a squash merge. + +> **Hint**: Because the generation process changes a lot of code, it is highly encouraged to put the generated code into a separate commit to make reviewing easier. +> +> If the branch diverges from `main`, then do a rebase and drop the commit with the generated code, followed by regenerating everything into a new commit. + +Bugs or feature requests can go into [GitHub Issues](https://github.com/grafana/grafana-crossplane-libsonnet/issues), other questions can be asked through [GitHub Discussions](https://github.com/grafana/grafana-crossplane-libsonnet/discussions). + +## Generation process + +`make build` will generate the libraries and packages, including the docs in `docs/`. + +## Directory layout + +`generator/` is where the code generator lives. + +`packages/` and `docs/` are completely generated, do not edit these, changes will be overwritten by the generation process. + +`grafanaplane/` except for `grafanaplane/main.libsonnet` and `grafanaplane/example.jsonnet` are generated as well. diff --git a/Makefile b/Makefile index a79a1d7..026fb4a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -LIBRARY_VERSION:=0.1.0 +LIBRARY_VERSION:=0.2.0 PROVIDER_VERSION:=0.22.0 JSONNET_BIN:=jrsonnet CROSSPLANE?=crossplane @@ -7,6 +7,12 @@ SHELL:=/bin/bash VENDOR_DEPTHS:=$(shell find generator/vendor -type f) +.PHONY: build +build: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet packages + +.PHONY: push +push: push_packages + grafanaplane: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet generator/crds.yaml: @@ -49,9 +55,3 @@ docs: $(shell find grafanaplane/ -type f) .PHONY: tag tag: git tag $(LIBRARY_VERSION)-$(PROVIDER_VERSION) - -.PHONY: build -build: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet packages - -.PHONY: push -push: push_packages diff --git a/docs/README.md b/docs/README.md index 532659a..7d27c43 100644 --- a/docs/README.md +++ b/docs/README.md @@ -11,7 +11,7 @@ Most of this library is generated: the Compositions/XRDs packages, Configuration ## Install ``` -jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.1.0-0.22.0 +jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.2.0-0.22.0 ``` ## Usage diff --git a/grafanaplane/configurations.libsonnet b/grafanaplane/configurations.libsonnet index 1b4b925..a176f18 100644 --- a/grafanaplane/configurations.libsonnet +++ b/grafanaplane/configurations.libsonnet @@ -9,7 +9,7 @@ name: 'grafana-namespaced-alerting', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.2.0-0.22.0', }, }, cloud: { @@ -22,7 +22,7 @@ name: 'grafana-namespaced-cloud', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.2.0-0.22.0', }, }, enterprise: { @@ -35,7 +35,7 @@ name: 'grafana-namespaced-enterprise', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.2.0-0.22.0', }, }, ml: { @@ -48,7 +48,7 @@ name: 'grafana-namespaced-ml', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.2.0-0.22.0', }, }, oncall: { @@ -61,7 +61,7 @@ name: 'grafana-namespaced-oncall', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.2.0-0.22.0', }, }, oss: { @@ -74,7 +74,7 @@ name: 'grafana-namespaced-oss', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.2.0-0.22.0', }, }, slo: { @@ -87,7 +87,7 @@ name: 'grafana-namespaced-slo', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.2.0-0.22.0', }, }, sm: { @@ -100,7 +100,7 @@ name: 'grafana-namespaced-sm', }, spec: { - package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.1.0-0.22.0', + package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.2.0-0.22.0', }, }, } diff --git a/grafanaplane/version.libsonnet b/grafanaplane/version.libsonnet index 9e2b94a..fb60ba9 100644 --- a/grafanaplane/version.libsonnet +++ b/grafanaplane/version.libsonnet @@ -1 +1 @@ -'0.1.0-0.22.0' +'0.2.0-0.22.0'