Skip to content

Commit

Permalink
Merge branch 'kiegroup:main' into KOGITO-5921-support-for-oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
Scuilion authored Sep 23, 2021
2 parents 28b070d + 568bd01 commit 4a3acfe
Show file tree
Hide file tree
Showing 281 changed files with 5,658 additions and 1,176 deletions.
48 changes: 22 additions & 26 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.kie.jenkins.jobdsl.templates.KogitoJobTemplate
import org.kie.jenkins.jobdsl.KogitoConstants
import org.kie.jenkins.jobdsl.FolderUtils
import org.kie.jenkins.jobdsl.Utils
import org.kie.jenkins.jobdsl.KogitoJobType

Expand Down Expand Up @@ -49,16 +49,12 @@ Map getMultijobPRConfig() {
]
}

def bddRuntimesPrFolder = "${KogitoConstants.KOGITO_DSL_PULLREQUEST_FOLDER}/${KogitoConstants.KOGITO_DSL_RUNTIMES_BDD_FOLDER}"
def nightlyBranchFolder = "${KogitoConstants.KOGITO_DSL_NIGHTLY_FOLDER}/${JOB_BRANCH_FOLDER}"
def releaseBranchFolder = "${KogitoConstants.KOGITO_DSL_RELEASE_FOLDER}/${JOB_BRANCH_FOLDER}"

if (Utils.isMainBranch(this)) {
setupDeployJob(bddRuntimesPrFolder, KogitoJobType.PR)
setupDeployJob(FolderUtils.getPullRequestRuntimesBDDFolder(this), KogitoJobType.PR)

// Sonarcloud analysis only on main branch
// As we have only Community edition
setupSonarCloudJob(nightlyBranchFolder)
setupSonarCloudJob()
}

// PR checks
Expand All @@ -68,23 +64,23 @@ setupMultijobPrLTSChecks()

// Nightly jobs
if (Utils.isMainBranch(this)) {
setupDroolsJob(nightlyBranchFolder)
setupDroolsJob()

setupQuarkusJob(nightlyBranchFolder, 'main')
setupQuarkusJob('main')
}
setupNativeJob(nightlyBranchFolder)
setupDeployJob(nightlyBranchFolder, KogitoJobType.NIGHTLY)
setupPromoteJob(nightlyBranchFolder, KogitoJobType.NIGHTLY)
setupNativeJob()
setupDeployJob(FolderUtils.getNightlyFolder(this), KogitoJobType.NIGHTLY)
setupPromoteJob(FolderUtils.getNightlyFolder(this), KogitoJobType.NIGHTLY)

// No release directly on main branch
if (!Utils.isMainBranch(this)) {
setupDeployJob(releaseBranchFolder, KogitoJobType.RELEASE)
setupPromoteJob(releaseBranchFolder, KogitoJobType.RELEASE)
setupDeployJob(FolderUtils.getReleaseFolder(this), KogitoJobType.RELEASE)
setupPromoteJob(FolderUtils.getReleaseFolder(this), KogitoJobType.RELEASE)
}

if (Utils.isLTSBranch(this)) {
setupQuarkusJob(nightlyBranchFolder, Utils.getQuarkusLTSVersion(this))
setupNativeLTSJob(nightlyBranchFolder)
setupQuarkusJob(Utils.getQuarkusLTSVersion(this))
setupNativeLTSJob()
}
/////////////////////////////////////////////////////////////////
// Methods
Expand All @@ -102,8 +98,8 @@ void setupMultijobPrLTSChecks() {
KogitoJobTemplate.createMultijobLTSPRJobs(this, getMultijobPRConfig()) { return getDefaultJobParams() }
}

void setupDroolsJob(String jobFolder) {
def jobParams = getJobParams('kogito-drools-snapshot', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.drools", 'Kogito Runtimes Drools Snapshot')
void setupDroolsJob() {
def jobParams = getJobParams('kogito-drools-snapshot', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.drools", 'Kogito Runtimes Drools Snapshot')
jobParams.triggers = [ cron : 'H 2 * * *' ]
KogitoJobTemplate.createPipelineJob(this, jobParams).with {
parameters {
Expand All @@ -119,8 +115,8 @@ void setupDroolsJob(String jobFolder) {
}
}

void setupQuarkusJob(String jobFolder, String quarkusBranch) {
def jobParams = getJobParams("kogito-quarkus-${quarkusBranch}", jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.quarkus", 'Kogito Runtimes Quarkus Snapshot')
void setupQuarkusJob(String quarkusBranch) {
def jobParams = getJobParams("kogito-quarkus-${quarkusBranch}", FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.quarkus", 'Kogito Runtimes Quarkus Snapshot')
jobParams.triggers = [ cron : 'H 4 * * *' ]
KogitoJobTemplate.createPipelineJob(this, jobParams).with {
parameters {
Expand All @@ -134,8 +130,8 @@ void setupQuarkusJob(String jobFolder, String quarkusBranch) {
}
}

void setupSonarCloudJob(String jobFolder) {
def jobParams = getJobParams('kogito-runtimes-sonarcloud', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.sonarcloud", 'Kogito Runtimes Daily Sonar')
void setupSonarCloudJob() {
def jobParams = getJobParams('kogito-runtimes-sonarcloud', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.sonarcloud", 'Kogito Runtimes Daily Sonar')
jobParams.triggers = [ cron : 'H 20 * * 1-5' ]
KogitoJobTemplate.createPipelineJob(this, jobParams).with {
parameters {
Expand All @@ -148,8 +144,8 @@ void setupSonarCloudJob(String jobFolder) {
}
}

void setupNativeJob(String jobFolder) {
def jobParams = getJobParams('kogito-runtimes-native', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native Testing')
void setupNativeJob() {
def jobParams = getJobParams('kogito-runtimes-native', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native Testing')
jobParams.triggers = [ cron : 'H 6 * * *' ]
KogitoJobTemplate.createPipelineJob(this, jobParams).with {
parameters {
Expand All @@ -163,8 +159,8 @@ void setupNativeJob(String jobFolder) {
}
}

void setupNativeLTSJob(String jobFolder) {
def jobParams = getJobParams('kogito-runtimes-native-lts', jobFolder, "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native LTS Testing')
void setupNativeLTSJob() {
def jobParams = getJobParams('kogito-runtimes-native-lts', FolderUtils.getNightlyFolder(this), "${JENKINSFILE_PATH}/Jenkinsfile.native", 'Kogito Runtimes Native LTS Testing')
jobParams.triggers = [ cron : 'H 8 * * *' ]
KogitoJobTemplate.createPipelineJob(this, jobParams).with {
parameters {
Expand Down
7 changes: 1 addition & 6 deletions addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ The following table lists all the add-ons, independent of runtime implementation

| Add-On Description | Artifact ID | Since |
|------------------------|--------------------------------------|---------------------|
| Persistence FileSystem | kogito-addons-persistence-filesystem | 0.10.0 |
| Persistence Infinispan | kogito-addons-persistence-infinispan | 0.3.0 |
| Persistence JDBC | kogito-addons-persistence-jdbc | 1.8.0 |
| Persistence MongoDB | kogito-addons-persistence-mongodb | 0.15.0 |
| Persistence Postgresql | kogito-addons-persistence-postgresql | 1.6.0 |
| Human Task Predictions | kogito-addons-human-task-prediction-api | 0.7.0 |

### Quarkus Implementation
Expand Down Expand Up @@ -93,7 +88,7 @@ In this case, you will have to create a new capability from the scratch. To do t
knowledge of the Kogito engine internals. Then follow these steps:

1. Create a new sub-module under `common` with a meaningful name. This module can be a parent module if you foresee a
complex scenario for your new add-on. See [`cloudevents`](common/cloudevents) as an example.
complex scenario for your new add-on. See [`messaging`](common/messaging) as an example.
2. Do not use any dependencies from Quarkus or Spring Boot in `common` module. Your add-on must only have code to support
your capability. New dependencies must be added to the [kogito-build](../kogito-build/kogito-build-parent) BOM.
3. Create the same capability under the `addons` module in the runtime module you wish to add support (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void testFindByIdReadMode(MongoDBTransactionManager transactionManager) {
mutablePi.start();
assertThat(mutablePi.status()).isEqualTo(STATE_ERROR);
assertThat(mutablePi.error()).hasValueSatisfying(error -> {
assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null");
assertThat(error.errorMessage()).contains("java.lang.NullPointerException");
assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1");
});
assertThat(mutablePi.variables().toMap()).containsExactly(entry("var", "value"));
Expand All @@ -230,7 +230,7 @@ void testFindByIdReadMode(MongoDBTransactionManager transactionManager) {
ProcessInstance<BpmnVariables> readOnlyPi = instances.findById(mutablePi.id(), ProcessInstanceReadMode.READ_ONLY).get();
assertThat(readOnlyPi.status()).isEqualTo(STATE_ERROR);
assertThat(readOnlyPi.error()).hasValueSatisfying(error -> {
assertThat(error.errorMessage()).endsWith("java.lang.NullPointerException - null");
assertThat(error.errorMessage()).contains("java.lang.NullPointerException");
assertThat(error.failedNodeId()).isEqualTo("ScriptTask_1");
});
assertThat(readOnlyPi.variables().toMap()).containsExactly(entry("var", "value"));
Expand Down
Loading

0 comments on commit 4a3acfe

Please sign in to comment.