Skip to content

Commit

Permalink
Merge pull request #3 from canonical/install-hook
Browse files Browse the repository at this point in the history
[DPE-2991] Install + Start hook
  • Loading branch information
MiaAltieri authored Nov 28, 2023
2 parents aee5c90 + 328d856 commit 75c7a36
Show file tree
Hide file tree
Showing 24 changed files with 4,610 additions and 89 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install tox
# TODO: Consider replacing with custom image on self-hosted runner OR pinning version
run: python3 -m pip install tox
- name: Run linters
run: tox run -e lint
Expand All @@ -47,4 +46,6 @@ jobs:

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
permissions:
actions: write # Needed to manage GitHub Actions cache
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ __pycache__/
*.py[cod]
.idea
.vscode/
requirements.txt
27 changes: 23 additions & 4 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
- name: ubuntu
channel: "22.04"

parts:
charm:
charm-binary-python-packages:
- setuptools
- cryptography
build-packages:
- git
- libffi-dev
- libssl-dev
- rustc
- cargo
override-pull: |
craftctl default
if [[ ! -f requirements.txt ]]
then
echo 'ERROR: Use "tox run -e build" instead of calling "charmcraft pack" directly' >&2
exit 1
fi
Loading

0 comments on commit 75c7a36

Please sign in to comment.