generated from canonical/is-charms-template-repo
-
Notifications
You must be signed in to change notification settings - Fork 1
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
0 parents
commit de111b5
Showing
35 changed files
with
1,116 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,57 @@ | ||
name: Bug Report | ||
description: File a bug report | ||
labels: ["Type: Bug", "Status: Triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
Thanks for taking the time to fill out this bug report! Before submitting your issue, please make | ||
sure you are using the latest version of the charm. If not, please switch to this image prior to | ||
posting your report to make sure it's not already solved. | ||
- type: textarea | ||
id: bug-description | ||
attributes: | ||
label: Bug Description | ||
description: > | ||
If applicable, add screenshots to help explain the problem you are facing. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduction | ||
attributes: | ||
label: To Reproduce | ||
description: > | ||
Please provide a step-by-step instruction of how to reproduce the behavior. | ||
placeholder: | | ||
1. `juju deploy ...` | ||
2. `juju relate ...` | ||
3. `juju status --relations` | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: environment | ||
attributes: | ||
label: Environment | ||
description: > | ||
We need to know a bit more about the context in which you run the charm. | ||
- Are you running Juju locally, on lxd, in multipass or on some other platform? | ||
- What track and channel you deployed the charm from (i.e. `latest/edge` or similar). | ||
- Version of any applicable components, like the juju snap, the model controller, lxd, microk8s, and/or multipass. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant log output | ||
description: > | ||
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. | ||
Fetch the logs using `juju debug-log --replay` and `kubectl logs ...`. Additional details available in the juju docs | ||
at https://juju.is/docs/olm/juju-logs | ||
render: shell | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: additional-context | ||
attributes: | ||
label: Additional context | ||
|
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,17 @@ | ||
name: Enhancement Proposal | ||
description: File an enhancement proposal | ||
labels: ["Type: Enhancement", "Status: Triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: > | ||
Thanks for taking the time to fill out this enhancement proposal! Before submitting your issue, please make | ||
sure there isn't already a prior issue concerning this. If there is, please join that discussion instead. | ||
- type: textarea | ||
id: enhancement-proposal | ||
attributes: | ||
label: Enhancement Proposal | ||
description: > | ||
Describe the enhancement you would like to see in as much detail as needed. | ||
validations: | ||
required: true |
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,32 @@ | ||
Applicable spec: <link> | ||
|
||
### Overview | ||
|
||
<!-- A high level overview of the change --> | ||
|
||
### Rationale | ||
|
||
<!-- The reason the change is needed --> | ||
|
||
### Juju Events Changes | ||
|
||
<!-- Any changes to the juju events being observed (newly added, significantly modified or deleted) --> | ||
|
||
### Module Changes | ||
|
||
<!-- Any high level changes to modules and why (Service, Observer, helper) --> | ||
|
||
### Library Changes | ||
|
||
<!-- Any changes to charm libraries --> | ||
|
||
### Checklist | ||
|
||
- [ ] The [charm style guide](https://juju.is/docs/sdk/styleguide) was applied | ||
- [ ] The [contributing guide](https://github.com/canonical/is-charms-contributing-guide) was applied | ||
- [ ] The changes are compliant with [ISD054 - Managing Charm Complexity](https://discourse.charmhub.io/t/specification-isd014-managing-charm-complexity/11619) | ||
- [ ] The documentation is generated using `src-docs` | ||
- [ ] The documentation for charmhub is updated | ||
- [ ] The PR is tagged with appropriate label (`urgent`, `trivial`, `complex`) | ||
|
||
<!-- Explanation for any unchecked items above --> |
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,10 @@ | ||
name: Auto-update charm libraries | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
|
||
jobs: | ||
auto-update-libs: | ||
uses: canonical/operator-workflows/.github/workflows/auto_update_charm_libs.yaml@main | ||
secrets: inherit |
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,10 @@ | ||
name: Provide approval for bot PRs | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
bot_pr_approval: | ||
uses: canonical/operator-workflows/.github/workflows/bot_pr_approval.yaml@main | ||
secrets: inherit | ||
|
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,12 @@ | ||
name: Comment on the pull request | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Tests"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment-on-pr: | ||
uses: canonical/operator-workflows/.github/workflows/comment.yaml@main | ||
secrets: inherit |
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,22 @@ | ||
name: Integration tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
integration-tests: | ||
uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main | ||
secrets: inherit | ||
with: | ||
load-test-enabled: false | ||
load-test-run-args: "-e LOAD_TEST_HOST=localhost" | ||
zap-before-command: "curl -H \"Host: indico.local\" http://localhost/bootstrap --data-raw 'csrf_token=00000000-0000-0000-0000-000000000000&first_name=admin&last_name=admin&email=admin%40admin.com&username=admin&password=lunarlobster&confirm_password=lunarlobster&affiliation=Canonical'" | ||
zap-enabled: true | ||
zap-cmd-options: '-T 60 -z "-addoninstall jython" --hook "/zap/wrk/tests/zap/hook.py"' | ||
zap-target: localhost | ||
zap-target-port: 80 | ||
zap-rules-file-name: "zap_rules.tsv" | ||
trivy-fs-enabled: true | ||
trivy-image-config: "trivy.yaml" | ||
self-hosted-runner: true | ||
self-hosted-runner-label: "edge" |
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: Sync issues to Jira | ||
|
||
on: | ||
issues: | ||
# available via github.event.action | ||
types: [opened, reopened, closed] | ||
|
||
jobs: | ||
issues-to-jira: | ||
uses: canonical/operator-workflows/.github/workflows/jira.yaml@main | ||
secrets: inherit |
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,13 @@ | ||
name: Load tests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * 0" | ||
|
||
jobs: | ||
load-tests: | ||
uses: canonical/operator-workflows/.github/workflows/integration_test.yaml@main | ||
with: | ||
load-test-enabled: true | ||
load-test-run-args: "-e LOAD_TEST_HOST=localhost" | ||
secrets: inherit |
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,26 @@ | ||
name: Promote charm | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
origin-channel: | ||
type: choice | ||
description: 'Origin Channel' | ||
options: | ||
- latest/edge | ||
destination-channel: | ||
type: choice | ||
description: 'Destination Channel' | ||
options: | ||
- latest/stable | ||
secrets: | ||
CHARMHUB_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
promote-charm: | ||
uses: canonical/operator-workflows/.github/workflows/promote_charm.yaml@main | ||
with: | ||
origin-channel: ${{ github.event.inputs.origin-channel }} | ||
destination-channel: ${{ github.event.inputs.destination-channel }} | ||
secrets: inherit |
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,14 @@ | ||
name: Publish to edge | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish-to-edge: | ||
uses: canonical/operator-workflows/.github/workflows/publish_charm.yaml@main | ||
secrets: inherit | ||
with: | ||
channel: latest/edge |
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,12 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
unit-tests: | ||
uses: canonical/operator-workflows/.github/workflows/test.yaml@main | ||
secrets: inherit | ||
with: | ||
self-hosted-runner: true | ||
self-hosted-runner-label: "edge" |
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,12 @@ | ||
venv/ | ||
build/ | ||
*.charm | ||
.tox/ | ||
.coverage | ||
__pycache__/ | ||
*.py[cod] | ||
.idea | ||
.vscode | ||
.mypy_cache | ||
*.egg-info/ | ||
*/*.rock |
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,4 @@ | ||
/venv | ||
*.py[cod] | ||
*.charm | ||
/.github |
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,23 @@ | ||
header: | ||
license: | ||
spdx-id: Apache-2.0 | ||
copyright-owner: Canonical Ltd. | ||
content: | | ||
Copyright [year] [owner] | ||
See LICENSE file for licensing details. | ||
paths: | ||
- '**' | ||
paths-ignore: | ||
- '.github/**' | ||
- '**/*.json' | ||
- '**/*.md' | ||
- '**/*.txt' | ||
- '.jujuignore' | ||
- '.gitignore' | ||
- '.licenserc.yaml' | ||
- 'CODEOWNERS' | ||
- 'LICENSE' | ||
- 'trivy.yaml' | ||
- 'pyproject.toml' | ||
- 'zap_rules.tsv' | ||
comment: on-failure |
Validating CODEOWNERS rules …
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 @@ | ||
* @canonical/is-charms |
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,42 @@ | ||
# Contributing | ||
|
||
To make contributions to this charm, you'll need a working [development setup](https://juju.is/docs/sdk/dev-setup). | ||
|
||
You can create an environment for development with `tox`: | ||
|
||
```shell | ||
tox devenv -e integration | ||
source venv/bin/activate | ||
``` | ||
|
||
## Generating src docs for every commit | ||
|
||
Run the following command: | ||
|
||
```bash | ||
echo -e "tox -e src-docs\ngit add src-docs\n" >> .git/hooks/pre-commit | ||
chmod +x .git/hooks/pre-commit | ||
``` | ||
|
||
## Testing | ||
|
||
This project uses `tox` for managing test environments. There are some pre-configured environments | ||
that can be used for linting and formatting code when you're preparing contributions to the charm: | ||
|
||
```shell | ||
tox run -e format # update your code according to linting rules | ||
tox run -e lint # code style | ||
tox run -e unit # unit tests | ||
tox run -e integration # integration tests | ||
tox # runs 'format', 'lint', and 'unit' environments | ||
``` | ||
|
||
## Build the charm | ||
|
||
Build the charm in this git repository using: | ||
|
||
```shell | ||
charmcraft pack | ||
``` | ||
|
||
<!-- You may want to include any contribution/style guidelines in this document> |
Oops, something went wrong.