-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
255 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
target-branch: dev | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
groups: | ||
production-dependencies: | ||
dependency-type: "production" | ||
development-dependencies: | ||
dependency-type: "development" | ||
|
||
# Maintain dependencies for maven | ||
- package-ecosystem: "maven" | ||
directory: "/" | ||
target-branch: dev | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
groups: | ||
production-dependencies: | ||
dependency-type: "production" | ||
development-dependencies: | ||
dependency-type: "development" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
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 on Bonita Artifact Repository. | ||
release: | ||
type: boolean | ||
default: false | ||
description: To indicate that the current build is for a release (it will publish artifacts as well). | ||
|
||
secrets: | ||
BONITA_CI_PAT: | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: bonitasoft/bonita-super-admin-application | ||
token: ${{ secrets.BONITA_CI_PAT }} | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: ☕ Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
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 snapshot | ||
if: ${{ inputs.publish && !inputs.release }} | ||
timeout-minutes: 60 | ||
run: ./mvnw -ntp deploy -DaltDeploymentRepository=snapshots::${{ vars.SNAPSHOTS_REPOSITORY_URL }} | ||
|
||
- name: Maven Build & Deploy release | ||
if: ${{ inputs.release }} | ||
timeout-minutes: 60 | ||
# Profile release is used to sign artifacts with GPG | ||
run: ./mvnw -ntp deploy -Prelease -DaltDeploymentRepository=staging::${{ vars.STAGING_REPOSITORY_URL }} | ||
|
||
- name: Upload BOS to the Github release | ||
if: ${{ inputs.release }} | ||
env: | ||
GH_TOKEN: ${{ secrets.BONITA_CI_PAT }} | ||
run: gh release upload ${{ inputs.ref }} ./target/bonita-super-admin-application-${{ inputs.ref }}.bos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Create Tag | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
required: true | ||
type: string | ||
secrets: | ||
BONITA_CI_PAT: | ||
required: true | ||
KSM_CONFIG: | ||
required: true | ||
|
||
jobs: | ||
create_tag: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: bonitasoft/bonita-super-admin-application | ||
token: ${{ secrets.BONITA_CI_PAT }} | ||
|
||
- name: Git Setup | ||
uses: bonitasoft/git-setup-action@v1 | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | ||
|
||
- name: Create Release Branch | ||
run: git checkout -B release/${{ inputs.version }} | ||
|
||
- name: Change Version | ||
run: ./mvnw versions:set -DnewVersion=${{ inputs.version }} | ||
|
||
- name: Commit and Push Tag | ||
run: | | ||
git commit -a -m "release(${{ inputs.version }}) create release ${{ inputs.version }}" | ||
git tag -a ${{ inputs.version }} -m "Release ${{ inputs.version }}" | ||
git push origin ${{ inputs.version }}:${{ inputs.version }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BONITA_CI_PAT }} | ||
with: | ||
tag_name: ${{ inputs.version }} | ||
release_name: Release ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Update Version | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
type: string | ||
required: true | ||
secrets: | ||
KSM_CONFIG: | ||
required: true | ||
BONITA_CI_PAT: | ||
required: true | ||
|
||
jobs: | ||
update-version: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: bonitasoft/bonita-super-admin-application | ||
ref: ${{ github.ref }} | ||
token: ${{ secrets.BONITA_CI_PAT }} | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
|
||
- name: Setup Maven | ||
uses: bonitasoft/maven-settings-action@v1 | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | ||
|
||
- name: Update version | ||
run: ./mvnw -B -ntp versions:set -DnewVersion=${{ inputs.version }} | ||
|
||
- name: Git Setup | ||
uses: bonitasoft/git-setup-action@v1 | ||
with: | ||
keeper-secret-config: ${{ secrets.KSM_CONFIG }} | ||
|
||
- name: Commit and push | ||
run: | | ||
git commit -a -m "chore(versioning): update version to ${{ inputs.version }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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: contains(fromJson(vars.SUPPORTED_BRANCHES).all-branches, github.head_ref) != true | ||
uses: ./.github/workflows/_reusable_build.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Merge Upstream | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "[0-9]+.[0-9]+.x" | ||
- "master" | ||
- "release-*" | ||
|
||
jobs: | ||
merge-upstream: | ||
uses: bonitasoft/github-workflows/.github/workflows/_reusable_merge_upstream.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,7 @@ | |
.DS_Store | ||
.project | ||
.settings/ | ||
.flattened-pom.xml | ||
|
||
.flattened-pom.xml | ||
pom.xml.versionsBackup | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters