Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: new tag and contributing doc #17

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LIBRARY_VERSION:=0.1.0
LIBRARY_VERSION:=0.2.0
PROVIDER_VERSION:=0.22.0
JSONNET_BIN:=jrsonnet
CROSSPLANE?=crossplane
Expand All @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions grafanaplane/configurations.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand All @@ -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: {
Expand All @@ -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',
},
},
}
2 changes: 1 addition & 1 deletion grafanaplane/version.libsonnet
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'0.1.0-0.22.0'
'0.2.0-0.22.0'