Skip to content

Commit

Permalink
Merge pull request #42 from bonitasoft/7.14.x
Browse files Browse the repository at this point in the history
[merge] 7.14.x into 7.15.x
  • Loading branch information
bonita-ci authored Mar 12, 2024
2 parents 0f6377c + ffb675a commit e7b44a5
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 29 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/_reusable_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Resuable Build

on:
workflow_call:
inputs:
ref:
type: string
default: ${{ github.ref }}
description: The branch ref to build. Leave empty to use workflow branch.
publish:
type: boolean
default: false
description: Publish artifacts to Maven repository
repository-id:
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

secrets:
BONITA_CI_PAT:
required: true

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

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: bonitasoft/bonita-application-directory
token: ${{ secrets.BONITA_CI_PAT }}
ref: ${{ inputs.ref }}

- name: ☕ Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
cache: maven

- name: Configure Maven Settings
uses: bonitasoft/maven-settings-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}

- name: Maven Build
timeout-minutes: 90
run: ./mvnw -ntp clean verify

- name: Get deploy file
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
11 changes: 11 additions & 0 deletions .github/workflows/all_check_passed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: All checks pass

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
allchecks:
runs-on: ubuntu-latest
steps:
- uses: wechuli/allcheckspassed@v1
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "master"
- "release-*"
- "dev"
paths-ignore:
- ".github/**"
- "**/README.md"
- "!.github/workflows/build.yml"
- "!.github/workflows/_reusable_build.yml"

jobs:
build:
uses: ./.github/workflows/_reusable_build.yml
with:
publish: true
secrets: inherit
14 changes: 14 additions & 0 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build Pull Request

on:
pull_request:
paths-ignore:
- ".github/**"
- "**/README.md"
- "!.github/workflows/build_pr.yml"
- "!.github/workflows/_reusable_build.yml"

jobs:
build-pr:
uses: ./.github/workflows/_reusable_build.yml
secrets: inherit
16 changes: 16 additions & 0 deletions .github/workflows/create_merge_pr_upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create Merge Pull Request Upstream

on:
workflow_dispatch:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "master"
- "release-*"

jobs:
create-merge-pr:
uses: bonitasoft/github-workflows/.github/workflows/_reusable_create_merge_pr.yml@main
secrets: inherit
with:
labels: automerge
29 changes: 0 additions & 29 deletions Jenkinsfile

This file was deleted.

0 comments on commit e7b44a5

Please sign in to comment.