Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
027aa14
Migration to CIB 7 - WIP
PascalLugon Dec 12, 2024
80f364f
Updated example bpmn with TTL
PascalLugon Dec 12, 2024
ee568e2
Updated Spring Boot version and test profiles
PascalLugon Dec 12, 2024
9d9d7e3
Deactivated jgiven module for now
PascalLugon Dec 12, 2024
759ce1e
Added cibseven-hub-release-parent
PascalLugon Dec 12, 2024
73a3015
migrate to cib seven namespace and remove 8th version support
serge-krot Feb 12, 2025
a31e641
chore(docs): migrate to cib seven namespace
serge-krot Feb 12, 2025
57ec618
use org.cibseven.community namespace
serge-krot Feb 14, 2025
5527575
rename folders
serge-krot Feb 14, 2025
ce297fd
chore(pom.xml) resolve warnings: usage of versioned artifacts
serge-krot Feb 17, 2025
ba301fc
use org.camunda.community
serge-krot Feb 17, 2025
9015dec
chore(pom.xml) correct groupId:org.cibseven.community
serge-krot Feb 17, 2025
cbdc223
added jenkinsfile
serge-krot Feb 17, 2025
a1bf239
disable cron job runs
serge-krot Feb 17, 2025
9ee933b
use cibseven- prefix for package names
serge-krot Feb 17, 2025
636822e
return back build of sonar-process-test-coverage-plugin
serge-krot Feb 17, 2025
ee8b21e
use cibseven-process-test-coverage-report-generator
serge-krot Feb 18, 2025
6006948
chore(ci) with ConstantsInternal.RESOURCE_MEMORY_XLARGE
serge-krot Feb 18, 2025
c6a0306
chore(ci) with ConstantsInternal.RESOURCE_MEMORY_XLARGE
serge-krot Feb 18, 2025
f386825
chore(ci) -T4 +X
serge-krot Feb 18, 2025
94c500c
revert -T4 +X
serge-krot Feb 18, 2025
3bdef6c
disable parallel build
serge-krot Feb 18, 2025
0507626
add traces
serge-krot Feb 18, 2025
53b16e4
chore(pom) deploy javadocs only once
serge-krot Feb 18, 2025
925af92
chore: use CIB seven name
serge-krot Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 197 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
#!groovy

@Library('cib-pipeline-library@DEVOPS-146_high-resources') _

import de.cib.pipeline.library.Constants
import de.cib.pipeline.library.kubernetes.BuildPodCreator
import de.cib.pipeline.library.logging.Logger
import de.cib.pipeline.library.ConstantsInternal
import de.cib.pipeline.library.MavenProjectInformation
import groovy.transform.Field

@Field Logger log = new Logger(this)
@Field MavenProjectInformation mavenProjectInformation = null
@Field Map pipelineParams = [
pom: ConstantsInternal.DEFAULT_MAVEN_POM_PATH,
mvnContainerName: Constants.MAVEN_JDK_17_CONTAINER,
uiParamPresets: [:],
testMode: false
]

pipeline {
agent {
kubernetes {
yaml BuildPodCreator.cibStandardPod()
.withContainerFromName(pipelineParams.mvnContainerName, [memory: ConstantsInternal.RESOURCE_MEMORY_XLARGE])
.asYaml()
defaultContainer pipelineParams.mvnContainerName
}
}

// Parameter that can be changed in the Jenkins UI
parameters {
booleanParam(
name: 'INSTALL',
defaultValue: true,
description: 'Build and test'
)
booleanParam(
name: 'DEPLOY',
defaultValue: false,
description: 'Deploy artifacts to artifacts.cibseven.org'
)
password(
name: 'DEPLOY_MAVEN_CENTRAL_PASSWORD',
defaultValue: '',
description: 'Enter a password for deployment to Maven Central (no need to activate DEPLOY parameter above if you want just to deploy to Maven Central). SNAPSHOT version will not be deployed into Maven Central. If you will not change this value - you will not run deploy to Maven Central.'
)
}

options {
buildDiscarder(
logRotator(
// number of build logs to keep
numToKeepStr:'5',
// history to keep in days
daysToKeepStr: '15',
// artifacts are kept for days
artifactDaysToKeepStr: '15',
// number of builds have their artifacts kept
artifactNumToKeepStr: '5'
)
)
// Stop build after 240 minutes
timeout(time: 240, unit: 'MINUTES')
disableConcurrentBuilds()
}

stages {
stage('Print Settings & Checkout') {
steps {
script {
printSettings()

def pom = readMavenPom file: pipelineParams.pom

// for overlays often no groupId is set as the parent groupId is used
def groupId = pom.groupId
if (groupId == null) {
groupId = pom.parent.groupId
log.info "parent groupId is used"
}

mavenProjectInformation = new MavenProjectInformation(groupId, pom.artifactId, pom.version, pom.name, pom.description)

log.info "Build Project: ${mavenProjectInformation.groupId}:${mavenProjectInformation.artifactId}, ${mavenProjectInformation.name} with version ${mavenProjectInformation.version}"

// Avoid Git "dubious ownership" error in checked out repository. Needed in
// build containers with newer Git versions. Originates from Jenkins running
// pipeline as root but repository being owned by user 1000. For more, see
// https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
sh "git config --global --add safe.directory \$(pwd)"
}
}
}

stage('Maven install') {
when {
expression { params.INSTALL == true }
}
steps {
script {
withMaven(options: [junitPublisher(disabled: false), jacocoPublisher(disabled: false)]) {
sh "mvn -T4 -Dbuild.number=${BUILD_NUMBER} install"
}

junit allowEmptyResults: true, testResults: ConstantsInternal.MAVEN_TEST_RESULTS
}
}
}

stage('Deploy to artifacts.cibseven.org') {
when {
expression { params.DEPLOY == true }
}
steps {
script {
withMaven(options: []) {
sh "mvn -T4 -U -DskipTests clean deploy"
}
}
}
}

stage('Deploy to Maven Central') {
when {
allOf {
expression { params.DEPLOY_MAVEN_CENTRAL_PASSWORD.toString().isEmpty() == false } // "" is default value
expression { mavenProjectInformation.version.endsWith("-SNAPSHOT") == false }
}
}
steps {
script {
withMaven(options: []) {
sh """
mvn -T4 -U \
clean deploy \
-Psonatype-oss-release \
-Dskip.cibseven.release=false \
-DskipTests \
-Dgpg.passphrase=${params.DEPLOY_MAVEN_CENTRAL_PASSWORD}
"""
}
}
}
}
}

post {
always {
script {
log.info 'End of the build'
}
}

success {
script {
log.info '✅ Build successful'
if (params.RELEASE_BUILD == true) {
notifyResult(
office365WebhookId: pipelineParams.office365WebhookId,
message: "Application was successfully released with version ${mavenProjectInformation.version}"
)
}
}
}

unstable {
script {
log.warning '⚠️ Build unstable'
}
}

failure {
script {
log.warning '❌ Build failed'
if (env.BRANCH_NAME == 'master') {
notifyResult(
office365WebhookId: pipelineParams.office365WebhookId,
message: "Access build info at ${env.BUILD_URL}"
)
}
}
}

fixed {
script {
log.info '✅ Previous issues fixed'
if (env.BRANCH_NAME == 'master') {
notifyResult(
office365WebhookId: pipelineParams.office365WebhookId,
message: "Access build info at ${env.BUILD_URL}"
)
}
}
}
}
}
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
[![](https://img.shields.io/badge/Lifecycle-Stable-brightgreen)](https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-)
[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/camunda-community-hub/community)
[![](https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700)](https://github.com/cibseven-community-hub/community)
![Compatible with: Camunda Platform 7](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%207-26d07c)
![Compatible with: Camunda Platform 8](https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%208-26d07c)
![Supported Camunda versions](https://img.shields.io/badge/Camunda%20Version-%207.17%20to%207.20%20and%208-orange.svg)


![Camunda Logo](docs/assets/img/Favicons-Circle-Colour.png)
# CIB seven Process Test Coverage

# Camunda Process Test Coverage

This Camunda Platform 7 and Platform 8 community extension **visualises** test process **paths** and **checks** your process model **coverage** ratio. Running typical JUnit tests now leaves **html** files in your build output. Just open one and check yourself what your test did:
This CIB seven community extension **visualises** test process **paths** and **checks** your process model **coverage** ratio. Running typical JUnit tests now leaves **html** files in your build output. Just open one and check yourself what your test did:

![Coverage report](docs/assets/img/flowcov_coverage_report.png)

Expand All @@ -21,29 +16,23 @@ This Camunda Platform 7 and Platform 8 community extension **visualises** test p

## Just use it

* Integrates with all versions of Camunda Platform 7 starting with 7.17.0 and upwards as well as Camunda Platform 8
* Is continuously checked against the latest Camunda Platform 7 releases (check out our compatibility CI/CD pipeline)
* Integrates with all versions of CIB seven
* Is continuously checked against the latest CIB seven releases (check out our compatibility CI/CD pipeline)
* Tested with JDKs 11 and 17
* Works with Java starting with 1.8 and following (depending on support by version of used Camunda Platform)
* Supports **JUnit 4.13.1+** (4.11 does not work) or **JUnit 5**
* Can be used inside Spring Tests

## Documentation

If you are interested in further documentation, please check our [Documentation Page](https://camunda-community-hub.github.io/camunda-process-test-coverage/snapshot/index.html)

## Installation

Add a **Maven test dependency** to your project <a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.community.process_test_coverage/camunda-process-test-coverage-bom"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.community.process_test_coverage/camunda-process-test-coverage-bom/badge.svg" align="right" /></a>
Add a **Maven test dependency** to your project <a href="https://maven-badges.herokuapp.com/maven-central/org.cibseven.community.process_test_coverage/process-test-coverage-bom"><img src="https://maven-badges.herokuapp.com/maven-central/org.cibseven.community.process_test_coverage/process-test-coverage-bom/badge.svg" align="right" /></a>
0
### JUnit5 (Platform 7 or Platform 8)
### JUnit5

```xml
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-junit5-platform-7</artifactId>
<!-- <artifactId>camunda-process-test-coverage-junit5-platform-8</artifactId> -->
<version>${camunda-process-test-coverage.version}</version>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-junit5-platform-7</artifactId>
<version>${cibseven-process-test-coverage.version}</version>
<scope>test</scope>
</dependency>
```
Expand All @@ -54,7 +43,7 @@ Use the **ProcessCoverageInMemProcessEngineConfiguration**, e.g. in your `camund

```xml
<bean id="processEngineConfiguration"
class="org.camunda.community.process_test_coverage.engine.platform7.ProcessCoverageInMemProcessEngineConfiguration">
class="org.cibseven.community.process_test_coverage.engine.platform7.ProcessCoverageInMemProcessEngineConfiguration">
...
</bean>
```
Expand Down Expand Up @@ -112,7 +101,7 @@ but then the project has been abandoned for some time and received a full rewrit
of flowcov.io squad and BPM craftsmen from Holisticon AG. We appreciate any help and effort you put into maintenance
discussion and further development.

Please check the release notes of [individual releases](https://github.com/camunda-community-hub/camunda-process-test-coverage/releases) for the changes and involved contributors.
Please check the release notes of [individual releases](https://github.com/cibseven-community-hub/process-test-coverage/releases) for the changes and involved contributors.

## License
[Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). See [LICENSE](LICENSE.md) file.
62 changes: 21 additions & 41 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,56 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-root</artifactId>
<version>2.7.1-SNAPSHOT</version>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-root</artifactId>
<version>1.0.0</version>
</parent>

<name>Camunda Process Test Coverage BOM</name>
<artifactId>camunda-process-test-coverage-bom</artifactId>
<name>CIB seven Process Test Coverage BOM</name>
<artifactId>cibseven-process-test-coverage-bom</artifactId>
<packaging>pom</packaging>

<dependencyManagement>
<dependencies>
<!-- Own modules -->
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-core</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-engine-platform-7</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-engine-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-engine-platform-8</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-junit4-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-junit4-platform-7</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-junit5-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-junit5-platform-7</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-spring-test-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-junit5-platform-8</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-starter-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-spring-test-platform-7</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-report-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-spring-test-platform-8</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-starter-platform-7</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-starter-platform-8</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-report-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.community.process_test_coverage</groupId>
<artifactId>camunda-process-test-coverage-report-aggregator-maven-plugin</artifactId>
<groupId>org.cibseven.community.process_test_coverage</groupId>
<artifactId>cibseven-process-test-coverage-report-aggregator-maven-plugin</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
Expand Down
Binary file removed docs/assets/img/Favicons-Circle-Colour.png
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/developer-guide/contribution.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# How to Contribute

We'd love you to contribute to this project by filing bugs, helping others on the [issue tracker](https://github.com/camunda/camunda-process-test-coverage/issues), and by contributing features/bug fixes through pull requests.
We'd love you to contribute to this project by filing bugs, helping others on the [issue tracker](https://github.com/cibseven/process-test-coverage/issues), and by contributing features/bug fixes through pull requests.

Read more on [how to get the project up and running](#setting-up-the-project-locally).


## Creating Issues

Please use our [issue tracker](https://github.com/camunda/camunda-process-test-coverage/issues) for project communication.
Please use our [issue tracker](https://github.com/cibseven/cibseven-process-test-coverage/issues) for project communication.
When using the issue tracker:

* Be descriptive when creating an issue (what, where, when and how does a problem pop up)?
Expand All @@ -22,8 +22,8 @@ Create a pull request if you would like to have an in-depth discussion about som
The project is build using [Maven 3](https://maven.apache.org/) as build tool.
To build the project by yourself, go to your cmd line and enter ```mvn clean install``` on the root of the checked out project.

1. git clone https://github.com/camunda/camunda-process-test-coverage.git
2. cd camunda-process-test-coverage/
1. git clone https://github.com/cibseven/cibseven-process-test-coverage.git
2. cd cibseven-process-test-coverage/
3. mvn clean install

## Creating Pull Requests
Expand Down
Loading