From 1bc2cffabc80e614afea9dc0155a0e77af1aa4c4 Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Sat, 4 May 2024 06:53:08 +0100 Subject: [PATCH] Improve releasing during v0.11.2 (#7205) * chore: update internal tooling to v0.11.2 Signed-off-by: Justin Chadwell * docs: update docs to refer to newest v0.11.2 release Signed-off-by: Justin Chadwell * ci: update to install dagger cli v0.11.2 Signed-off-by: Justin Chadwell * chore: update RELEASING guide Signed-off-by: Justin Chadwell * chore: Add Helm releasing instructions to RELEASING.md Also prepare the Helm chart for release right after this gets merged. Also run `go mod tidy` after rebasing. Signed-off-by: Gerhard Lazu --------- Signed-off-by: Justin Chadwell Signed-off-by: Gerhard Lazu Co-authored-by: Gerhard Lazu --- .github/workflows/_hack_make.yml | 2 +- .../workflows/_new_release_notification.yml | 2 +- .github/workflows/helm.yml | 4 +- .github/workflows/publish-helm-chart.yml | 4 +- .github/workflows/publish.yml | 2 +- RELEASING.md | 42 ++++++++++++++----- .../snippets/github-google-cloud/main.yml | 2 +- docs/current_docs/partials/_install-cli.mdx | 12 +++--- go.mod | 2 +- helm/dagger/Chart.yaml | 4 +- 10 files changed, 49 insertions(+), 27 deletions(-) diff --git a/.github/workflows/_hack_make.yml b/.github/workflows/_hack_make.yml index 0791f932c9..e80577a614 100644 --- a/.github/workflows/_hack_make.yml +++ b/.github/workflows/_hack_make.yml @@ -25,7 +25,7 @@ on: required: false dagger-version: type: string - default: "0.11.0" + default: "0.11.2" required: false jobs: diff --git a/.github/workflows/_new_release_notification.yml b/.github/workflows/_new_release_notification.yml index ed0537c56c..93d97ade57 100644 --- a/.github/workflows/_new_release_notification.yml +++ b/.github/workflows/_new_release_notification.yml @@ -16,6 +16,6 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.NEW_RELEASE_DISCORD_WEBHOOK }} uses: dagger/dagger-for-github@v5 with: - version: '0.11.1' + version: '0.11.2' module: 'github.com/gerhard/daggerverse/notify@2024-02-13' args: discord --webhook-url env:DISCORD_WEBHOOK --message '${{ inputs.message }}' diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index b0bcaa46ba..34473bbf4e 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -26,10 +26,10 @@ jobs: - name: Helm test uses: dagger/dagger-for-github@v5 with: - version: '0.11.1' + version: '0.11.2' args: --source=. helm test - name: Helm publish (dry-run) uses: dagger/dagger-for-github@v5 with: - version: '0.11.1' + version: '0.11.2' args: --source=. helm publish --dry-run=true --tag=main diff --git a/.github/workflows/publish-helm-chart.yml b/.github/workflows/publish-helm-chart.yml index 54d99097f2..db7370dd42 100644 --- a/.github/workflows/publish-helm-chart.yml +++ b/.github/workflows/publish-helm-chart.yml @@ -21,7 +21,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.RELEASE_DAGGER_CI_TOKEN }} DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }} with: - version: '0.11.1' + version: '0.11.2' args: --source=. helm publish --tag=${{ github.ref_name }} --github-token=env:GITHUB_TOKEN @@ -30,4 +30,4 @@ jobs: uses: ./.github/workflows/_new_release_notification.yml secrets: inherit with: - message: "🎑 Helm Chart: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" + message: "☸️ Helm Chart: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1f30dacf7f..d03e8a595f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,7 +29,7 @@ jobs: cache-dependency-path: "ci/go.sum" - name: Install dagger run: | - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.0 BIN_DIR=/usr/local/bin/ sudo -E sh + curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.2 BIN_DIR=/usr/local/bin/ sudo -E sh - name: "Publish Engine & CLI" run: | if [ $GITHUB_REF_NAME == 'main' ]; then diff --git a/RELEASING.md b/RELEASING.md index d3740d0fa3..957241c8ab 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,4 +1,4 @@ -# Releasing ![shields.io](https://img.shields.io/badge/Last%20updated%20on-April%2016,%202024-success?style=flat-square) +# Releasing ![shields.io](https://img.shields.io/badge/Last%20updated%20on-April%2025,%202024-success?style=flat-square) This describes how to release Dagger: @@ -8,6 +8,7 @@ This describes how to release Dagger: - [β¬’ TypeScript SDK ⏱ `5mins`](#-typescript-sdk--5mins) - [πŸ§ͺ Elixir SDK ⏱ `5mins`](#-elixir-sdk--5mins) - [🐘 PHP SDK ⏱ `5mins`](#-php-sdk--5mins) +- [☸️ Helm chart ⏱ `2mins`](#%EF%B8%8F-helm-chart--2mins) - [πŸ“’ Documentation ⏱ `5mins`](#-documentation--5mins) - [πŸ› Playground ⏱ `2mins`](#-playground--2mins) - [🌌 Daggerverse ⏱ `2mins`](#-daggerverse--2mins) @@ -24,9 +25,8 @@ This is a high-level diagram of how all the pieces fit together: flowchart TB repo(["πŸ™ github.com/dagger/dagger"]) docs["πŸ“’ Documentation"] - playground["πŸ› Playground"] ci["βš™οΈ CI"] - repo -.-> docs & playground & ci + repo -.-> docs & ci subgraph Dagger engine("πŸš™ Engine") @@ -39,7 +39,7 @@ flowchart TB brew-tap["πŸ™ github.com/dagger/homebrew-tap"] github-action["πŸ™ github.com/dagger/dagger-for-github"] nix["❄️ github.com/dagger/nix"] - cli --> S3 --> brew-tap & github-action & nix + cli --> S3 ------> brew-tap & github-action & nix registry["πŸ“¦ registry.dagger.io/engine"] ghcr["πŸ™ ghcr.io/dagger/engine"] @@ -49,12 +49,15 @@ flowchart TB go-repo["πŸ™ github.com/dagger/dagger-go-sdk"] go-pkg["🐹 dagger.io/dagger"] go-ref["🐹 pkg.go.dev/dagger.io/dagger"] + playground["πŸ› Playground"] daggerverse["🌌 Daggerverse"] cloud["☁️ Dagger Cloud"] repo ==> go --> go-repo --> go-pkg & go-ref go-pkg -.-> daggerverse & cloud - registry -.- S3 -.- go & python & typescript & elixir + registry -.- S3 -.- go & python & typescript & elixir & php & helm + + registry -.....- playground python["🐍 Python SDK"] pypi["🐍 pypi.org/project/dagger-io"] @@ -73,6 +76,9 @@ flowchart TB php-repo["πŸ™ github.com/dagger/dagger-php-sdk"] php-pkg["🐘 packagist.org/packages/dagger/dagger"] repo ======> php --> php-repo --> php-pkg + + helm["☸️ Helm chart"] + repo ======> helm ``` ## Let the team know @@ -144,7 +150,7 @@ and improve it. We want small, constant improvements which compound. Therefore: > SDK. This will ensure that all the APIs in the SDK are also available in the > Engine it depends on. -- [ ] Create e.g. `.changes/v0.10.2.md` by either running `changie batch patch` +- [ ] Create e.g. `.changes/v0.11.2.md` by either running `changie batch patch` (or `changie batch minor` if this is a new minor). > [!NOTE] @@ -152,9 +158,9 @@ and improve it. We want small, constant improvements which compound. Therefore: > If you do not have `changie` installed, see https://changie.dev - [ ] Make any necessary edits to the newly generated file, e.g. - `.changes/v0.11.1.md` + `.changes/v0.11.2.md` - [ ] Update `CHANGELOG.md` by running `changie merge`. -- [ ] `30 mins` Submit a PR - e.g. `add-v0.11.1-release-notes` with the new release notes +- [ ] `30 mins` Submit a PR - e.g. `add-v0.11.2-release-notes` with the new release notes so that they can be used in the new release. Get the PR reviewed & merged. The merge commit is what gets tagged in the next step. - [ ] Ensure that all checks are green βœ… for the `` on the @@ -224,6 +230,7 @@ changie merge cd ../.. ``` +- [ ] For the Helm chart, bump `version` & `appVersion` in `helm/dagger/Chart.yaml` - [ ] Commit and push the changes with the message `Add SDK release notes` - [ ] `30mins` Open this draft PR in [github.com/dagger/dagger/pulls](https://github.com/dagger/dagger/pulls) & @@ -282,8 +289,8 @@ git checkout -b improve-releasing-during-${ENGINE_VERSION:?must be set} # Commit & push # Test using the just-released CLI -# curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin DAGGER_VERSION=0.11.1 sh -# mv ~/.local/bin/dagger{,-0.11.1} +# curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin DAGGER_VERSION=0.11.2 sh +# mv ~/.local/bin/dagger{,-0.11.2} dagger version | grep ${ENGINE_VERSION:?must be set} dagger run ./hack/make engine:test ``` @@ -420,6 +427,21 @@ gh release create "sdk/php/${PHP_SDK_VERSION:?must be set}" \ - [ ] ⚠️ De-select **Set as the latest release** (only used for πŸš™ Engine + πŸš— CLI releases) - [ ] Click on **Publish release** +## ☸️ Helm chart ⏱ `2mins` + +- [ ] Tag & publish: + +```console +export HELM_CHART_VERSION="$(awk '/^version: / { print $2 }' helm/dagger/Chart.yaml)" +git tag "helm/chart/v${HELM_CHART_VERSION:?must be set}" "${SDK_GIT_SHA:?must be set}" +git push "${DAGGER_REPO_REMOTE:?must be set}" "helm/chart/v${HELM_CHART_VERSION:?must be set}" +``` + +This will trigger the [`publish-helm-chart` +workflow](https://github.com/dagger/dagger/actions/workflows/publish-helm-chart.yml) +which publishes to [πŸ™ +registry.dagger.io/dagger-helm](https://github.com/dagger/dagger/pkgs/container/dagger-helm). + ## πŸ“’ Documentation ⏱ `5mins` > [!WARNING] diff --git a/docs/current_docs/guides/snippets/github-google-cloud/main.yml b/docs/current_docs/guides/snippets/github-google-cloud/main.yml index 2b36bae858..88fe2d8d2b 100644 --- a/docs/current_docs/guides/snippets/github-google-cloud/main.yml +++ b/docs/current_docs/guides/snippets/github-google-cloud/main.yml @@ -16,7 +16,7 @@ jobs: name: Call Dagger Function uses: dagger/dagger-for-github@v5 with: - version: "0.11.1" + version: "0.11.2" verb: call args: | deploy \ diff --git a/docs/current_docs/partials/_install-cli.mdx b/docs/current_docs/partials/_install-cli.mdx index a582977ad7..0117a9aeb0 100644 --- a/docs/current_docs/partials/_install-cli.mdx +++ b/docs/current_docs/partials/_install-cli.mdx @@ -30,17 +30,17 @@ If you do not have Homebrew installed, or you want to install a specific version ```shell cd /usr/local -curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.1 sh +curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.2 sh ./bin/dagger version -dagger 0.11.1 (GIT_SHA) darwin/arm64 +dagger 0.11.2 (GIT_SHA) darwin/arm64 ``` If your user account doesn't have sufficient privileges to install in `/usr/local` and `sudo` is available, use the following command instead: ```shell cd /usr/local -curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.1 sudo sh +curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.2 sudo sh ``` @@ -63,10 +63,10 @@ dagger is $HOME/.local/bin/dagger If you want to install a specific version of `dagger`, you can run: ```shell -curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.1 sh +curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.11.2 sh ./bin/dagger version -dagger 0.11.1 (GIT_SHA) linux/amd64 +dagger 0.11.2 (GIT_SHA) linux/amd64 ``` @@ -93,7 +93,7 @@ If you want to install a specific version of `dagger`, pass in a version number ```Powershell $script = Invoke-WebRequest -UseBasicParsing -Uri https://dl.dagger.io/dagger/install.ps1 -$params = "-DaggerVersion 0.11.1" +$params = "-DaggerVersion 0.11.2" "$script $params" | Invoke-Expression ``` diff --git a/go.mod b/go.mod index 310eae550d..f35a8e4c65 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 replace dagger.io/dagger => ./sdk/go require ( - dagger.io/dagger v0.11.1 + dagger.io/dagger v0.11.2 github.com/99designs/gqlgen v0.17.44 github.com/Khan/genqlient v0.7.0 github.com/MakeNowJust/heredoc/v2 v2.0.1 diff --git a/helm/dagger/Chart.yaml b/helm/dagger/Chart.yaml index e1667bb8d6..49dff9572d 100644 --- a/helm/dagger/Chart.yaml +++ b/helm/dagger/Chart.yaml @@ -3,5 +3,5 @@ name: dagger-helm description: Dagger Helm chart type: application -version: 0.1.2 -appVersion: v0.11.1 +version: 0.1.3 +appVersion: v0.11.2