Skip to content

Commit

Permalink
update to 0.0.18
Browse files Browse the repository at this point in the history
adapt tests to run on several Bonita versions
  • Loading branch information
rbioteau committed Jun 25, 2024
1 parent f6d3760 commit 73e1b5b
Show file tree
Hide file tree
Showing 151 changed files with 462 additions and 297 deletions.
50 changes: 48 additions & 2 deletions .github/workflows/workflow-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,73 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: Keeper-Security/ksm-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |
${{ vars.KEEPER_SONARCLOUD_RECORD_ID }}/field/password > env:SONAR_TOKEN
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/login > env:JFROG_USER
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/password > env:JFROG_TOKEN
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven

- uses: docker/login-action@v3
with:
registry: ${{ vars.BONITASOFT_DOCKER_REGISTRY }}
username: ${{ env.JFROG_USER }}
password: ${{ env.JFROG_TOKEN }}

- name: Build and test project
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: ./mvnw -B -ntp clean verify sonar:sonar -Dsonar.scanner.force-deprecated-java-version=true
run: ./mvnw -B -ntp verify sonar:sonar -Dsonar.scanner.force-deprecated-java-version=true -Dbonita.image=${{ vars.BONITASOFT_DOCKER_REGISTRY }}/${{ vars.DOCKER_SNAPSHOTS_REPOSITORY }}/bonita-community:10.2-SNAPSHOT

test-supported-versions:
runs-on: ubuntu-22.04
strategy:
matrix:
bonita-version:
- '7.15.0'
- '8.0.0'
- '9.0.0'
- '10.0.0'
- '10.1.0'
steps:
- uses: actions/checkout@v4
- uses: Keeper-Security/ksm-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/login > env:JFROG_USER
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/password > env:JFROG_TOKEN
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven

- uses: docker/login-action@v3
with:
registry: ${{ vars.BONITASOFT_DOCKER_REGISTRY }}
username: ${{ env.JFROG_USER }}
password: ${{ env.JFROG_TOKEN }}

- name: ${{ matrix.bonita-version }} Integration tests
run: ./mvnw -B -ntp verify -Dbonita.image=${{ vars.BONITASOFT_DOCKER_REGISTRY }}/${{ vars.INTERNAL_DOCKER_REPOSITORY_RELEASE }}/bonita-community:${{ matrix.bonita-version }}
47 changes: 45 additions & 2 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/field/login > env:GPG_KEYNAME
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/custom_field/gpg-private-key > env:GPG_PRIVATE_KEY
${{ vars.KEEPER_GPG_ARTIFACT_SIGNING_RECORD_ID }}/field/password > env:MAVEN_GPG_PASSPHRASE
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/login > env:JFROG_USER
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/password > env:JFROG_TOKEN
- name: Setup Java
uses: actions/setup-java@v4
Expand All @@ -34,11 +36,52 @@ jobs:
gpg-private-key: ${{ env.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- uses: docker/login-action@v3
with:
registry: ${{ vars.BONITASOFT_DOCKER_REGISTRY }}
username: ${{ env.JFROG_USER }}
password: ${{ env.JFROG_TOKEN }}

- name: Compile and test project
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
run: ./mvnw -B -ntp clean verify sonar:sonar -Dsonar.scanner.force-deprecated-java-version=true
run: ./mvnw -B -ntp clean verify sonar:sonar -Dsonar.scanner.force-deprecated-java-version=true -Dbonita.image=${{ vars.BONITASOFT_DOCKER_REGISTRY }}/${{ vars.DOCKER_SNAPSHOTS_REPOSITORY }}/bonita-community:10.2-SNAPSHOT

# Build and Push snapshots to maven central
- name: Deploy snapshots to Maven central
run: ./mvnw -B -ntp deploy -DskipTests=true -Pdeploy
run: ./mvnw -B -ntp deploy -DskipTests=true -Pdeploy

test-supported-versions:
runs-on: ubuntu-22.04
strategy:
matrix:
bonita-version:
- '7.15.0'
- '8.0.0'
- '9.0.0'
- '10.0.0'
- '10.1.0'
steps:
- uses: actions/checkout@v4
- uses: Keeper-Security/ksm-action@v1
with:
keeper-secret-config: ${{ secrets.KSM_CONFIG }}
secrets: |
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/login > env:JFROG_USER
${{ vars.KEEPER_JFROG_RECORD_ID }}/field/password > env:JFROG_TOKEN
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven

- uses: docker/login-action@v3
with:
registry: ${{ vars.BONITASOFT_DOCKER_REGISTRY }}
username: ${{ env.JFROG_USER }}
password: ${{ env.JFROG_TOKEN }}

- name: ${{ matrix.bonita-version }} Integration tests
run: ./mvnw -B -ntp verify -Dbonita.image=${{ vars.BONITASOFT_DOCKER_REGISTRY }}/${{ vars.INTERNAL_DOCKER_REPOSITORY_RELEASE }}/bonita-community:${{ matrix.bonita-version }}
2 changes: 1 addition & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ src/main/java/org/bonitasoft/web/client/model/Actor.java
src/main/java/org/bonitasoft/web/client/model/ActorDefinition.java
src/main/java/org/bonitasoft/web/client/model/ActorMember.java
src/main/java/org/bonitasoft/web/client/model/ActorUpdateRequest.java
src/main/java/org/bonitasoft/web/client/model/AdvancedApplication.java
src/main/java/org/bonitasoft/web/client/model/ApiResponse.java
src/main/java/org/bonitasoft/web/client/model/Application.java
src/main/java/org/bonitasoft/web/client/model/ApplicationLink.java
src/main/java/org/bonitasoft/web/client/model/ApplicationMenu.java
src/main/java/org/bonitasoft/web/client/model/ApplicationMenuCreateRequest.java
src/main/java/org/bonitasoft/web/client/model/ApplicationMenuUpdateRequest.java
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/openapi.yaml-default.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7acaf2a5a528f57245f64b15d11d38f5fe4eb6813620bd399efc2a5601002531
25eaf10608f1031bd1ec198e8d19cd85333e570352112f68ec7db4890e59da55
50 changes: 25 additions & 25 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ info:
name: GPL-v2.0
url: http://www.gnu.org/licenses/gpl-2.0.txt
title: Bonita API
version: 0.0.17
version: 0.0.18
x-logo:
url: images/bonitasoft-logo.svg
backgroundColor: '#19465f'
Expand Down Expand Up @@ -523,9 +523,9 @@ paths:
description: |
Finds living applications with pagination params and filters

- can order on `id`,`creationDate`, `createdBy`, `profileId`, `token`, `displayName`, `updatedBy`, `lastUpdateDate`, `version`, `advanced`
- can search on `token`, `displayName`, `version`, `advanced`
- can filter on `token`, `displayName`, `version`, `advanced`, `profileId`, `creationDate`, `createdBy`, `updatedBy` , `lastUpdateDate`, `userId`
- can order on `id`,`creationDate`, `createdBy`, `profileId`, `token`, `displayName`, `updatedBy`, `lastUpdateDate`, `version`, `link`
- can search on `token`, `displayName`, `version`, `link`
- can filter on `token`, `displayName`, `version`, `link`, `profileId`, `creationDate`, `createdBy`, `updatedBy` , `lastUpdateDate`, `userId`
operationId: searchApplications
parameters:
- description: index of the page to display
Expand Down Expand Up @@ -593,22 +593,22 @@ paths:
application/json:
example:
- id: "306"
advanced: true
link: "true"
creationDate: "1411548289900"
icon: ""
createdBy": "1"
profileId: "2"
description: My advanced application description
description: My application link description
token: myadvapp
state: ACTIVATED
displayName: My advanced app
displayName: My app link
updatedBy: "1"
visibility: ALL
editable: true
editable: "true"
lastUpdateDate: "1411548289900"
version: "1.0"
- id: "305"
advanced: false
link: "false"
creationDate: "1411548289900"
icon: ""
createdBy": "1"
Expand All @@ -619,7 +619,7 @@ paths:
displayName: My app
updatedBy: "1"
visibility: ALL
editable: true
editable: "true"
lastUpdateDate: "1411548289900"
version: "1.0"
homePageId: "26"
Expand Down Expand Up @@ -17310,38 +17310,39 @@ components:
description: Indicates whether the application can be modified
type: boolean
type: object
AdvancedApplication:
ApplicationLink:
allOf:
- properties:
advanced:
description: true for an advanced application
link:
description: true for an application link
type: boolean
type: object
- $ref: '#/components/schemas/AbstractApplication'
- description: Contains the meta information of an advanced Bonita Living Application.
- description: Contains the meta information of a Bonita Living Application
Link.
type: object
description: Contains the meta information of an advanced Bonita Living Application.
description: Contains the meta information of a Bonita Living Application Link.
example:
id: "306"
advanced: true
link: "true"
creationDate: "1411548289900"
icon: ""
createdBy": "1"
profileId: "2"
description: My advanced application description
description: My application link description
token: myadvapp
state: ACTIVATED
displayName: My advanced app
displayName: My app link
updatedBy: "1"
visibility: ALL
editable: true
editable: "true"
lastUpdateDate: "1411548289900"
version: "1.0"
title: Advanced application
title: Application Link
LegacyApplication:
allOf:
- properties:
advanced:
link:
description: false for a legacy application
type: boolean
type: object
Expand All @@ -17367,7 +17368,7 @@ components:
description: Contains the meta information of a legacy Bonita Living Application.
example:
id: "305"
advanced: false
link: "false"
creationDate: "1411548289900"
icon: ""
createdBy": "1"
Expand All @@ -17378,7 +17379,7 @@ components:
displayName: My app
updatedBy: "1"
visibility: ALL
editable: true
editable: "true"
lastUpdateDate: "1411548289900"
version: "1.0"
homePageId: "26"
Expand All @@ -17387,9 +17388,8 @@ components:
title: Legacy application
Application:
oneOf:
- $ref: '#/components/schemas/AdvancedApplication'
- $ref: '#/components/schemas/ApplicationLink'
- $ref: '#/components/schemas/LegacyApplication'
x-one-of-name: Application
CreateApplicationRequest:
example:
version: "1.0"
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Bonita -->
<bonita-openapi.version>0.0.17</bonita-openapi.version>
<bonita-openapi.version>0.0.18</bonita-openapi.version>
<swagger-annotations.version>1.6.14</swagger-annotations.version>
<jakarta-annotation.version>3.0.0</jakarta-annotation.version>
<jsr305.version>3.0.2</jsr305.version>
Expand All @@ -66,6 +66,7 @@
<logback-classic.version>1.5.6</logback-classic.version>
<testcontainers.version>1.19.8</testcontainers.version>
<awaitility.version>4.2.1</awaitility.version>
<semver4j.version>3.1.0</semver4j.version>
<!-- Maven plugins -->
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven.compiler.release>${java.version}</maven.compiler.release>
Expand Down Expand Up @@ -94,6 +95,11 @@
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
Expand Down Expand Up @@ -254,6 +260,11 @@
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vdurmont</groupId>
<artifactId>semver4j</artifactId>
<version>${semver4j.version}</version>
</dependency>
</dependencies>
<build>
<defaultGoal>package</defaultGoal>
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/org/bonitasoft/web/client/api/ApplicationApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ ApiResponse<Void> importApplicationWithHttpInfo(@Param("applicationsDataUpload")
/**
* Finds living applications
* Finds living applications with pagination params and filters - can order on &#x60;id&#x60;,&#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;,
* &#x60;advanced&#x60; - can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60; - can filter on &#x60;token&#x60;,
* &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;updatedBy&#x60; , &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;, &#x60;link&#x60; -
* can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;link&#x60; - can filter on &#x60;token&#x60;, &#x60;displayName&#x60;,
* &#x60;version&#x60;, &#x60;link&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60; ,
* &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
*
* @param p index of the page to display (required)
* @param c maximum number of elements to retrieve (required)
Expand All @@ -179,10 +179,10 @@ List<Application> searchApplications(@Param("p") Integer p, @Param("c") Integer
* Finds living applications
* Similar to <code>searchApplications</code> but it also returns the http response headers .
* Finds living applications with pagination params and filters - can order on &#x60;id&#x60;,&#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;,
* &#x60;advanced&#x60; - can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60; - can filter on &#x60;token&#x60;,
* &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;updatedBy&#x60; , &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;, &#x60;link&#x60; -
* can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;link&#x60; - can filter on &#x60;token&#x60;, &#x60;displayName&#x60;,
* &#x60;version&#x60;, &#x60;link&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60; ,
* &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
*
* @param p index of the page to display (required)
* @param c maximum number of elements to retrieve (required)
Expand All @@ -201,10 +201,10 @@ ApiResponse<List<Application>> searchApplicationsWithHttpInfo(@Param("p") Intege
/**
* Finds living applications
* Finds living applications with pagination params and filters - can order on &#x60;id&#x60;,&#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;,
* &#x60;advanced&#x60; - can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60; - can filter on &#x60;token&#x60;,
* &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;updatedBy&#x60; , &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;, &#x60;link&#x60; -
* can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;link&#x60; - can filter on &#x60;token&#x60;, &#x60;displayName&#x60;,
* &#x60;version&#x60;, &#x60;link&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60; ,
* &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* Note, this is equivalent to the other <code>searchApplications</code> method,
* but with the query parameters collected into a single Map parameter. This
* is convenient for services with optional query parameters, especially when
Expand Down Expand Up @@ -232,10 +232,10 @@ ApiResponse<List<Application>> searchApplicationsWithHttpInfo(@Param("p") Intege
/**
* Finds living applications
* Finds living applications with pagination params and filters - can order on &#x60;id&#x60;,&#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;,
* &#x60;advanced&#x60; - can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60; - can filter on &#x60;token&#x60;,
* &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;advanced&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;,
* &#x60;updatedBy&#x60; , &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* &#x60;profileId&#x60;, &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;updatedBy&#x60;, &#x60;lastUpdateDate&#x60;, &#x60;version&#x60;, &#x60;link&#x60; -
* can search on &#x60;token&#x60;, &#x60;displayName&#x60;, &#x60;version&#x60;, &#x60;link&#x60; - can filter on &#x60;token&#x60;, &#x60;displayName&#x60;,
* &#x60;version&#x60;, &#x60;link&#x60;, &#x60;profileId&#x60;, &#x60;creationDate&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60; ,
* &#x60;lastUpdateDate&#x60;, &#x60;userId&#x60;
* Note, this is equivalent to the other <code>searchApplications</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
*
Expand Down
Loading

0 comments on commit 73e1b5b

Please sign in to comment.