From b00eec2850116c59cac68d32cb2aff9e4b644ee0 Mon Sep 17 00:00:00 2001 From: "Krzysztof Massalski (Extern)" Date: Wed, 30 Aug 2023 12:54:13 +0200 Subject: [PATCH 1/3] feat(impl):[TRI-1135] extend helm chart releaser to include last Changelog --- .github/{codeql => configs}/codeql-config.yml | 0 .github/configs/cr-config.yml | 1 + .github/workflows/codeql.yml | 2 +- .github/workflows/helm-chart-release.yaml | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) rename .github/{codeql => configs}/codeql-config.yml (100%) create mode 100644 .github/configs/cr-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/configs/codeql-config.yml similarity index 100% rename from .github/codeql/codeql-config.yml rename to .github/configs/codeql-config.yml diff --git a/.github/configs/cr-config.yml b/.github/configs/cr-config.yml new file mode 100644 index 0000000000..05ecbb1719 --- /dev/null +++ b/.github/configs/cr-config.yml @@ -0,0 +1 @@ +release-notes-file: CHANGELOG-temp.md \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c0aeabce9f..f3cdc69b3f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,7 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # The queries security-extended and security-and-quality are built into CodeQL. - config-file: ./.github/codeql/codeql-config.yml + config-file: ./.github/configs/codeql-config.yml queries: +security-and-quality,security-extended - name: Cache maven packages diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index f55d79cfc6..18bf572b86 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -68,7 +68,24 @@ jobs: helm repo add grafana https://grafana.github.io/helm-charts helm dependency update + - name: Create temporary CHANGELOG file for helm release + run: | + cd charts/irs-helm + + touch CHANGELOG-temp.md + + currentVersionNumber=$(echo ${{ needs.get-helm-charts-versions-irs.outputs.current_version }} | sed -e "s/^irs-helm-//" ) + echo currentVersionNumber=$currentVersionNumber + + sed -n -e '/## \['"${currentVersionNumber}"'\]/,/## \[/ p' CHANGELOG.md | head -n -1 | tail -n +2 >> CHANGELOG-temp.md + echo **Full Changelog**: ${{ github.server_url }}/${{ github.repository }}/compare/${{ needs.get-helm-charts-versions-irs.outputs.latest_version }}...${{ needs.get-helm-charts-versions-irs.outputs.current_version }} >> CHANGELOG-temp.md + + echo "cat CHANGELOG-temp.md" + cat CHANGELOG-temp.md + - name: Run chart-releaser uses: helm/chart-releaser-action@v1.5.0 + with: + config: ./.github/configs/cr-config.yml env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" From b801812001fcee8e9cd5ac9599a91dd11a6ef095 Mon Sep 17 00:00:00 2001 From: ds-ext-kmassalski <100765908+ds-ext-kmassalski@users.noreply.github.com> Date: Wed, 30 Aug 2023 14:09:32 +0200 Subject: [PATCH 2/3] Update .github/workflows/helm-chart-release.yaml Co-authored-by: Jaro Hartmann <57985712+ds-jhartmann@users.noreply.github.com> --- .github/workflows/helm-chart-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index 18bf572b86..1d4c867a32 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -69,8 +69,8 @@ jobs: helm dependency update - name: Create temporary CHANGELOG file for helm release + working-directory: charts/irs-helm/ run: | - cd charts/irs-helm touch CHANGELOG-temp.md From 3ef2ff6a59a879dc5c36e68f2b4be61c7ea301aa Mon Sep 17 00:00:00 2001 From: "Krzysztof Massalski (Extern)" Date: Wed, 30 Aug 2023 14:11:04 +0200 Subject: [PATCH 3/3] feat(impl):[TRI-1135] update --- .github/workflows/helm-chart-release.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/helm-chart-release.yaml b/.github/workflows/helm-chart-release.yaml index 1d4c867a32..5c50ac9186 100644 --- a/.github/workflows/helm-chart-release.yaml +++ b/.github/workflows/helm-chart-release.yaml @@ -60,8 +60,8 @@ jobs: version: v3.8.1 - name: Update helm dependencies for irs + working-directory: charts/irs-helm/ run: | - cd charts/irs-helm helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add minio https://charts.min.io/ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts @@ -71,7 +71,6 @@ jobs: - name: Create temporary CHANGELOG file for helm release working-directory: charts/irs-helm/ run: | - touch CHANGELOG-temp.md currentVersionNumber=$(echo ${{ needs.get-helm-charts-versions-irs.outputs.current_version }} | sed -e "s/^irs-helm-//" )