From 78b5942c2a8e99796652c60d19e1fe7139292ee6 Mon Sep 17 00:00:00 2001 From: Marco Ebert Date: Tue, 30 Jul 2024 09:06:45 +0200 Subject: [PATCH] GitHub: Rework release action. --- .github/workflows/releases.yaml | 98 ++++++++++++++++++++ capa/v28.0.1-alpha1/README.md | 7 ++ capa/v28.0.1-alpha1/announcement.md | 3 + capa/v28.0.1-alpha1/kustomization.yaml | 2 + capa/v28.0.1-alpha1/release.yaml | 122 +++++++++++++++++++++++++ 5 files changed, 232 insertions(+) create mode 100644 .github/workflows/releases.yaml create mode 100644 capa/v28.0.1-alpha1/README.md create mode 100644 capa/v28.0.1-alpha1/announcement.md create mode 100644 capa/v28.0.1-alpha1/kustomization.yaml create mode 100644 capa/v28.0.1-alpha1/release.yaml diff --git a/.github/workflows/releases.yaml b/.github/workflows/releases.yaml new file mode 100644 index 000000000..632777e47 --- /dev/null +++ b/.github/workflows/releases.yaml @@ -0,0 +1,98 @@ +name: Releases + +on: + push: + branches: + - main + - master + # Remove when ready. + - liljx + paths: + - "*/v*.*.*/release.yaml" + +jobs: + get-releases: + name: Get releases + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get releases + id: get-releases + # TODO: Replace specific providers in glob with * as soon as it matches all of them anyway. + run: echo releases="$(jq --null-input --args '$ARGS.positional' --compact-output -- {azure,capa}/v*.*.*)" >> "${GITHUB_OUTPUT}" + + outputs: + releases: ${{ steps.get-releases.outputs.releases }} + + create-release: + name: Create release + runs-on: ubuntu-latest + needs: get-releases + + strategy: + matrix: + release: ${{ fromJSON(needs.get-releases.outputs.releases) }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get provider & version + id: get-provider-version + env: + release: ${{ matrix.release }} + run: | + # Get provider & version. + provider="${release%/v*.*.*}" + version="${release#${provider}/}" + + # Map provider. + case "${provider}" in + capa) + provider="aws" + ;; + esac + + # Store provider & version. + echo provider="${provider}" >> "${GITHUB_OUTPUT}" + echo version="${version}" >> "${GITHUB_OUTPUT}" + + - name: Get release + id: get-release + env: + GH_TOKEN: ${{ secrets.TAYLORBOT_GITHUB_ACTION }} + provider: ${{ steps.get-provider-version.outputs.provider }} + version: ${{ steps.get-provider-version.outputs.version }} + run: | + # Define tag. + tag="${provider}/${version}" + + # Check release. + [ "$(gh release view "${tag}" --json id)" ] && exists=true || exists=false + + # Store tag & exists. + echo tag="${tag}" >> "${GITHUB_OUTPUT}" + echo exists="${exists}" >> "${GITHUB_OUTPUT}" + + - name: Create release + if: ${{ ! fromJSON(steps.get-release.outputs.exists) }} + env: + GH_TOKEN: ${{ secrets.TAYLORBOT_GITHUB_ACTION }} + release: ${{ matrix.release }} + provider: ${{ steps.get-provider-version.outputs.provider }} + version: ${{ steps.get-provider-version.outputs.version }} + tag: ${{ steps.get-release.outputs.tag }} + run: | + # Define title, notes & files. + title="Workload cluster release ${version} for ${provider}" + notes="This release was automatically created by GitHub Actions." + files=("${release}/release.yaml") + + # Determine pre-release. + [[ "${version}" == v*.*.*-* ]] && prerelease="--prerelease" || prerelease="" + + # Create release. + echo gh release create --target "${GITHUB_REF_NAME}" "${tag}" --title "${title}" --notes "${notes}" ${files[@]} ${prerelease} diff --git a/capa/v28.0.1-alpha1/README.md b/capa/v28.0.1-alpha1/README.md new file mode 100644 index 000000000..009ce206f --- /dev/null +++ b/capa/v28.0.1-alpha1/README.md @@ -0,0 +1,7 @@ +# :zap: Giant Swarm Release v28.0.0 for CAPA :zap: + +## Changes compared to v27.0.0 + +- Kubernetes version change from 1.27.14 to 1.28.11 +- cloud-provider-aws (formerly aws-cloud-controller-manager-app) from 1.27.7-gs1 to 1.28.6-gs1 +- cluster-autoscaler from 1.27.3-gs9 to 1.28.5-gs1 diff --git a/capa/v28.0.1-alpha1/announcement.md b/capa/v28.0.1-alpha1/announcement.md new file mode 100644 index 000000000..863850490 --- /dev/null +++ b/capa/v28.0.1-alpha1/announcement.md @@ -0,0 +1,3 @@ +**Workload cluster release v28.0.0 for CAPA is available**. This release upgrades Kubernetes version to v1.28. + +Further details can be found in the [release notes](https://docs.giantswarm.io/changes/workload-cluster-releases-capa/releases/aws-28.0.0/). diff --git a/capa/v28.0.1-alpha1/kustomization.yaml b/capa/v28.0.1-alpha1/kustomization.yaml new file mode 100644 index 000000000..2c64a5163 --- /dev/null +++ b/capa/v28.0.1-alpha1/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- release.yaml diff --git a/capa/v28.0.1-alpha1/release.yaml b/capa/v28.0.1-alpha1/release.yaml new file mode 100644 index 000000000..f984f5fc7 --- /dev/null +++ b/capa/v28.0.1-alpha1/release.yaml @@ -0,0 +1,122 @@ +apiVersion: release.giantswarm.io/v1alpha1 +kind: Release +metadata: + name: aws-28.0.0 +spec: + apps: + - name: aws-ebs-csi-driver + version: 2.30.1 + dependsOn: + - cloud-provider-aws + - name: aws-ebs-csi-driver-servicemonitors + version: 0.1.0 + dependsOn: + - cert-manager + - name: aws-pod-identity-webhook + version: 1.16.0 + dependsOn: + - cert-manager + - name: capi-node-labeler + version: 0.5.0 + - name: cert-exporter + version: 2.9.0 + dependsOn: + - kyverno + - name: cert-manager + version: 3.7.6 + dependsOn: + - prometheus-operator-crd + - name: chart-operator-extensions + version: 1.1.2 + dependsOn: + - prometheus-operator-crd + - name: cilium + version: 0.24.0 + - name: cilium-crossplane-resources + version: 0.1.0 + - name: cilium-servicemonitors + version: 0.1.2 + dependsOn: + - prometheus-operator-crd + - name: cloud-provider-aws + version: 1.28.6-gs1 + dependsOn: + - vertical-pod-autoscaler-crd + - name: cluster-autoscaler + version: 1.28.5-gs1 + dependsOn: + - kyverno + - name: coredns + version: 1.21.0 + dependsOn: + - cilium + - name: etcd-k8s-res-count-exporter + version: 1.10.0 + dependsOn: + - kyverno + - name: external-dns + version: 3.1.0 + dependsOn: + - prometheus-operator-crd + - name: irsa-servicemonitors + version: 0.0.1 + dependsOn: + - cert-manager + - name: k8s-audit-metrics + version: 0.9.0 + dependsOn: + - kyverno + - name: k8s-dns-node-cache + version: 2.6.2 + dependsOn: + - kyverno + - name: metrics-server + version: 2.4.2 + dependsOn: + - kyverno + - name: net-exporter + version: 1.19.0 + dependsOn: + - prometheus-operator-crd + - name: network-policies + version: 0.1.1 + catalog: cluster + dependsOn: + - cilium + - name: node-exporter + version: 1.19.0 + dependsOn: + - kyverno + - name: observability-bundle + version: 1.3.4 + dependsOn: + - coredns + - name: prometheus-blackbox-exporter + version: 0.4.1 + dependsOn: + - prometheus-operator-crd + - name: security-bundle + version: 1.7.0 + catalog: giantswarm + dependsOn: + - prometheus-operator-crd + - name: teleport-kube-agent + version: 0.9.0 + - name: vertical-pod-autoscaler + version: 5.2.2 + dependsOn: + - prometheus-operator-crd + - name: vertical-pod-autoscaler-crd + version: 3.1.0 + components: + - name: cluster-aws + catalog: cluster + version: 1.0.1 + - name: flatcar + version: 3815.2.2 + - name: flatcar-variant + version: 1.0.0 + - name: kubernetes + version: 1.28.11 + date: "2024-07-10T09:00:00Z" + state: active