From a0569b746b602ca7684fa2c23762947f5fd58b20 Mon Sep 17 00:00:00 2001 From: Musa Misto <64855513+MusaMisto@users.noreply.github.com> Date: Mon, 12 Oct 2026 12:48:22 +0300 Subject: [PATCH] ci: publish develop from the production chart directory rename-chart (simplify9/.github#189) publishes charts/default as bitween-develop, so develop and production ship from one Chart.yaml, one set of templates and one values.yaml and cannot drift. It replaces the symlinked charts/develop, whose own Chart.yaml could drift and whose values.yaml symlink let an edit meant for develop change production. The tests now run inside the shared pipeline (run-tests without nuget-projects, same PR), so develop-tests goes. --- .../workflows/bitween-api-cicd-gateway.yml | 37 +++++-------------- charts/develop/.helmignore | 1 - charts/develop/Chart.yaml | 9 ----- charts/develop/README.md | 1 - charts/develop/templates | 1 - charts/develop/values.yaml | 1 - docs/deployment.md | 2 +- 7 files changed, 11 insertions(+), 41 deletions(-) delete mode 120000 charts/develop/.helmignore delete mode 100644 charts/develop/Chart.yaml delete mode 120000 charts/develop/README.md delete mode 120000 charts/develop/templates delete mode 120000 charts/develop/values.yaml diff --git a/.github/workflows/bitween-api-cicd-gateway.yml b/.github/workflows/bitween-api-cicd-gateway.yml index 7dd1bc83..7e078f4b 100644 --- a/.github/workflows/bitween-api-cicd-gateway.yml +++ b/.github/workflows/bitween-api-cicd-gateway.yml @@ -46,10 +46,11 @@ jobs: docker-context: '.' docker-platforms: 'linux/amd64' - # charts/develop is charts/default under its own name (see its Chart.yaml): the reusable - # requires chart-name to match Chart.yaml, and the production chart must stay bitween. + # The production chart, published as bitween-develop: rename-chart sets Chart.yaml's name + # at package time, so develop and production ship from one chart directory and cannot drift. chart-name: 'bitween-develop' - chart-path: './charts/develop' + chart-path: './charts/default' + rename-chart: true # ChartMuseum to install it by hand, GHCR for the deploy below. chart-publish-method: 'both' chart-repo-url: 'https://charts.sf9.io' @@ -59,8 +60,12 @@ jobs: container-registry: 'docker.io' image-name: 'simplify9/bitween-develop' - # No nuget-projects: develop publishes no packages. The reusable runs the tests only in - # its NuGet job, so develop-tests below runs them. + # No nuget-projects: develop publishes no packages. The tests still run (build and test, + # no pack); as before, a failure does not hold back the deploy. + run-tests: 'true' + test-projects: | + SW.Bitween.UnitTests/SW.Bitween.UnitTests.csproj + SW.Bitween.IntegrationTests/SW.Bitween.IntegrationTests.csproj # Deploy to playground via Gateway API deploy: true @@ -123,28 +128,6 @@ jobs: # (openssl rand -base64 48). Changing it signs out everyone holding an older token. helm-set-secret-values: 'global.token.key=${{ secrets.TokenKey }},db=${{ secrets.dbConnection }},global.bus.rabbitUrl=${{ secrets.rabbitUrl }},global.cloudFiles.secretAccessKey=${{ secrets.SecretAccessKey }},global.cloudFiles.accessKeyId=${{ secrets.AccessKeyId }},global.cloudFiles.serviceUrl=${{ secrets.ServiceUrl }},global.cloudFiles.bucketName=${{ secrets.BucketName }},environmentVariables.Bitween__RabbitMqManagementUrl=${{ secrets.RabbitMqManagementUrl }},environmentVariables.Bitween__RabbitMqManagementPassword=${{ secrets.RabbitMqManagementPassword }},environmentVariables.Bitween__RabbitMqManagementUsername=${{ secrets.RabbitMqManagementUsername }}' - develop-tests: - # The same build and tests the reusable runs in its NuGet job, which develop skips. As before, - # a failure does not hold back the deploy. - if: ${{ github.ref_name == 'releases/r10.0-develop' }} - runs-on: ${{ vars.S9_RUNNER || vars.S9_HOSTED_RUNNER || 'ubuntu-24.04' }} - timeout-minutes: 30 - permissions: - contents: read - steps: - - uses: actions/checkout@v7 - with: - persist-credentials: false - - uses: simplify9/.github/.github/actions/dotnet-build@main - with: - projects: '**/*.csproj' - test-projects: | - SW.Bitween.UnitTests/SW.Bitween.UnitTests.csproj - SW.Bitween.IntegrationTests/SW.Bitween.IntegrationTests.csproj - configuration: 'Release' - dotnet-version: '10.0.x' - run-tests: 'true' - publish-release: # Release: build and publish for clients, never deploy. releases/r10.0 is the # repository's default branch, so the reusable workflow treats it as a release: a clean diff --git a/charts/develop/.helmignore b/charts/develop/.helmignore deleted file mode 120000 index 0c1615c4..00000000 --- a/charts/develop/.helmignore +++ /dev/null @@ -1 +0,0 @@ -../default/.helmignore \ No newline at end of file diff --git a/charts/develop/Chart.yaml b/charts/develop/Chart.yaml deleted file mode 100644 index 3ac8f85f..00000000 --- a/charts/develop/Chart.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# The develop build of charts/default: the same templates and values (symlinked), published as -# bitween-develop so it can never be mistaken for the production bitween chart clients install. -# The image is /, so this chart runs simplify9/bitween-develop. -# CI overwrites version and appVersion. -apiVersion: v2 -version: 0.0.1 -appVersion: 0.0.1 -description: A Helm chart for Bitween (develop builds from releases/r10.0-develop) -name: bitween-develop diff --git a/charts/develop/README.md b/charts/develop/README.md deleted file mode 120000 index 448bb83c..00000000 --- a/charts/develop/README.md +++ /dev/null @@ -1 +0,0 @@ -../default/README.md \ No newline at end of file diff --git a/charts/develop/templates b/charts/develop/templates deleted file mode 120000 index b3b09411..00000000 --- a/charts/develop/templates +++ /dev/null @@ -1 +0,0 @@ -../default/templates \ No newline at end of file diff --git a/charts/develop/values.yaml b/charts/develop/values.yaml deleted file mode 120000 index f973ea58..00000000 --- a/charts/develop/values.yaml +++ /dev/null @@ -1 +0,0 @@ -../default/values.yaml \ No newline at end of file diff --git a/docs/deployment.md b/docs/deployment.md index c32dea61..25eb8d12 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -122,7 +122,7 @@ Run several replicas behind a load balancer for throughput and availability, and | Pipeline | Trigger | What it does | |---|---|---| -| `.github/workflows/bitween-api-cicd-gateway.yml` | Push to `releases/r10.0-develop`, or manual on it | Runs unit and integration tests, pushes the `simplify9/bitween-develop` image to Docker Hub, publishes the `bitween-develop` chart (`charts/develop`, the default chart under its own name) to `charts.sf9.io` and GHCR, tags the repository, and deploys the playground environment. Publishes no NuGet packages. | +| `.github/workflows/bitween-api-cicd-gateway.yml` | Push to `releases/r10.0-develop`, or manual on it | Runs unit and integration tests, pushes the `simplify9/bitween-develop` image to Docker Hub, publishes the production chart (`charts/default`) as `bitween-develop` to `charts.sf9.io` and GHCR, tags the repository, and deploys the playground environment. Publishes no NuGet packages. | | `.github/workflows/bitween-api-cicd-gateway.yml` | Push to `releases/r10.0`, or manual on it | Runs unit and integration tests, pushes the `simplify9/bitween` image to Docker Hub, publishes the `bitween` chart clients install to `charts.sf9.io` and GHCR (`oci://ghcr.io/simplify9/charts/bitween`), pushes `SimplyWorks.Bitween.Sdk` and `SimplyWorks.Bitween.Adapters` to NuGet, and tags the repository. Nothing is deployed. | | `.github/workflows/cli-release.yml` | Called by the CI/CD workflow, never run by hand or by a tag: after the release from `releases/r10.0`, and after each develop build | Publishes the [bitween CLI](cli.md) at the version that run computed, as self-contained single-file binaries for `linux-x64`, `linux-arm64`, `linux-musl-x64`, `linux-musl-arm64`, `osx-x64`, `osx-arm64` and `win-x64`, with a `SHA256SUMS` file. From the release it is `cli-v`, the latest release; from develop, the pre-release `cli-v-dev.`. `scripts/install-cli.sh` installs the latest release, a pre-release only when named. | | `.github/workflows/sdk-release.yml` | Called by the CI/CD workflow after the release from `releases/r10.0` | Publishes the adapter contract packages at Bitween's version: `simplyworks-bitween` to PyPI and `@simplyworks/bitween` to npm, each tested first against SW-Serverless's SDK. Uses the `PYPI_API_TOKEN` and `NPM_TOKEN` secrets; a version already published is left alone. |