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

DO NOT MERGE test cc poetry plugin #431

Closed
wants to merge 4 commits into from
Closed
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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v23.1.1
with:
cache: true
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@beta-charmcraftst124

integration-test:
strategy:
Expand Down
56 changes: 34 additions & 22 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@
# See LICENSE file for licensing details.

type: charm
bases:
- name: ubuntu
channel: "20.04"
architectures: [amd64]
- name: ubuntu
channel: "20.04"
architectures: [arm64]
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.04"
architectures: [arm64]

# Use upcoming ST124 syntax
# To pack this charm, a temporary compatibility wrapper https://github.com/canonical/charmcraftst124
# is required until ST124 support is added to charmcraft
# (ST124 syntax is needed to enable multi-base charms with Ubuntu 24.04. We use ST124 syntax across
# all of our charms [even those that aren't multi base] for consistency and to simplify CI/CD
# maintenance & tooling)
platforms:
ubuntu@20.04:amd64:
ubuntu@20.04:arm64:
ubuntu@22.04:amd64:
ubuntu@22.04:arm64:
parts:
charm:
# "poetry-deps" part name is a magic constant
# https://github.com/canonical/craft-parts/pull/901
poetry-deps:
plugin: nil
build-packages:
- curl
override-build: |
python3 -m pip install --upgrade pip==24.3.1
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
ln -sf $HOME/.local/bin/poetry /usr/local/bin/poetry
foo:
plugin: poetry
source: .
after:
- poetry-deps
poetry-with:
- charm-libs
build-snaps:
- rustup
build-packages:
Expand All @@ -27,14 +40,13 @@ parts:
- libpq-dev
override-build: |
rustup default stable

# Convert subset of poetry.lock to requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt

craftctl default
charm-strict-dependencies: true
charm-requirements: [requirements.txt]
files:
plugin: dump
source: .
prime:
- LICENSE
- templates
libpq:
build-packages:
- libpq-dev
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ optional = true
pytest = "^8.3.4"
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.1", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-operator = "^0.38.0"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.1", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", branch = "beta-charmcraftst124", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v23.1.1", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
# renovate caret doesn't work: https://github.com/renovatebot/renovate/issues/26940
juju = "<=3.6.0.0"
Expand Down
Loading