From 0d423a8a5bbe711218691547c2c0089654dd5a05 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:10:19 +0200 Subject: [PATCH 01/19] Enhance release workflow to extract and output CLI version --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5eaa1e1..afd9172e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,6 +102,9 @@ jobs: if: inputs.rchannels release: runs-on: ubuntu-latest + outputs: + TAG_NAME: ${{ steps.set_tag_name.outputs.TAG_NAME }} + CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }} steps: # Check out current repository - name: Fetch Sources @@ -131,6 +134,46 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./gradlew buildPlugin --info + + - name: Extract CLI version + id: extract_cli_version + run: | + # Find the correct JAR file in Gradle cache (excluding javadoc JARs) + JAR_PATH=$(find ~/.gradle -type f -name "ast-cli-java-wrapper-*.jar" ! -name "*-javadoc.jar" | head -n 1) + + if [ -z "$JAR_PATH" ]; then + echo "Error: ast-cli-java-wrapper JAR not found in Gradle dependencies." + exit 1 + fi + + echo "Found JAR at: $JAR_PATH" + + # Create a temporary directory to extract the CLI + TEMP_DIR=$(mktemp -d) + unzip -j "$JAR_PATH" "cx-linux" -d "$TEMP_DIR" + + if [ ! -f "$TEMP_DIR/cx-linux" ]; then + echo "Error: cx-linux not found inside the JAR." + ls -la + exit 1 + fi + + chmod +x "$TEMP_DIR/cx-linux" + + # Extract the CLI version + CLI_VERSION=$("$TEMP_DIR/cx-linux" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') + + echo "CLI version being packed is $CLI_VERSION" + + # Export CLI version as an environment variable + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + echo "::set-output name=CLI_VERSION::$CLI_VERSION" + + # Echo the CLI version for debugging purposes + echo "CLI version: $CLI_VERSION" + + + # Create the release or prerelease - name: Create Release or Prerelease uses: softprops/action-gh-release@v1 @@ -150,3 +193,16 @@ jobs: else ./gradlew publishPlugin -Prchannels=${{ inputs.rchannels }} fi + + notify: + if: ${{ (inputs.rchannels != '' && inputs.rchannels != null) || inputs.rchannels == 'test-notify' }} + needs: release + uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main + with: + product_name: JetBrains 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-jetbrains-plugin/releases/tag/${{ needs.release.outputs.TAG_NAME }} + jira_product_name: JetBrains + secrets: inherit \ No newline at end of file From 23c667541dc82c7b5f942d9a9aed658c08b56b2c Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:18:48 +0200 Subject: [PATCH 02/19] Add output for GH_RELEASE_TAG_NAME and clean up CLI_VERSION debug echo --- .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 afd9172e..908f9682 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,6 +129,8 @@ jobs: echo "GH_RELEASE_TAG_NAME=${{ env.RELEASE_VERSION }}-${{ inputs.rchannels }}" >> $GITHUB_ENV fi echo "Release name - ${{ env.GH_RELEASE_TAG_NAME }}" + echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" + # Build plugin - name: Build env: @@ -169,9 +171,7 @@ jobs: echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" - # Echo the CLI version for debugging purposes - echo "CLI version: $CLI_VERSION" - + # Echo the CLI version for debugging purposes # Create the release or prerelease From e655af63b2cee43b56263c7283703999b0805fbd Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:29:40 +0200 Subject: [PATCH 03/19] Refactor release workflow to use GITHUB_OUTPUT for setting TAG_NAME and CLI_VERSION --- .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 908f9682..a2c3277a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,7 +129,7 @@ jobs: echo "GH_RELEASE_TAG_NAME=${{ env.RELEASE_VERSION }}-${{ inputs.rchannels }}" >> $GITHUB_ENV fi echo "Release name - ${{ env.GH_RELEASE_TAG_NAME }}" - echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" + echo "TAG_NAME=${{ env.GH_RELEASE_TAG_NAME }}" >> $GITHUB_OUTPUT # Build plugin - name: Build @@ -169,7 +169,7 @@ jobs: # Export CLI version as an environment variable echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV - echo "::set-output name=CLI_VERSION::$CLI_VERSION" + echo "CLI_VERSION=${{ env.CLI_VERSION }}" >> $GITHUB_OUTPUT # Echo the CLI version for debugging purposes From b7f434b8c6cf8658606e44362b6a433a3bee00e9 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:39:24 +0200 Subject: [PATCH 04/19] Update release workflow to set TAG_NAME and CLI_VERSION using set-output --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2c3277a..6c5edc7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,7 +129,6 @@ jobs: echo "GH_RELEASE_TAG_NAME=${{ env.RELEASE_VERSION }}-${{ inputs.rchannels }}" >> $GITHUB_ENV fi echo "Release name - ${{ env.GH_RELEASE_TAG_NAME }}" - echo "TAG_NAME=${{ env.GH_RELEASE_TAG_NAME }}" >> $GITHUB_OUTPUT # Build plugin - name: Build @@ -183,6 +182,13 @@ jobs: files: build/distributions/* generate_release_notes: true prerelease: ${{ inputs.rchannels != '' && inputs.rchannels != null }} + + - name: Echo CLI version and tag name to outputs + id: set_tag_name + run: | + echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" + echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" + # Publish the plugin in marketplace - name: Publish Plugin env: From 87300afde5be539a965b3e7090612c6c106caef0 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:46:01 +0200 Subject: [PATCH 05/19] Add error handling for unset CLI_VERSION in release workflow --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c5edc7e..5b5aee0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -167,11 +167,13 @@ jobs: echo "CLI version being packed is $CLI_VERSION" # Export CLI version as an environment variable + if [ -z "$CLI_VERSION" ]; then + echo "Error: CLI_VERSION is not set or is empty." + exit 1 + fi + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV - echo "CLI_VERSION=${{ env.CLI_VERSION }}" >> $GITHUB_OUTPUT - - # Echo the CLI version for debugging purposes - + # Create the release or prerelease - name: Create Release or Prerelease From f7008b14cc252338582d087c319763e7f904ac4e Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 15:59:01 +0200 Subject: [PATCH 06/19] Add script to extract CLI version from JAR and update release workflow --- .github/scripts/extract_cli_version.sh | 46 ++++++++++++++++++++++++++ .github/workflows/release.yml | 38 +-------------------- 2 files changed, 47 insertions(+), 37 deletions(-) create mode 100644 .github/scripts/extract_cli_version.sh diff --git a/.github/scripts/extract_cli_version.sh b/.github/scripts/extract_cli_version.sh new file mode 100644 index 00000000..09e5ae56 --- /dev/null +++ b/.github/scripts/extract_cli_version.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "Starting CLI version extraction..." + +# Find the correct JAR file in Gradle cache (excluding javadoc JARs) +JAR_PATH=$(find ~/.gradle -type f -name "ast-cli-java-wrapper-*.jar" ! -name "*-javadoc.jar" | head -n 1) + +if [ -z "$JAR_PATH" ]; then + echo "Error: ast-cli-java-wrapper JAR not found in Gradle dependencies." + exit 1 +fi + +echo "Found JAR at: $JAR_PATH" + +# Create a temporary directory to extract the CLI +TEMP_DIR=$(mktemp -d) +echo "Using temporary directory: $TEMP_DIR" + +unzip -j "$JAR_PATH" "cx-mac" -d "$TEMP_DIR" +if [ $? -ne 0 ]; then + echo "Error: Failed to unzip cx-linux from the JAR." + exit 1 +fi + +if [ ! -f "$TEMP_DIR/cx-mac" ]; then + echo "Error: cx-linux not found inside the JAR." + ls -la "$TEMP_DIR" + exit 1 +fi + +chmod +x "$TEMP_DIR/cx-mac" + +# Extract the CLI version +CLI_VERSION=$("$TEMP_DIR/cx-mac" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') + +if [ -z "$CLI_VERSION" ]; then + echo "Error: CLI_VERSION is not set or is empty." + exit 1 +fi + +echo "CLI version being packed is $CLI_VERSION" + +# Export CLI version as an environment variable +echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + +echo "CLI version extraction completed successfully." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b5aee0b..eec5dad1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,43 +137,7 @@ jobs: run: ./gradlew buildPlugin --info - name: Extract CLI version - id: extract_cli_version - run: | - # Find the correct JAR file in Gradle cache (excluding javadoc JARs) - JAR_PATH=$(find ~/.gradle -type f -name "ast-cli-java-wrapper-*.jar" ! -name "*-javadoc.jar" | head -n 1) - - if [ -z "$JAR_PATH" ]; then - echo "Error: ast-cli-java-wrapper JAR not found in Gradle dependencies." - exit 1 - fi - - echo "Found JAR at: $JAR_PATH" - - # Create a temporary directory to extract the CLI - TEMP_DIR=$(mktemp -d) - unzip -j "$JAR_PATH" "cx-linux" -d "$TEMP_DIR" - - if [ ! -f "$TEMP_DIR/cx-linux" ]; then - echo "Error: cx-linux not found inside the JAR." - ls -la - exit 1 - fi - - chmod +x "$TEMP_DIR/cx-linux" - - # Extract the CLI version - CLI_VERSION=$("$TEMP_DIR/cx-linux" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') - - echo "CLI version being packed is $CLI_VERSION" - - # Export CLI version as an environment variable - if [ -z "$CLI_VERSION" ]; then - echo "Error: CLI_VERSION is not set or is empty." - exit 1 - fi - - echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV - + run: ./extract_cli_version.sh # Create the release or prerelease - name: Create Release or Prerelease From fbc8c257f585867d0f2b0195328880d814cbdcc5 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:01:04 +0200 Subject: [PATCH 07/19] changed from cx-mac to cx-linux --- .github/scripts/extract_cli_version.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/extract_cli_version.sh b/.github/scripts/extract_cli_version.sh index 09e5ae56..e0ebb5d0 100644 --- a/.github/scripts/extract_cli_version.sh +++ b/.github/scripts/extract_cli_version.sh @@ -16,22 +16,22 @@ echo "Found JAR at: $JAR_PATH" TEMP_DIR=$(mktemp -d) echo "Using temporary directory: $TEMP_DIR" -unzip -j "$JAR_PATH" "cx-mac" -d "$TEMP_DIR" +unzip -j "$JAR_PATH" "cx-linux" -d "$TEMP_DIR" if [ $? -ne 0 ]; then echo "Error: Failed to unzip cx-linux from the JAR." exit 1 fi -if [ ! -f "$TEMP_DIR/cx-mac" ]; then +if [ ! -f "$TEMP_DIR/cx-linux" ]; then echo "Error: cx-linux not found inside the JAR." ls -la "$TEMP_DIR" exit 1 fi -chmod +x "$TEMP_DIR/cx-mac" +chmod +x "$TEMP_DIR/cx-linux" # Extract the CLI version -CLI_VERSION=$("$TEMP_DIR/cx-mac" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') +CLI_VERSION=$("$TEMP_DIR/cx-linux" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') if [ -z "$CLI_VERSION" ]; then echo "Error: CLI_VERSION is not set or is empty." From 394ba5e40e0da7ac40ff334af72c1f61ff0d8231 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:07:03 +0200 Subject: [PATCH 08/19] added script location --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eec5dad1..149b5e35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,7 +137,9 @@ jobs: run: ./gradlew buildPlugin --info - name: Extract CLI version - run: ./extract_cli_version.sh + run: | + chmod +x ./../scripts/extract_cli_version.sh + ./../scripts/extract_cli_version.sh # Create the release or prerelease - name: Create Release or Prerelease From e4ada8bd5d014f7d21f38373f8b3ed3d0c2e9042 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:07:50 +0200 Subject: [PATCH 09/19] added script location --- .github/scripts/extract_cli_version.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .github/scripts/extract_cli_version.sh diff --git a/.github/scripts/extract_cli_version.sh b/.github/scripts/extract_cli_version.sh old mode 100644 new mode 100755 From 0003ee99bc88b556bfa8bf61bb58703da99a5401 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:11:58 +0200 Subject: [PATCH 10/19] added script location --- .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 149b5e35..8f2a40e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,8 +138,8 @@ jobs: - name: Extract CLI version run: | - chmod +x ./../scripts/extract_cli_version.sh - ./../scripts/extract_cli_version.sh + chmod +x ./.github/scripts/extract_cli_version.sh + ./.github/scripts/extract_cli_version.sh # Create the release or prerelease - name: Create Release or Prerelease From 0a5e3ea43cb51cfdbede2e835f81e320480e8c06 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:12:25 +0200 Subject: [PATCH 11/19] added script location --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f2a40e5..8de2d75b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,6 +139,7 @@ jobs: - name: Extract CLI version run: | chmod +x ./.github/scripts/extract_cli_version.sh + ls -la ./.github/scripts/extract_cli_version.sh # Create the release or prerelease From e09715da9d16c07ecba820194b5f382644c188f5 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:22:53 +0200 Subject: [PATCH 12/19] add CLI version extraction to release workflow --- .github/workflows/release.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8de2d75b..45ec7c07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,10 +137,13 @@ jobs: run: ./gradlew buildPlugin --info - name: Extract CLI version + id: extract_cli_version run: | chmod +x ./.github/scripts/extract_cli_version.sh ls -la ./.github/scripts/extract_cli_version.sh + echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" + # Create the release or prerelease - name: Create Release or Prerelease @@ -152,11 +155,10 @@ jobs: generate_release_notes: true prerelease: ${{ inputs.rchannels != '' && inputs.rchannels != null }} - - name: Echo CLI version and tag name to outputs + - name: Echo tag name to outputs id: set_tag_name run: | echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" - echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" # Publish the plugin in marketplace - name: Publish Plugin From afbc9591b16662b88b4aec4fb87e0dfa6acee7e8 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:30:11 +0200 Subject: [PATCH 13/19] add CLI version extraction to release workflow --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45ec7c07..31715893 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,13 +137,9 @@ jobs: run: ./gradlew buildPlugin --info - name: Extract CLI version - id: extract_cli_version run: | chmod +x ./.github/scripts/extract_cli_version.sh - ls -la ./.github/scripts/extract_cli_version.sh - echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" - # Create the release or prerelease - name: Create Release or Prerelease @@ -160,6 +156,11 @@ jobs: run: | echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" + - name: Echo CLI version to outputs + id: extract_cli_version + run: | + echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" + # Publish the plugin in marketplace - name: Publish Plugin env: From 7366ef989368effb9ed7613abbef1cb932263a75 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:39:36 +0200 Subject: [PATCH 14/19] Delete step into noty jib condition for debug purpose --- .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 31715893..31437cff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -173,7 +173,7 @@ jobs: fi notify: - if: ${{ (inputs.rchannels != '' && inputs.rchannels != null) || inputs.rchannels == 'test-notify' }} + if: ${{ inputs.rchannels != '' && inputs.rchannels != null }} needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: From 4f576d673a2d9cd7f18495dc6404affeeeadc659 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:44:09 +0200 Subject: [PATCH 15/19] Enhance CLI version extraction script to require binary name as parameter --- .github/scripts/extract_cli_version.sh | 24 ++++++++++++++++-------- .github/workflows/release.yml | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/scripts/extract_cli_version.sh b/.github/scripts/extract_cli_version.sh index e0ebb5d0..d1eeabac 100755 --- a/.github/scripts/extract_cli_version.sh +++ b/.github/scripts/extract_cli_version.sh @@ -1,6 +1,14 @@ #!/bin/bash -echo "Starting CLI version extraction..." +# Check if a parameter is provided +if [ -z "$1" ]; then + echo "Error: No binary name provided. Usage: $0 " + exit 1 +fi + +BINARY_NAME=$1 + +echo "Starting CLI version extraction for binary: $BINARY_NAME..." # Find the correct JAR file in Gradle cache (excluding javadoc JARs) JAR_PATH=$(find ~/.gradle -type f -name "ast-cli-java-wrapper-*.jar" ! -name "*-javadoc.jar" | head -n 1) @@ -16,22 +24,22 @@ echo "Found JAR at: $JAR_PATH" TEMP_DIR=$(mktemp -d) echo "Using temporary directory: $TEMP_DIR" -unzip -j "$JAR_PATH" "cx-linux" -d "$TEMP_DIR" +unzip -j "$JAR_PATH" "$BINARY_NAME" -d "$TEMP_DIR" if [ $? -ne 0 ]; then - echo "Error: Failed to unzip cx-linux from the JAR." + echo "Error: Failed to unzip $BINARY_NAME from the JAR." exit 1 fi -if [ ! -f "$TEMP_DIR/cx-linux" ]; then - echo "Error: cx-linux not found inside the JAR." +if [ ! -f "$TEMP_DIR/$BINARY_NAME" ]; then + echo "Error: $BINARY_NAME not found inside the JAR." ls -la "$TEMP_DIR" exit 1 fi -chmod +x "$TEMP_DIR/cx-linux" +chmod +x "$TEMP_DIR/$BINARY_NAME" # Extract the CLI version -CLI_VERSION=$("$TEMP_DIR/cx-linux" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') +CLI_VERSION=$("$TEMP_DIR/$BINARY_NAME" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') if [ -z "$CLI_VERSION" ]; then echo "Error: CLI_VERSION is not set or is empty." @@ -43,4 +51,4 @@ echo "CLI version being packed is $CLI_VERSION" # Export CLI version as an environment variable echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV -echo "CLI version extraction completed successfully." +echo "CLI version extraction for $BINARY_NAME completed successfully." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31437cff..210741ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -139,7 +139,7 @@ jobs: - name: Extract CLI version run: | chmod +x ./.github/scripts/extract_cli_version.sh - ./.github/scripts/extract_cli_version.sh + ./.github/scripts/extract_cli_version.sh cx-linux # Create the release or prerelease - name: Create Release or Prerelease From b49369f4aba7e4d4f2149f49cbc352ff40836447 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:44:41 +0200 Subject: [PATCH 16/19] Check 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 210741ea..5f2c37c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -173,7 +173,7 @@ jobs: fi notify: - if: ${{ inputs.rchannels != '' && inputs.rchannels != null }} + if: ${{ (inputs.rchannels != '' && inputs.rchannels != null) || inputs.rchannels == 'test-notify' }} needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: From cdeb4b600b939bab1db0ebd02521eb3f2ececcaf Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:48:12 +0200 Subject: [PATCH 17/19] Delete step into noty job condition for debug purpose --- .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 5f2c37c7..210741ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -173,7 +173,7 @@ jobs: fi notify: - if: ${{ (inputs.rchannels != '' && inputs.rchannels != null) || inputs.rchannels == 'test-notify' }} + if: ${{ inputs.rchannels != '' && inputs.rchannels != null }} needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: From ebb07f05eb69cd00bcdef38959dc3e5f1f31dea5 Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 16:59:33 +0200 Subject: [PATCH 18/19] Refactor release workflow to consolidate output steps for tag name and CLI version --- .github/workflows/release.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 210741ea..e77eb80a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,8 +103,8 @@ jobs: release: runs-on: ubuntu-latest outputs: - TAG_NAME: ${{ steps.set_tag_name.outputs.TAG_NAME }} - CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }} + TAG_NAME: ${{ steps.set_outputs.outputs.TAG_NAME }} + CLI_VERSION: ${{ steps.set_outputs.outputs.CLI_VERSION }} steps: # Check out current repository - name: Fetch Sources @@ -151,14 +151,10 @@ jobs: generate_release_notes: true prerelease: ${{ inputs.rchannels != '' && inputs.rchannels != null }} - - name: Echo tag name to outputs - id: set_tag_name + - name: Echo CLI version and tag name to outputs + id: set_outputs run: | echo "::set-output name=TAG_NAME::${{ env.GH_RELEASE_TAG_NAME }}" - - - name: Echo CLI version to outputs - id: extract_cli_version - run: | echo "::set-output name=CLI_VERSION::${{ env.CLI_VERSION }}" # Publish the plugin in marketplace From e9a6567b591281b9ad2f4f7fd2330fa0d5def5ba Mon Sep 17 00:00:00 2001 From: AlvoBen Date: Tue, 28 Jan 2025 17:01:55 +0200 Subject: [PATCH 19/19] revert delete step into noty jib condition for debug purpose --- .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 e77eb80a..9212d47c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -169,7 +169,7 @@ jobs: fi notify: - if: ${{ inputs.rchannels != '' && inputs.rchannels != null }} + if: ${{ (inputs.rchannels != '' && inputs.rchannels != null) || inputs.rchannels == 'test-notify' }} needs: release uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main with: