Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/upgrade to camunda 7 20 #60

Merged
merged 5 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions .github/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
sections:
- title: ":rocket: Enhancements & Features"
labels: [ "Type: enhancement", "Type: documentation", "Type: example" ]
- title: ":bug: Bug Fixes"
labels: [ "Type: bug" ]
- title: ":hammer_and_wrench: Chore"
labels: [ "Type: dependencies" ]
issues:
exclude:
labels: [ "Type: Incorrect Repository", "Type: question" ]
contributors:
exclude:
names: [ "dependabot[bot]", "codacy-badger" ]
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Java setup
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: zulu
cache: maven
- name: Run Maven
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- name: Set up Java environment
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
java-version: 17
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }}
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE
Expand All @@ -36,6 +36,7 @@ jobs:
maven-psw: ${{ secrets.MAVEN_CENTRAL_DEPLOYMENT_PSW }}
maven-url: oss.sonatype.org
maven-gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}
maven-auto-release-after-close: true
github-token: ${{ secrets.GITHUB_TOKEN }}
id: release

Expand Down
90 changes: 90 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build the docs

on:
push:
branches:
- master
tags:
- '*'
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip

- name: Get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('./docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: python3 -m pip install -r ./docs/requirements.txt

- name: Set git username and email
run: |
#
git config --global user.email "${GH_USERNAME}@users.noreply.github.com"
git config --global user.name "${GH_USERNAME}"
env:
GH_USERNAME: ${{ github.actor }}

- name: Pre-fetch the gh-pages branch
run: git fetch

- name: Build docs with MkDocs
run: mkdocs build

- name: Read the tag name
id: get_tag_name
if: startsWith(github.ref, 'refs/tags/')
run: echo "TAG_NAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

# This is for a tagged version
- name: Create a new version of documentation and push to GH pages.
if: startsWith(github.ref, 'refs/tags/')
run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable -u --push --rebase

- name: Make stable to default.
if: startsWith(github.ref, 'refs/tags/')
run: mike set-default stable --push --rebase

# This is for master branch
- name: Deploy latest develop snapshot docs to GH pages.
if: github.ref == 'refs/heads/master'
run: mike deploy snapshot -u --push --rebase

# This is for release close
- name: Get the release version
if: github.event.release
run: |
VERSION=$(echo ${{ github.event.release.name }} | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Create a new version of documentation and push to GH pages.
if: github.event.release
run: mike deploy ${{ env.VERSION }} stable -u --push --rebase

- name: Make stable to default.
if: github.event.release
run: mike set-default stable --push --rebase
35 changes: 35 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Trigger the workflow on milestone events
name: Milestone Closure

on:
milestone:
types: [closed]

jobs:
create-release-notes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release Notes Markdown
uses: docker://decathlon/release-notes-generator-action:3.1.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
OUTPUT_FOLDER: temp_release_notes
USE_MILESTONE_TITLE: "true"
- name: Get the name of the created Release Notes file and extract Version
run: |
RELEASE_NOTES_FILE=$(ls temp_release_notes/*.md | head -n 1)
echo "RELEASE_NOTES_FILE=$RELEASE_NOTES_FILE" >> $GITHUB_ENV
VERSION=$(echo ${{ github.event.milestone.title }} | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create a Draft Release Notes on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
body_path: ${{ env.RELEASE_NOTES_FILE }}
draft: true
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

20 changes: 18 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
10 changes: 8 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
,====
// camunda batches
image::https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700[link="https://github.com/camunda-community-hub/community"]
image::https://img.shields.io/badge/Camunda%20Version-7.20-orange.svg[link="https://docs.camunda.org/manual/7.20/"]
image::https://img.shields.io/badge/Lifecycle-Stable-brightgreen[link="https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-"]
image::https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%207-26d07c["Compatible with: Camunda Platform 7"]
// github actions batch
Expand Down Expand Up @@ -38,14 +39,14 @@ Maven Users:
<dependency>
<groupId>org.camunda.community.batch</groupId>
<artifactId>camunda-platform-7-custom-batch-core</artifactId>
<version>1.19.4</version>
<version>1.20.0</version>
</dependency>
```

Gradle Users:

```kotlin
compile("org.camunda.community.batch:camunda-platform-7-custom-batch-core:1.19.4")
compile("org.camunda.community.batch:camunda-platform-7-custom-batch-core:1.20.0")
```

First you have to define an own job handler for working on the single batch data:
Expand Down Expand Up @@ -100,6 +101,11 @@ The seed and monitor jobs receive the same priority as the batch.

## Versions

### 1.20.0

* BREAKING CHANGE: Update to use latest camunda version (7.20) + Spring Boot 3


### 1.19.4

* Update to use latest camunda version (7.19)
Expand Down
19 changes: 4 additions & 15 deletions examples/example-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<packaging>war</packaging>

<properties>
<spring.version>5.3.23</spring.version>
<javax.servlet-api.version>3.0.1</javax.servlet-api.version>
<spring.version>6.0.9</spring.version>
</properties>

<dependencies>
Expand All @@ -36,13 +35,6 @@
<version>${camunda.version}</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet-api.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
Expand Down Expand Up @@ -76,12 +68,9 @@
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
Expand Down
4 changes: 2 additions & 2 deletions extension/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ By default, the batch will create 100 jobs, where each job will work on one proc
After this, it will create another 100 jobs and so on, until the work on all instances is finished.
Benefit of this is that the migration will not block anything and that there is not just one big transaction.

Additionally, the cockpit already provides a view to monitor batches. (_https://docs.camunda.org/manual/7.19/webapps/cockpit/batch/monitoring/[See also]_)
Additionally, the cockpit already provides a view to monitor batches. (_https://docs.camunda.org/manual/7.20/webapps/cockpit/batch/monitoring/[See also]_)

For more information regarding Camunda Batch, visit also Camunda's user guide: _https://docs.camunda.org/manual/7.19/user-guide/process-engine/batch/[User Guide]_
For more information regarding Camunda Batch, visit also Camunda's user guide: _https://docs.camunda.org/manual/7.20/user-guide/process-engine/batch/[User Guide]_

## Why This Extension?

Expand Down
Loading