Skip to content

Commit

Permalink
ci(build): fix incomplete maven deploy (#44)
Browse files Browse the repository at this point in the history
Also remove the upload bos step as it is already pushed on JFrog
  • Loading branch information
akantcheff authored Mar 12, 2024
1 parent ffb675a commit 644ef79
Showing 1 changed file with 10 additions and 36 deletions.
46 changes: 10 additions & 36 deletions .github/workflows/_reusable_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,16 @@ on:
publish:
type: boolean
default: false
description: Publish artifacts to Maven repository
repository-id:
description: To publish the project artifacts to the Maven alternative repository.
alt-deployment-repository:
type: string
default: snapshots
description: Id of the Maven repository
repository-url:
type: string
default: ${{ vars.SNAPSHOTS_REPOSITORY_URL }}
description: URL of the Maven repository
upload-bos-file:
type: boolean
default: false
description: To upload the BOS file as a Github Artifact
default: snapshots::${{ vars.SNAPSHOTS_REPOSITORY_URL }}
description: Maven alternative repository to which the project artifacts should be deployed.

secrets:
BONITA_CI_PAT:
required: true

permissions:
contents: read
checks: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-22.04
Expand All @@ -57,24 +44,11 @@ jobs:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}

- name: Maven Build
timeout-minutes: 90
run: ./mvnw -ntp clean verify
if: ${{ !inputs.publish }}
timeout-minutes: 60
run: ./mvnw -ntp verify

- name: Get deploy file
- name: Maven Build & Deploy
if: ${{ inputs.publish }}
id: deploy-file
run: |
FILE_NAME=$(./mvnw help:evaluate -Dexpression=project.build.finalName -DforceStdout -q)
echo "DEPLOY_FILE=target/${FILE_NAME}.zip" >> "$GITHUB_OUTPUT"
- name: Maven Deploy
if: ${{ inputs.publish }}
run: ./mvnw deploy:deploy-file -Dfile=${{ steps.deploy-file.outputs.DEPLOY_FILE }} -DrepositoryId=${{ inputs.repository-id }} -Durl=${{ inputs.repository-url }}

- name: Upload .bos file
if: ${{ inputs.upload-bos-file }}
uses: actions/upload-artifact@v4
with:
name: bonita-application-directory
path: "**/target/bonita-application-directory-*.bos"
retention-days: 10
timeout-minutes: 60
run: ./mvnw -ntp deploy -DaltDeploymentRepository=${{ inputs.alt-deployment-repository }}

0 comments on commit 644ef79

Please sign in to comment.