Skip to content

Commit

Permalink
Fix label treatment of related charms (#277)
Browse files Browse the repository at this point in the history
* fetch-lib

* Add cos-tool to charm

* only insert labels that do not already exist

* fetch-lib
  • Loading branch information
sed-i authored Feb 26, 2024
1 parent 5955b98 commit 0427bda
Show file tree
Hide file tree
Showing 8 changed files with 643 additions and 335 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ __pycache__/
.idea/
tests/integration/*-tester/lib/
.env
cos-tool*
4 changes: 2 additions & 2 deletions INTEGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ requires:
2. Obtain the library from charmhub:

```shell
charmcraft fetch-lib charms.loki_k8s.v0.loki_push_api
charmcraft fetch-lib charms.loki_k8s.v1.loki_push_api
```

3. Import the library and use it in your `src/charm.py`:

```python
from charms.loki_k8s.v0.loki_push_api import LogProxyConsumer
from charms.loki_k8s.v1.loki_push_api import LogProxyConsumer
...
class MyOperatorCharm(CharmBase):
Expand Down
8 changes: 8 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ parts:
- pkg-config
- rustc
- cargo
cos-tool:
plugin: dump
source: .
build-packages:
- curl
override-pull: |
curl -L -O https://github.com/canonical/cos-tool/releases/latest/download/cos-tool-${CRAFT_TARGET_ARCH}
chmod +x cos-tool-*
Loading

0 comments on commit 0427bda

Please sign in to comment.