From fd31af352503451895ed29c02d1d8b6dfb269caf Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:25:12 -0400 Subject: [PATCH 1/6] Add unsigned archive --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++-- .github/workflows/release.yml | 16 ++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c61a7a3..50284ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,24 +62,34 @@ jobs: export GRAFANA_PLUGIN_ID=$(cat dist/plugin.json | jq -r .id) export GRAFANA_PLUGIN_VERSION=$(cat dist/plugin.json | jq -r .info.version) - export GRAFANA_PLUGIN_TYPE=$(cat dist/plugin.json | jq -r .type) + export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5 + export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.unsigned.zip + export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM_UNSIGNED=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT - echo "plugin-type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT + echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT + echo "archive-unsigned=${GRAFANA_PLUGIN_ARTIFACT_UNSIGNED}" >> $GITHUB_OUTPUT + echo "archive-checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT + echo "archive-unsigned-checksum=${GRAFANA_PLUGIN_ARTIFACT_UNSIGNED_CHECKSUM}" >> $GITHUB_OUTPUT - name: Package plugin id: package-plugin run: | mv dist ${{ steps.metadata.outputs.plugin-id }} + zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT + zip -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} + echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT + - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: @@ -99,3 +109,15 @@ jobs: with: name: ${{ steps.metadata.outputs.archive-checksum }} path: ${{ steps.metadata.outputs.archive-checksum }} + + - name: Upload unsigned artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.metadata.outputs.archive-unsigned }} + path: ${{ steps.metadata.outputs.archive-unsigned }} + + - name: Upload unsigned artifact checksum + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.metadata.outputs.archive-unsigned-checksum }} + path: ${{ steps.metadata.outputs.archive-unsigned-checksum }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a79a858..72561c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,15 +47,20 @@ jobs: export GRAFANA_PLUGIN_ID=$(cat dist/plugin.json | jq -r .id) export GRAFANA_PLUGIN_VERSION=$(cat dist/plugin.json | jq -r .info.version) - export GRAFANA_PLUGIN_TYPE=$(cat dist/plugin.json | jq -r .type) + export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5 + export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.unsigned.zip + export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM_UNSIGNED=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT - echo "plugin-type=${GRAFANA_PLUGIN_TYPE}" >> $GITHUB_OUTPUT + echo "archive=${GRAFANA_PLUGIN_ARTIFACT}" >> $GITHUB_OUTPUT + echo "archive-unsigned=${GRAFANA_PLUGIN_ARTIFACT_UNSIGNED}" >> $GITHUB_OUTPUT + echo "archive-checksum=${GRAFANA_PLUGIN_ARTIFACT_CHECKSUM}" >> $GITHUB_OUTPUT + echo "archive-unsigned-checksum=${GRAFANA_PLUGIN_ARTIFACT_UNSIGNED_CHECKSUM}" >> $GITHUB_OUTPUT echo "github-tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT @@ -77,10 +82,15 @@ jobs: id: package-plugin run: | mv dist ${{ steps.metadata.outputs.plugin-id }} + zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT + zip -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} + echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT + - name: Create release id: create_release uses: softprops/action-gh-release@v1 @@ -93,3 +103,5 @@ jobs: files: | ./${{ steps.metadata.outputs.archive }} ./${{ steps.metadata.outputs.archive-checksum }} + ./${{ steps.metadata.outputs.archive-unsigned }} + ./${{ steps.metadata.outputs.archive-unsigned-checksum }} From e68ef22e73d1b21283d068fa77d20cd05f729273 Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:33:16 -0400 Subject: [PATCH 2/6] Update zip exclude --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50284ac..918b812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + zip -x MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72561c5..b6f3ac6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + zip -x MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT From 9c1a930c100890ac8fd322ce3656978cb9ca6270 Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:35:47 -0400 Subject: [PATCH 3/6] Updates --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918b812..e1c34b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip -x MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x MANIFEST.txt md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6f3ac6..3b33e64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip -x MANIFEST.txt ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r + zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x MANIFEST.txt md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT From 6c8d95db10e60561951353ae72cf458438e74059 Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:39:01 -0400 Subject: [PATCH 4/6] Fix CI --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1c34b9..eefb081 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5 export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.unsigned.zip - export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM_UNSIGNED=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 + export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b33e64..0c21095 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,7 +51,7 @@ jobs: export GRAFANA_PLUGIN_ARTIFACT=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.zip export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.md5 export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED=${GRAFANA_PLUGIN_ID}-${GRAFANA_PLUGIN_VERSION}.unsigned.zip - export GRAFANA_PLUGIN_ARTIFACT_CHECKSUM_UNSIGNED=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 + export GRAFANA_PLUGIN_ARTIFACT_UNSIGNED_CHECKSUM=${GRAFANA_PLUGIN_ARTIFACT}.unsigned.md5 echo "plugin-id=${GRAFANA_PLUGIN_ID}" >> $GITHUB_OUTPUT echo "plugin-version=${GRAFANA_PLUGIN_VERSION}" >> $GITHUB_OUTPUT From 5716c12e34988765f87b81286db9e3f44f91f33e Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:43:40 -0400 Subject: [PATCH 5/6] Fix CI --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eefb081..6e60ec6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x MANIFEST.txt + zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0c21095..9dabbe5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,7 @@ jobs: md5sum ${{ steps.metadata.outputs.archive }} > ${{ steps.metadata.outputs.archive-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT - zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x MANIFEST.txt + zip ${{ steps.metadata.outputs.archive-unsigned }} ${{ steps.metadata.outputs.plugin-id }} -r -x ${{ steps.metadata.outputs.plugin-id }}/MANIFEST.txt md5sum ${{ steps.metadata.outputs.archive-unsigned }} > ${{ steps.metadata.outputs.archive-unsigned-checksum }} echo "checksum=$(cat ./${{ steps.metadata.outputs.archive-unsigned-checksum }} | cut -d' ' -f1)" >> $GITHUB_OUTPUT From 3eb77e41b09b9a3c47b697268c4e6a96f82c47d1 Mon Sep 17 00:00:00 2001 From: Mikhail Volkov Date: Wed, 10 Jul 2024 19:50:19 -0400 Subject: [PATCH 6/6] Update CHANGELOG.md --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84a26e0..5c54ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 4.0.0 (IN PROGRESS) +## 4.0.0 (2024-07-10) ### Breaking changes @@ -8,10 +8,11 @@ ### Features / Enhancements -- Add plugin e2e tests and remove cypress (#35) +- Added plugin e2e tests and remove cypress (#35) - Updated E2E tests to use Docker (#39) -- Update Grafana 11 dependencies (#40) +- Updated Grafana 11 dependencies (#40) - Updated workflow actions (#40) +- Added unsigned archive (#41) ## 3.1.0 (2023-10-13)