Skip to content

Commit ddfe2c9

Browse files
refresh version tag
1 parent 868d5b0 commit ddfe2c9

File tree

5 files changed

+72
-9
lines changed

5 files changed

+72
-9
lines changed

.github/workflows/release.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright 2023 Canonical Ltd.
22
# See LICENSE file for licensing details.
3-
name: Release to Charmhub
3+
name: Release to Charmhub edge
44

55
on:
66
push:
@@ -13,18 +13,29 @@ on:
1313
- '.github/workflows/sync_docs.yaml'
1414

1515
jobs:
16+
tag:
17+
name: Create charm refresh compatibility version git tag
18+
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
19+
with:
20+
track: '8.0'
21+
permissions:
22+
contents: write # Needed to create git tag
23+
1624
ci-tests:
25+
needs:
26+
- tag
1727
uses: ./.github/workflows/ci.yaml
1828
permissions:
1929
contents: write # Needed for Allure Report
2030

2131
release:
2232
name: Release charm
2333
needs:
34+
- tag
2435
- ci-tests
2536
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
2637
with:
27-
track: '8.0'
38+
track: ${{ needs.tag.outputs.track }}
2839
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
2940
secrets:
3041
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}

charmcraft.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ parts:
5252
source: .
5353
after:
5454
- poetry-deps
55-
poetry-export-extra-args: ['--only', 'main,charm-libs', '--without-hashes'] # TODO: re-enable hashes
55+
poetry-export-extra-args: ['--only', 'main,charm-libs']
5656
build-packages:
5757
- libffi-dev # Needed to build Python dependencies with Rust from source
5858
- libssl-dev # Needed to build Python dependencies with Rust from source
@@ -84,10 +84,18 @@ parts:
8484
files:
8585
plugin: dump
8686
source: .
87+
after:
88+
- poetry-deps # Ensure poetry is installed
8789
build-packages:
8890
- git
8991
override-build: |
90-
# TODO: set charm version in refresh_versions.toml
92+
# Set `charm_version` in refresh_versions.toml from git tag
93+
# Create venv in `..` so that git working tree is not dirty
94+
python3 -m venv ../refresh-version-venv
95+
source ../refresh-version-venv/bin/activate
96+
poetry install --only build-refresh-version
97+
write-charm-version
98+
9199
craftctl default
92100
stage:
93101
- LICENSE

poetry.lock

Lines changed: 45 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ tenacity = "^9.1.2"
6060
allure-pytest = "^2.14.3"
6161
allure-pytest-default-results = "^0.1.3"
6262

63+
64+
[tool.poetry.group.build-refresh-version.dependencies]
65+
charm-refresh-build-version = "^0.4.0"
66+
6367
[tool.coverage.run]
6468
branch = true
6569

refresh_versions.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@
22

33
charm_major = 1
44
workload = "8.0.42"
5-
6-
# autogenerated
7-
charm = "8.0/1.0.0"

0 commit comments

Comments
 (0)