From 185958dac81c3b1c8e13ab102d13f1ee1a8eb390 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:33:15 +0200 Subject: [PATCH 1/9] fix release.yml --- .github/workflows/release.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e73e0b..4e85658 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ env: EXTENSION_ID: checkmarx-ast-azure-plugin jobs: - build: + release: runs-on: ubuntu-latest outputs: CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }} @@ -113,15 +113,15 @@ jobs: if: inputs.dev == 'false' run: tfx extension publish --vsix *.vsix --token ${{ secrets.AZURETOKEN }} - notify: - if: inputs.dev == false || inputs.tag == 'test-notify' - needs: release - uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main - with: - product_name: Azure Plugin - release_version: ${{ needs.release.outputs.TAG_NAME }} - cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} - release_author: "Phoenix Team" - release_url: https://github.com/Checkmarx/ast-azure-plugin/releases/tag/${{ needs.release.outputs.TAG_NAME }} - jira_product_name: ADO - secrets: inherit + notify: + if: inputs.dev == false || inputs.tag == 'test-notify' + needs: release + uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main + with: + product_name: Azure Plugin + release_version: ${{ needs.release.outputs.TAG_NAME }} + cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} + release_author: "Phoenix Team" + release_url: https://github.com/Checkmarx/ast-azure-plugin/releases/tag/${{ needs.release.outputs.TAG_NAME }} + jira_product_name: ADO + secrets: inherit From 136ffd70c18c5a30e1566338dae17a78a69be659 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:35:23 +0200 Subject: [PATCH 2/9] fix release.yml --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e85658..4b7c362 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,13 +72,11 @@ jobs: echo "PATCH_VERSION=$(echo $CLEAN_VERSION | cut -d. -f3)" >> $GITHUB_ENV - name: New version - id: set_tag_name run: | echo "The new version is ${{ env.RELEASE_VERSION }}" echo "The new major version is ${{ env.MAJOR_VERSION }}" echo "The new minor version is ${{ env.MINOR_VERSION }}" echo "The new patch version is ${{ env.PATCH_VERSION }}" - echo "::set-output name=TAG_NAME::${{ env.RELEASE_VERSION }}" - name: Extract CLI version id: extract_cli_version From 5c782520b2da1e94aa959b03fbb50deb17edb364 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:38:21 +0200 Subject: [PATCH 3/9] fix release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b7c362..f17e721 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: - name: Set new version run: | - echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + echo "RELEASE_VERSION=${{inputs.tag}}" >> $GITHUB_ENV - name: Set major, minor, patch values run: | From 0a5e5699ab517c220b7876c249cbd7b63d6a6ecd Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:41:29 +0200 Subject: [PATCH 4/9] debug location --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f17e721..7357176 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,6 +81,8 @@ jobs: - name: Extract CLI version id: extract_cli_version run: | + ls -la + pwd CLI_VERSION=$(cat cxAstScan/node_modules/@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') echo "CLI version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV From 893a693b97abe8dfdb23642e4e2b0b2eb3caa904 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:48:06 +0200 Subject: [PATCH 5/9] add set public=false if dev-release --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7357176..d78a4f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,7 @@ jobs: run: | ls -la pwd - CLI_VERSION=$(cat cxAstScan/node_modules/@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') + CLI_VERSION=$(cat ./cxAstScan/node_modules/@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') echo "CLI version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" @@ -95,7 +95,13 @@ jobs: cat <<< $(jq ".version.Major = ${{ env.MAJOR_VERSION }}" ./cxAstScan/task.json) > ./cxAstScan/task.json cat <<< $(jq ".version.Minor = ${{ env.MINOR_VERSION }}" ./cxAstScan/task.json) > ./cxAstScan/task.json cat <<< $(jq ".version.Patch = ${{ env.PATCH_VERSION }}" ./cxAstScan/task.json) > ./cxAstScan/task.json - + + - name: Set public false if dev + run: | + if [ "${{ inputs.dev }}" == "true" ]; then + cat <<< $(jq ".public = false" ./vss-extension.json) > ./vss-extension.json + fi + - name: Create extension run: tfx extension create --manifest-globs vss-extension.json From 1a9d664a9f7e718c9df5bfd44817e47512513513 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:50:40 +0200 Subject: [PATCH 6/9] fix release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d78a4f9..1237199 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,7 +83,7 @@ jobs: run: | ls -la pwd - CLI_VERSION=$(cat ./cxAstScan/node_modules/@CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') + CLI_VERSION=$(cat ./cxAstScan/node_modules/@checkmarxdev/ast-cli-javascript-wrapper-runtime-cli/checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') echo "CLI version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" From 7f768aedd7fde152d202c274856bcd778469f846 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 11:59:59 +0200 Subject: [PATCH 7/9] check notify --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1237199..2e0177c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: tag: - description: 'Dev release tag' + description: 'Release tag' required: true type: string dev: @@ -120,7 +120,7 @@ jobs: run: tfx extension publish --vsix *.vsix --token ${{ secrets.AZURETOKEN }} notify: - if: inputs.dev == false || inputs.tag == 'test-notify' + if: inputs.dev == false || inputs.tag == '3.0.6-test-notify' needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: From d74a86530e6e81ec2d329aff3347f0b93ae06ca5 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 12:23:36 +0200 Subject: [PATCH 8/9] fix ocerriding public feild if dev release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17fef22..72725f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,7 @@ jobs: - name: Set public false if dev run: | if [ "${{ inputs.dev }}" == "true" ]; then - cat <<< $(jq ".public = false" ./vss-extension.json) > ./vss-extension.json + jq ".public = false" ./vss-extension.json > tmp.json && mv tmp.json ./vss-extension.json fi - name: Create extension From 97a635f1b4cc6c3e4a65246b11470dd1f44ece79 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Thu, 30 Jan 2025 12:24:48 +0200 Subject: [PATCH 9/9] debug --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72725f2..b6770f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -120,7 +120,7 @@ jobs: run: tfx extension publish --vsix *.vsix --token ${{ secrets.AZURETOKEN }} notify: - if: inputs.dev == false + if: inputs.dev == false || inputs.tag == '3.0.6-test-notify' needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: