From 8881c496aae9c01e333b5d9163f1115ac78be1e0 Mon Sep 17 00:00:00 2001 From: Jordan Barrett Date: Wed, 3 May 2023 11:12:39 +0200 Subject: [PATCH 1/6] Add Charmhub docs link to metadata.yaml --- metadata.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/metadata.yaml b/metadata.yaml index 8c85500..529ed7f 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -8,6 +8,7 @@ description: | of functionality of a Juju controller. summary: | The Juju controller. +docs: https://discourse.charmhub.io/t/10534 provides: dashboard: interface: juju-dashboard From 48f5119cbbb88aca5e6d01d0907151b1f40dff51 Mon Sep 17 00:00:00 2001 From: Jordan Barrett Date: Wed, 10 May 2023 13:09:27 +1000 Subject: [PATCH 2/6] [ci] Add workflow to release to edge --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e608ac..1e85efd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,3 +93,47 @@ jobs: juju status # TODO: test integration with dashboard / ha-proxy + + release: + name: "Release to edge" + runs-on: ubuntu-latest + needs: [build, bootstrap] + if: github.event_name == 'push' + + steps: + - name: Download packed charm + id: download + uses: actions/download-artifact@v3 + with: + name: ${{ needs.build.outputs.artifact-name }} + + - name: Select Charmhub channel + id: channel + shell: bash + run: | + set -x + case ${{ github.ref_name }} in + 3.* | 4.*) + TRACK="${{ github.ref_name }}" + ;; + master) + TRACK="latest" + ;; + esac + echo "track=$TRACK" >> "$GITHUB_OUTPUT" + + if [[ -z $CHANNEL ]]; then + echo "upload=false" >> "$GITHUB_OUTPUT" + else + echo "upload=true" >> "$GITHUB_OUTPUT" + fi + + + - name: Upload to Charmhub + if: steps.channel.outputs.upload == 'true' + env: + CHARMCRAFT_AUTH: ${{ secrets.CHARMCRAFT_AUTH }} + run: | + sudo snap install charmcraft --classic + charmcraft upload ${{ steps.download.outputs.download-path }}/*.charm \ + --release ${{ steps.channel.outputs.track }}/edge From 5818ef5318d6cff782103cf8cff2095e7c1a0304 Mon Sep 17 00:00:00 2001 From: Jordan Barrett Date: Wed, 10 May 2023 14:09:59 +1000 Subject: [PATCH 3/6] [ci/release] change $CHANNEL to $TRACK --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e85efd..7a0cad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: esac echo "track=$TRACK" >> "$GITHUB_OUTPUT" - if [[ -z $CHANNEL ]]; then + if [[ -z $TRACK ]]; then echo "upload=false" >> "$GITHUB_OUTPUT" else echo "upload=true" >> "$GITHUB_OUTPUT" From 45ffc149f0445e4617dff30fe77c8fd7612e5fd2 Mon Sep 17 00:00:00 2001 From: Carl Csaposs Date: Fri, 28 Jul 2023 19:44:48 +0000 Subject: [PATCH 4/6] Update build_charms_with_cache.yaml to v4 None of the breaking changes from v2 to v4 affect the usage in this repository --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a0cad0..907b376 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: build: name: Build charms - uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v2 + uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v4 with: artifact-name: charm-packed From 8181a2befa50b80662eeaf850c1b7b2586ed0e28 Mon Sep 17 00:00:00 2001 From: Joseph Phillips Date: Fri, 13 Oct 2023 12:11:02 +0200 Subject: [PATCH 5/6] Updates github workflow to use Juju 3.1. 3.0 is no longer available. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 907b376..e3aa004 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - name: Install Juju run: | - sudo snap install juju --channel 3.0/stable + sudo snap install juju --channel 3.1/stable - name: Bootstrap on LXD if: matrix.cloud == 'lxd' From 0cc34c5b2a1448612e04a2e11661830444652161 Mon Sep 17 00:00:00 2001 From: Joseph Phillips Date: Fri, 13 Oct 2023 12:40:24 +0200 Subject: [PATCH 6/6] Updates installed version of Juju for workflows to 3.2, the version compatible with this charm. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3aa004..a9ae8b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - name: Install Juju run: | - sudo snap install juju --channel 3.1/stable + sudo snap install juju --channel 3.2/stable - name: Bootstrap on LXD if: matrix.cloud == 'lxd'