Skip to content

Commit

Permalink
[DPE-2567] Update workflows to release to 6/edge (#211)
Browse files Browse the repository at this point in the history
* [DPE-2632] Updated data platform libs to use external secrets (#207)

The goal of this PR is to update data platform libs to use external secrets in MongoDB charm and update the charm code and tests if required

* Release to 6/edge

* Fix lint errors

* Updated workflow file

* Update data platform libs for test charms

* Update data platform libs for ha tests test app

* Update lint settings for tests libs

* Reformat file

* Fix integration tests for charm

* Disable pytest operator cache for integration tests

* Change ci worflow

* Change ci worflow

* Update ci workflows to build all charms

* Update ci workflows to build all charms

* Update workflow

* Update workflow: build step name

* Update workflows
  • Loading branch information
dmitry-ratushnyy authored Oct 25, 2023
1 parent 44ff430 commit 41c140f
Show file tree
Hide file tree
Showing 20 changed files with 5,693 additions and 1,215 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,15 @@ jobs:
run: tox run -e unit

build:
name: Build charms
uses: canonical/data-platform-workflows/.github/workflows/build_charms_with_cache.yaml@v5
strategy:
fail-fast: true
matrix:
charms: [".", "tests/integration/ha_tests/application_charm", "tests/integration/relation_tests/application-charm"]
name: Build ${{matrix.charms}} charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v5
with:
charmcraft-snap-channel: "latest/edge"
path-to-charm-directory: ${{matrix.charms}}

integration-test:
strategy:
Expand Down Expand Up @@ -73,11 +78,25 @@ jobs:
channel: "1.27-strict/stable"
bootstrap-constraints: "cores=2 mem=2G"
juju-channel: 3.1/stable
bootstrap-options: "--agent-version 3.1.5"
bootstrap-options: "--agent-version 3.1.6"
- name: Download packed charm(s)
uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.artifact-name }}
- name: Check juju version
run: |
echo $(juju --version)
- name: Free disk space
run: |
echo "Free disk space before cleanup"
df -T
# free space in the runner
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "Free disk space after cleanup"
df -T
- name: Select tests
id: select-tests
run: |
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release to 5/edge
name: Release to 6/edge

on:
push:
branches:
- main
- 6/edge

jobs:
lib-check:
Expand All @@ -28,21 +28,22 @@ jobs:
- lib-check
uses: ./.github/workflows/ci.yaml

release-to-charmhub:
name: Release to CharmHub
needs:
- lib-check
- ci-tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Upload charm to charmhub
uses: canonical/charming-actions/[email protected]
with:
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
channel: "6/edge"
build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v5
with:
charmcraft-snap-channel: "latest/edge"

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v5
with:
channel: 6/edge
artifact-name: ${{ needs.build.outputs.artifact-name }}
secrets:
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
permissions:
contents: write # Needed to create GitHub release
Loading

0 comments on commit 41c140f

Please sign in to comment.