-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: pre-commit | ||
|
||
on: push | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/action@v3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.27.3 | ||
hooks: | ||
- id: check-metaschema | ||
files: ^src/.*\.json$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# dapla-kuben-resource-model | ||
|
||
jsonschemas which defines how resources used in kuben are defined. Useful for validation and code generation. | ||
|
||
## Contributing | ||
|
||
This repository uses [pre-commit](https://pre-commit.com/) to ensure that all schemas are formatted correctly before | ||
committed. | ||
Install the pre-commit hooks by running `pre-commit install && pre-commit install-hooks`. | ||
The pre-commit hooks will also run as a github workflow for each push | ||
|
||
Code under generated is generated from the JSON schemas under src. Files here should not be modified manually (only | ||
exception is pom.xml). | ||
|
||
Usual workflow is: | ||
1. Create branch | ||
2. Make changes to your schema | ||
3. Run `pre-commit run --all-files` to format your schema | ||
4. Commit and push your changes | ||
5. Github action will run and generate code from your schema | ||
6. Create a PR and merge it when it is ready | ||
|
||
Create release: | ||
1. Pull latest changes from main | ||
2. Create a branch with name `release-java` | ||
3. Push the branch | ||
4. … | ||
5. Profit |