Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ jobs:
- name: Checkout LFS objects
run: git lfs checkout

- name: Cache local Maven repository
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up JDK 11
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
Expand Down Expand Up @@ -82,8 +74,8 @@ jobs:
- name: Build with Maven
run: mvn -B verify -DskipTests -Dgpg.skip --file pom.xml

- name: Run SpotBugs Analysis
if: ${{ github.actor != 'dependabot[bot]' }}
uses: jwgmeligmeyling/spotbugs-github-action@b8e2c3523acb34c87f14e18cbcd2d87db8c8584e #v1.2
with:
path: '**/spotbugsXml.xml'
# - name: Run SpotBugs Analysis
# if: ${{ github.actor != 'dependabot[bot]' }}
# uses: jwgmeligmeyling/spotbugs-github-action@b8e2c3523acb34c87f14e18cbcd2d87db8c8584e #v1.2
# with:
# path: '**/spotbugsXml.xml'
18 changes: 11 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ on:
branches:
- main

permissions:
contents: read

jobs:
delete_tag:
permissions:
contents: write
runs-on: cx-public-ubuntu-x64
steps:
- name: Delete release
uses: dev-drprasad/delete-tag-and-release@8cd619d00037e4aeb781909c9a6b03940507d0da # v1.0.1
- name: Delete release and tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
delete_release: true
tag_name: 1.0.0-SNAPSHOT
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release delete "1.0.0-SNAPSHOT" --yes --cleanup-tag --repo ${{ github.repository }} || true

nightly:
needs: delete_tag
uses: CheckmarxDev/ast-cli-java-wrapper/.github/workflows/release.yml@main
uses: Checkmarx/ast-cli-java-wrapper/.github/workflows/release.yml@main
with:
tag: "1.0.0-SNAPSHOT"
dev: true
Expand Down
73 changes: 41 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
description: 'Version of the CLI to bundle'
required: false
type: string
publish:
description: 'Publish package to Maven Central'
required: false
default: false
type: boolean
workflow_call:
inputs:
tag:
Expand All @@ -31,9 +36,20 @@ on:
description: 'Version of the CLI to bundle'
required: false
type: string
publish:
description: 'Publish package to Maven Central'
required: false
default: false
type: boolean

permissions:
contents: read

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: cx-public-ubuntu-x64
outputs:
CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
Expand All @@ -57,7 +73,7 @@ jobs:
CLI_VERSION=$(./src/main/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"
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_OUTPUT

- name: Check if CLI version is latest
if: ${{ github.event.inputs.dev == 'false' && !github.event.inputs.cliTag && github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -85,15 +101,7 @@ jobs:
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${tag}" -m "${message}"
git push origin "${tag}"
echo "::set-output name=TAG_NAME::${{ inputs.tag }}"

- name: Cache local Maven repository
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
echo "TAG_NAME=${{ inputs.tag }}" >> $GITHUB_OUTPUT

- name: Set up Maven Central Repository
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
Expand All @@ -118,6 +126,7 @@ jobs:
echo "AID_PROP=${prop}" >> $GITHUB_ENV

- name: Publish package
if: inputs.publish == true
run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }}
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand All @@ -131,26 +140,26 @@ jobs:
tag_name: ${{ inputs.tag }}
prerelease: ${{ inputs.dev }}

notify:
if: inputs.dev == false
needs: release
uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
with:
product_name: Java Wrapper
release_version: ${{ needs.release.outputs.TAG_NAME }}
cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
release_author: "Sypher Team"
release_url: https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
jira_product_name: JAVA_WRAPPER
secrets: inherit
# notify:
# if: inputs.dev == false
# needs: release
# uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
# with:
# product_name: Java Wrapper
# release_version: ${{ needs.release.outputs.TAG_NAME }}
# cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
# release_author: "Sypher Team"
# release_url: https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
# jira_product_name: JAVA_WRAPPER
# secrets: inherit

dispatch_auto_release:
name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
if: inputs.dev == false
needs: notify
uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
with:
cli_version: ${{ needs.release.outputs.CLI_VERSION }}
is_cli_release: false
is_java_release: true
secrets: inherit
# dispatch_auto_release:
# name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
# if: inputs.dev == false
# needs: notify
# uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
# with:
# cli_version: ${{ needs.release.outputs.CLI_VERSION }}
# is_cli_release: false
# is_java_release: true
# secrets: inherit
6 changes: 2 additions & 4 deletions .github/workflows/update-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Update checkmarx ast cli

on:
workflow_dispatch:
repository_dispatch:
types: [cli-version-update]

permissions:
contents: read
Expand Down Expand Up @@ -31,8 +29,8 @@ jobs:
- name: Get Latest Checkmarx API version
id: checkmarx-ast-cli
run: |
echo ::set-output name=release_tag::$(curl -sL https://api.github.com/repos/checkmarx/ast-cli/releases/latest | jq -r ".tag_name")
echo ::set-output name=current_tag::$(<checkmarx-ast-cli.version)
echo "release_tag=$(curl -sL https://api.github.com/repos/checkmarx/ast-cli/releases/latest | jq -r '.tag_name')" >> $GITHUB_OUTPUT
echo "current_tag=$(<checkmarx-ast-cli.version)" >> $GITHUB_OUTPUT

- name: Update Checkmarx cli version
if: steps.checkmarx-ast-cli.outputs.current_tag != steps.checkmarx-ast-cli.outputs.release_tag
Expand Down
2 changes: 1 addition & 1 deletion checkmarx-ast-cli.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.48
2.3.54
4 changes: 2 additions & 2 deletions src/main/resources/cx-linux
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx-linux-arm
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx-mac
Git LFS file not shown
4 changes: 2 additions & 2 deletions src/main/resources/cx.exe
Git LFS file not shown
Loading