Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[merge] master into release-10.0.0 #48

Merged
merged 10 commits into from
Mar 13, 2024
54 changes: 54 additions & 0 deletions .github/workflows/_reusable_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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: To publish the project artifacts to the Maven alternative repository.
alt-deployment-repository:
type: string
default: snapshots::${{ vars.SNAPSHOTS_REPOSITORY_URL }}
description: Maven alternative repository to which the project artifacts should be deployed.

secrets:
BONITA_CI_PAT:
required: true

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
if: ${{ !inputs.publish }}
timeout-minutes: 60
run: ./mvnw -ntp verify

- name: Maven Build & Deploy
if: ${{ inputs.publish }}
timeout-minutes: 60
run: ./mvnw -ntp deploy -DaltDeploymentRepository=${{ inputs.alt-deployment-repository }}
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
20 changes: 20 additions & 0 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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:
if: |
startsWith(github.head_ref, '7.14.x') != 'true' ||
startsWith(github.head_ref, '7.15.x') != 'true' ||
startsWith(github.head_ref, '8.0.x') != 'true' ||
startsWith(github.head_ref, 'master') != 'true' ||
startsWith(github.head_ref, 'release-') != 'true'
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
38 changes: 0 additions & 38 deletions Jenkinsfile

This file was deleted.

5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<web.widgets.dir>${project.build.directory}/web_widgets</web.widgets.dir>
<web.fragments.dir>${project.build.directory}/web_fragments</web.fragments.dir>

<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
<maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
Expand Down Expand Up @@ -94,6 +95,10 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
Expand Down
Loading