From 1ec25c17d1fe67bd2c59db5ef87bd425d7014702 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:13:49 +0200 Subject: [PATCH 01/11] Add notification for new release (AST-000) --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9099244..99134bf5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,6 +88,12 @@ jobs: chmod +x ./.github/scripts/update_cli.sh ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} + - name: Extract cli version + run: | + CLI_VERSION=$(../src/main/wrapper/resources/cx-linux --version) + echo "Cli version being packed is $CLI_VERSION" + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + # RUN NPM INSTALL AND BUILD - name: NPM ci and build run: | @@ -151,3 +157,16 @@ jobs: tag_name: ${{env.TAG_NAME}} generate_release_notes: true prerelease: ${{ inputs.dev }} + + notify: + if: inputs.dev == false + needs: release + uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main + with: + product_name: Javascript Wrapper + release_version: ${{env.TAG_NAME}} + cli_release_version: ${{env.CLI_VERSION}} + release_author: "Phoenix Team" + release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/releases/tag/${{env.TAG_NAME}} + jira_product_name: JAVASCRIPT_WRAPPER + secrets: inherit From 13bea5698e39ad265473516612c29a199ef0be53 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:15:25 +0200 Subject: [PATCH 02/11] Add notification for new release (AST-000) --- .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 99134bf5..911f355a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,8 +164,8 @@ jobs: uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: product_name: Javascript Wrapper - release_version: ${{env.TAG_NAME}} - cli_release_version: ${{env.CLI_VERSION}} + release_version: ${{ env.TAG_NAME }} + cli_release_version: ${{ env.CLI_VERSION }} release_author: "Phoenix Team" release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/releases/tag/${{env.TAG_NAME}} jira_product_name: JAVASCRIPT_WRAPPER From b6ce95683016baf08e37b664588692f3ea1cb202 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:21:41 +0200 Subject: [PATCH 03/11] Add notification for new release (AST-000) --- .github/workflows/release.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 911f355a..5f582b64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,3 @@ - name: Javascript Wrapper Release on: @@ -50,8 +49,11 @@ jobs: release: runs-on: ubuntu-latest env: - GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }} - BRANCH_NAME: npm-version-patch + GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }} + BRANCH_NAME: npm-version-patch + outputs: + TAG_NAME: ${{ steps.set_tag_name.outputs.TAG_NAME }} + CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }} steps: # CHECKOUT PROJECT @@ -73,12 +75,15 @@ jobs: # GET TAG NAME - name: Generate Tag name + id: set_tag_name run: | if [ ${{ inputs.dev }} == true ]; then - echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV + TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version) else - echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV + TAG_NAME=$(npm version patch --no-git-tag-version) fi + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV + echo "::set-output name=TAG_NAME::$TAG_NAME" # DOWNLOAD CLI IF IT IS A DEV VERSION AND A CLI TAG WAS PROVIDED - name: Download cli with tag ${{ inputs.cliTag }} @@ -89,10 +94,12 @@ jobs: ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} - name: Extract cli version + id: extract_cli_version run: | - CLI_VERSION=$(../src/main/wrapper/resources/cx-linux --version) - echo "Cli version being packed is $CLI_VERSION" - echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + CLI_VERSION=$(../src/main/wrapper/resources/cx-linux --version) + echo "Cli version being packed is $CLI_VERSION" + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + echo "::set-output name=CLI_VERSION::$CLI_VERSION" # RUN NPM INSTALL AND BUILD - name: NPM ci and build @@ -164,9 +171,9 @@ jobs: uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: product_name: Javascript Wrapper - release_version: ${{ env.TAG_NAME }} - cli_release_version: ${{ env.CLI_VERSION }} + release_version: ${{ needs.release.outputs.TAG_NAME }} + cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} release_author: "Phoenix Team" - release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/releases/tag/${{env.TAG_NAME}} + release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} jira_product_name: JAVASCRIPT_WRAPPER secrets: inherit From 12a528f19c772a710cc2d1886cb0ac9ec406eaf2 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:23:55 +0200 Subject: [PATCH 04/11] Add notification for new release (AST-000) --- .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 5f582b64..dfa31dc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,7 @@ jobs: - name: Extract cli version id: extract_cli_version run: | - CLI_VERSION=$(../src/main/wrapper/resources/cx-linux --version) + CLI_VERSION=$(../../src/main/wrapper/resources/cx-linux --version) echo "Cli version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" From 3da969f0ab5465b9a67ff6d27342b66c146db865 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:27:55 +0200 Subject: [PATCH 05/11] Add notification for new release (AST-000) --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfa31dc6..8e431053 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,6 +93,13 @@ jobs: chmod +x ./.github/scripts/update_cli.sh ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} + - name: Debug CLI version path + run: | + echo "Current directory: $(pwd)" + cd ../../src/main/wrapper/resources || exit 1 + echo "Files in the current directory:" + ls -la + - name: Extract cli version id: extract_cli_version run: | From 5b5ba27a62b8ce46ee651af58a9c7df459b489d9 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:29:58 +0200 Subject: [PATCH 06/11] Add notification for new release (AST-000) --- .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 8e431053..147c10d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,7 @@ jobs: - name: Debug CLI version path run: | echo "Current directory: $(pwd)" - cd ../../src/main/wrapper/resources || exit 1 + cd ./src/main/wrapper/resources || exit 1 echo "Files in the current directory:" ls -la From 9c2a5ea759952462a90d36320fc02db0e448cb8e Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:35:37 +0200 Subject: [PATCH 07/11] Add notification for new release (AST-000) --- .github/workflows/release.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 147c10d7..467140c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,17 +93,10 @@ jobs: chmod +x ./.github/scripts/update_cli.sh ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} - - name: Debug CLI version path - run: | - echo "Current directory: $(pwd)" - cd ./src/main/wrapper/resources || exit 1 - echo "Files in the current directory:" - ls -la - - name: Extract cli version id: extract_cli_version run: | - CLI_VERSION=$(../../src/main/wrapper/resources/cx-linux --version) + CLI_VERSION=$(./src/main/wrapper/resources/cx-linux --version) echo "Cli version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" From a66679209bafde86e8a6e5e758bd91c1fc4e3848 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:38:43 +0200 Subject: [PATCH 08/11] Add notification for new release (AST-000) --- .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 467140c5..c22e1043 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,7 @@ jobs: - name: Extract cli version id: extract_cli_version run: | - CLI_VERSION=$(./src/main/wrapper/resources/cx-linux --version) + CLI_VERSION=$(./src/main/wrapper/resources/cx-linux version) echo "Cli version being packed is $CLI_VERSION" echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" From ad796c3ddf8476be950a4fb2cbbfe435f4e595fb Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:43:54 +0200 Subject: [PATCH 09/11] Add notification for new release (AST-000) --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c22e1043..14c2b4e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,11 +93,11 @@ jobs: chmod +x ./.github/scripts/update_cli.sh ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} - - name: Extract cli version + - name: Extract CLI version id: extract_cli_version run: | - CLI_VERSION=$(./src/main/wrapper/resources/cx-linux version) - echo "Cli version being packed is $CLI_VERSION" + CLI_VERSION=$(./src/main/wrapper/resources/cx-linux 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 fd50fa224f1cfdfa8ecbed28e842a4efbd7479b9 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 19:47:37 +0200 Subject: [PATCH 10/11] Add notification for new release (AST-000) --- .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 14c2b4e0..67d6238c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,7 +166,7 @@ jobs: prerelease: ${{ inputs.dev }} notify: - if: inputs.dev == false + if: inputs.dev == false || inputs.jsTag == 'test-notify' needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: From 8a2e3edc722461db9a4b720c630d7a97f9aa61e3 Mon Sep 17 00:00:00 2001 From: greensd4 Date: Sun, 26 Jan 2025 20:03:30 +0200 Subject: [PATCH 11/11] Add notification for new release (AST-000) --- .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 67d6238c..14c2b4e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,7 +166,7 @@ jobs: prerelease: ${{ inputs.dev }} notify: - if: inputs.dev == false || inputs.jsTag == 'test-notify' + if: inputs.dev == false needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: