Skip to content

Commit

Permalink
chore(merge): 7.15.x into 8.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bonita-ci committed May 13, 2024
2 parents 439b895 + e7c8b39 commit 4dfc2d6
Show file tree
Hide file tree
Showing 11 changed files with 255 additions and 30 deletions.
32 changes: 32 additions & 0 deletions .github/dependabot.yml
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"
66 changes: 66 additions & 0 deletions .github/workflows/_reusable_build.yml
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: 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 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
49 changes: 49 additions & 0 deletions .github/workflows/_reusable_tag.yml
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 }}
48 changes: 48 additions & 0 deletions .github/workflows/_reusable_update_version.yml
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: 11
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
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
15 changes: 15 additions & 0 deletions .github/workflows/build_pr.yml
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
14 changes: 14 additions & 0 deletions .github/workflows/merge_upstream.yml
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
/*.iml
/.idea/
.DS_Store
.project
.settings/

.flattened-pom.xml
pom.xml.versionsBackup
29 changes: 0 additions & 29 deletions Jenkinsfile

This file was deleted.

4 changes: 4 additions & 0 deletions community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage() {
echo -e " \e[4m$name\e[0m --help"
echo ""
echo -e "\e[1mDESCRIPTION\e[0m"
echo " Perform a bonita-admin-application release based on current branch."
echo " Perform a bonita-super-admin-application release based on current branch."
echo " - Change versions to <version> where needed (mostly in pom.xml)"
echo " - Create and push tag <version>"
echo ""
Expand Down

0 comments on commit 4dfc2d6

Please sign in to comment.