From 9fb2e65a013d377c47c90427e5d73b83c5a0937d Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Fri, 27 Dec 2024 11:52:58 +0100 Subject: [PATCH 01/53] replace circleci config with gha config --- .circleci/config.yml | 145 ----------------------------------- .github/workflows/deploy.yml | 82 ++++++++++++++++++++ 2 files changed, 82 insertions(+), 145 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index efbb62f..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,145 +0,0 @@ -version: 2 - -aliases: - - &sonar-scan - name: Sonar scan - command: | - mvn -Psonar -s .circleci/settings.xml \ - sonar:sonar \ - -Dsonar.projectKey=entur_${CIRCLE_PROJECT_REPONAME} \ - -Dsonar.organization=${SONAR_ORG} \ - -Dsonar.projectName=${CIRCLE_PROJECT_REPONAME} \ - -Dsonar.host.url=https://sonarcloud.io \ - -Dsonar.login=${ENTUR_SONAR_PASSWORD} - - &jfrog-login - name: Rename jfrog environment variable for maven setting.xml - command: | - echo "export JFROG_USER=$ARTIFACTORY_USER" >> $BASH_ENV - echo "export JFROG_PASS=$ARTIFACTORY_PASSWORD" >> $BASH_ENV - - &install-xmlstarlet - name: Install xmlstarlet - command: | - sudo rm -rf /var/lib/apt/lists/* - sudo apt-get update - sudo apt-get -y install xmlstarlet - -jobs: - test: - docker: - - image: cimg/openjdk:11.0.22 - environment: - MAVEN_OPTS: -Xmx3G - steps: - - checkout - - restore_cache: - keys: - - dep-cache-{{ checksum "pom.xml" }} - # fallback to the most recent cache if there is no exact match for this pom.xml - - dep-cache- - - run: *install-xmlstarlet - - run: - name: Download Maven settings - command: wget https://raw.githubusercontent.com/entur/circleci-toolbox-image-java11/master/tools/m2/settings.xml -O .circleci/settings.xml - - run: *jfrog-login - - run: - name: Refresh cache - command: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.0:go-offline -s .circleci/settings.xml - - save_cache: - paths: - - ~/.m2 - key: dep-cache-{{ checksum "pom.xml" }} - # Cannot use -o because of snapshot dependencies. - - run: - name: Run Maven verify - command: mvn verify -s .circleci/settings.xml - - run: - name: Save test results - command: | - mkdir -p ~/junit/ - find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \; - when: always - - store_test_results: - path: ~/junit - - store_artifacts: - path: ~/junit - - persist_to_workspace: - root: ~/project - paths: - - target - - .circleci - - sonar: - docker: - - image: cimg/openjdk:17.0.11 - environment: - MAVEN_OPTS: -Xmx3G - steps: - - checkout - - restore_cache: - key: dep-cache-{{ checksum "pom.xml" }} - - attach_workspace: - at: ~/project - - run: *jfrog-login - - run: *sonar-scan - - build: - docker: - - image: cimg/openjdk:11.0.22 - environment: - MAVEN_OPTS: -Xmx3G - steps: - - checkout - - restore_cache: - key: dep-cache-{{ checksum "pom.xml" }} - - run: *install-xmlstarlet - - run: *jfrog-login - - run: - name: Download Maven settings - command: wget https://raw.githubusercontent.com/entur/circleci-toolbox-image-java11/master/tools/m2/settings.xml -O .circleci/settings.xml - - run: - name: Refresh cache - command: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.0:go-offline -s .circleci/settings.xml - - save_cache: - paths: - - ~/.m2 - key: dep-cache-{{ checksum "pom.xml" }} - - run: - name: Run Maven package - command: mvn package -s .circleci/settings.xml -DskipTests - - deploy: - docker: - - image: cimg/openjdk:11.0.22 - steps: - - checkout - - restore_cache: - key: dep-cache-{{ checksum "pom.xml" }} - - attach_workspace: - at: ~/project - - run: *install-xmlstarlet - - run: *jfrog-login - - run: - name: Run Maven deploy - command: mvn deploy -s .circleci/settings.xml -DskipTests - -workflows: - version: 2 - build_test_deploy: - jobs: - - test: - context: global - - sonar: - context: global - requires: - - test - - build: - context: global - requires: - - sonar - - deploy: - context: global - requires: - - build - filters: - branches: - only: master diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..ff755c1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,82 @@ +name: Build and Deploy +on: + push: + branches: + - master + pull_request: + branches: + - master +env: + JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }} + JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} +jobs: + maven-verify: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Copy maven settings + run: | + wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml + - uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: liberica + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + ${{ runner.os }}- + + - name: Run maven build + run: mvn verify -s .github/workflows/settings.xml + - name: Sonar Scan + env: + SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} + SONAR_PROJECT_NAME: ${{ github.event.repository.name }} + SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} + run: | + mvn -Psonar -s .github/workflows/settings.xml \ + sonar:sonar \ + -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ + -Dsonar.organization=enturas-github \ + -Dsonar.projectName=${SONAR_PROJECT_NAME} \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.token=${SONAR_TOKEN} + - name: Upload artifact + uses: actions/upload-artifact@v4.4.3 + with: + path: target/*.jar + deploy: + if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: [maven-verify] + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Copy maven settings + run: | + wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml + - uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: liberica + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + ${{ runner.os }}- + + - name: Release to Entur JFrog + run: mvn deploy -s .github/workflows/settings.xml -DskipTests + From a13344abdadb008d98adf5a4151bf7078e676738 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Fri, 27 Dec 2024 12:03:00 +0100 Subject: [PATCH 02/53] update workflow add xmlstartlet --- .github/workflows/deploy.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ff755c1..d05d3bd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,6 +33,13 @@ jobs: ${{ runner.os }}-maven- ${{ runner.os }}- + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + + - name: Run maven build - name: Run maven build run: mvn verify -s .github/workflows/settings.xml - name: Sonar Scan @@ -77,6 +84,12 @@ jobs: ${{ runner.os }}-maven- ${{ runner.os }}- + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + - name: Release to Entur JFrog run: mvn deploy -s .github/workflows/settings.xml -DskipTests From d8e453ce3a4429cd5aefdc5aea7cac7fd28b75de Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Fri, 27 Dec 2024 12:13:16 +0100 Subject: [PATCH 03/53] update workflow add xmlstartlet --- .github/workflows/deploy.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d05d3bd..864803d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,11 +35,8 @@ jobs: - name: Install xmlstarlet run: | - sudo rm -rf /var/lib/apt/lists/* sudo apt-get update - sudo apt-get -y install xmlstarlet - - - name: Run maven build + sudo apt-get install xmlstarlet - name: Run maven build run: mvn verify -s .github/workflows/settings.xml - name: Sonar Scan @@ -86,9 +83,8 @@ jobs: - name: Install xmlstarlet run: | - sudo rm -rf /var/lib/apt/lists/* sudo apt-get update - sudo apt-get -y install xmlstarlet + sudo apt-get install xmlstarlet - name: Release to Entur JFrog run: mvn deploy -s .github/workflows/settings.xml -DskipTests From 008579e87305c64d7165110b02a6812976ab870f Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Mon, 19 Jan 2026 12:19:06 +0100 Subject: [PATCH 04/53] update workflow to use jrealser to release to maven central --- .github/workflows/deploy.yml | 61 ++-------- .github/workflows/hotfix-finish.yml | 29 +++++ .github/workflows/hotfix-manual.yml | 24 ++++ .github/workflows/hotfix-start.yml | 20 ++++ .github/workflows/release-finish.yml | 38 ++++++ .github/workflows/release-manual.yml | 24 ++++ .github/workflows/release-start.yml | 21 ++++ pom.xml | 172 +++++++++++++-------------- 8 files changed, 250 insertions(+), 139 deletions(-) create mode 100644 .github/workflows/hotfix-finish.yml create mode 100644 .github/workflows/hotfix-manual.yml create mode 100644 .github/workflows/hotfix-start.yml create mode 100644 .github/workflows/release-finish.yml create mode 100644 .github/workflows/release-manual.yml create mode 100644 .github/workflows/release-start.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 864803d..791e1c9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,59 +33,22 @@ jobs: ${{ runner.os }}-maven- ${{ runner.os }}- - - name: Install xmlstarlet - run: | - sudo apt-get update - sudo apt-get install xmlstarlet - name: Run maven build run: mvn verify -s .github/workflows/settings.xml - - name: Sonar Scan - env: - SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} - SONAR_PROJECT_NAME: ${{ github.event.repository.name }} - SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} - run: | - mvn -Psonar -s .github/workflows/settings.xml \ - sonar:sonar \ - -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ - -Dsonar.organization=enturas-github \ - -Dsonar.projectName=${SONAR_PROJECT_NAME} \ - -Dsonar.host.url=https://sonarcloud.io \ - -Dsonar.token=${SONAR_TOKEN} - name: Upload artifact uses: actions/upload-artifact@v4.4.3 with: + name: build-artifacts path: target/*.jar - deploy: - if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master' - needs: [maven-verify] - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Copy maven settings - run: | - wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml - - uses: actions/setup-java@v4 - with: - java-version: 11 - distribution: liberica - - name: Cache Maven dependencies - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - ${{ runner.os }}-maven- - ${{ runner.os }}- - - - name: Install xmlstarlet - run: | - sudo apt-get update - sudo apt-get install xmlstarlet - - - name: Release to Entur JFrog - run: mvn deploy -s .github/workflows/settings.xml -DskipTests + publish-snapshot: + name: Publish snapshot to Maven Central + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: maven-verify + uses: entur/gha-maven-central/.github/workflows/maven-publish.yml@v1 + with: + snapshot: true + push_to_repo: false + java_version: 11 + next_version: "" + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/hotfix-finish.yml b/.github/workflows/hotfix-finish.yml new file mode 100644 index 0000000..b7fe52b --- /dev/null +++ b/.github/workflows/hotfix-finish.yml @@ -0,0 +1,29 @@ +name: Hotfix Finish (Gitflow) + +on: + workflow_dispatch: + inputs: + hotfix_branch: + description: 'Hotfix branch to finish (e.g., hotfix/2.0.16.1)' + required: true + type: string + merge_to_master: + description: 'Cherry-pick hotfix commits to master' + required: false + type: boolean + default: true + +jobs: + hotfix-finish: + uses: entur/ror-gha-workflows/.github/workflows/hotfix-finish.yml@v1 + with: + hotfix_branch: ${{ inputs.hotfix_branch }} + merge_to_main: ${{ inputs.merge_to_master }} + base_branch: master + runner: ubuntu-24.04 + java_version: 11 + java_distribution: liberica + version_tag_prefix: v + artifact_group_id: io.entur + artifact_ids: osm-to-netex-beta,osm-to-netex-beta-cli + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/hotfix-manual.yml b/.github/workflows/hotfix-manual.yml new file mode 100644 index 0000000..de68edf --- /dev/null +++ b/.github/workflows/hotfix-manual.yml @@ -0,0 +1,24 @@ +name: Manual Hotfix (Emergency/Fallback) + +# This workflow is a FALLBACK for emergency situations. +# For normal hotfixes, use: "Hotfix Start" → "Hotfix Finish" workflows +# Only use this if the gitflow workflows fail or for emergency hotfixes. + +on: + workflow_dispatch: + inputs: + git_ref: + description: 'Git tag to release (e.g., v2.0.15.1). Tag must already exist!' + required: true + type: string + +jobs: + publish-hotfix: + name: Publish hotfix to Maven Central + uses: entur/ror-gha-workflows/.github/workflows/hotfix-manual.yml@v1 + with: + git_ref: ${{ inputs.git_ref }} + java_version: 11 + java_distribution: liberica + version_tag_prefix: v + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/hotfix-start.yml b/.github/workflows/hotfix-start.yml new file mode 100644 index 0000000..b653f7f --- /dev/null +++ b/.github/workflows/hotfix-start.yml @@ -0,0 +1,20 @@ +name: Hotfix Start (Gitflow) + +on: + workflow_dispatch: + inputs: + hotfix_version: + description: 'Hotfix version (e.g., 2.0.15.1 or leave empty to auto-increment patch)' + required: false + type: string + base_tag: + description: 'Base tag to create hotfix from (e.g., v2.0.15). Leave empty to use latest master.' + required: false + type: string + +jobs: + hotfix-start: + uses: entur/ror-gha-workflows/.github/workflows/hotfix-start.yml@v1 + with: + hotfix_version: ${{ inputs.hotfix_version }} + base_tag: ${{ inputs.base_tag }} \ No newline at end of file diff --git a/.github/workflows/release-finish.yml b/.github/workflows/release-finish.yml new file mode 100644 index 0000000..3b8742f --- /dev/null +++ b/.github/workflows/release-finish.yml @@ -0,0 +1,38 @@ +name: Release Finish (Gitflow) + +on: + workflow_dispatch: + inputs: + release_branch: + description: 'Release branch to finish (e.g., release/2.0.16)' + required: true + type: string + next_version_increment: + description: 'Next version increment type for master' + required: false + type: choice + default: 'patch' + options: + - major + - minor + - patch + next_version: + description: 'Or specify exact next version for master (e.g., 2.1.0-SNAPSHOT)' + required: false + type: string + +jobs: + release-finish: + uses: entur/ror-gha-workflows/.github/workflows/release-finish.yml@v1 + with: + release_branch: ${{ inputs.release_branch }} + next_version_increment: ${{ inputs.next_version_increment }} + next_version: ${{ inputs.next_version }} + base_branch: master + runner: ubuntu-24.04 + java_version: 11 + java_distribution: liberica + version_tag_prefix: v + artifact_group_id: io.entur + artifact_ids: osm-to-netex-beta,osm-to-netex-beta-cli + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml new file mode 100644 index 0000000..917a348 --- /dev/null +++ b/.github/workflows/release-manual.yml @@ -0,0 +1,24 @@ +name: Manual Release (Emergency/Fallback) + +# This workflow is a FALLBACK for emergency situations. +# For normal releases, use: "Release Start" → "Release Finish" workflows +# Only use this if the gitflow workflows fail or for emergency releases. + +on: + workflow_dispatch: + inputs: + git_ref: + description: 'Git tag to release (e.g., v2.0.16). Tag must already exist!' + required: true + type: string + +jobs: + publish-release: + name: Publish release to Maven Central + uses: entur/ror-gha-workflows/.github/workflows/release-manual.yml@v1 + with: + git_ref: ${{ inputs.git_ref }} + java_version: 11 + java_distribution: liberica + version_tag_prefix: v + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-start.yml b/.github/workflows/release-start.yml new file mode 100644 index 0000000..063ffbf --- /dev/null +++ b/.github/workflows/release-start.yml @@ -0,0 +1,21 @@ +name: Release Start (Gitflow) + +on: + workflow_dispatch: + inputs: + release_version: + description: 'Release version (e.g., 2.0.16). Leave empty to auto-detect from develop.' + required: false + type: string + base_branch: + description: 'Base branch to create release from' + required: false + type: string + default: 'master' + +jobs: + release-start: + uses: entur/ror-gha-workflows/.github/workflows/release-start.yml@v1 + with: + release_version: ${{ inputs.release_version }} + base_branch: ${{ inputs.base_branch }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 34e952a..5269c1c 100644 --- a/pom.xml +++ b/pom.xml @@ -110,6 +110,7 @@ 3.5.0 9.0.1 0.8.12 + 1.18.0 @@ -221,6 +222,48 @@ maven-deploy-plugin ${maven-deploy-plugin.version} + + org.jreleaser + jreleaser-maven-plugin + ${jreleaser-maven-plugin.version} + + + + ALWAYS + true + + + + + + RELEASE + https://central.sonatype.com/api/v1/publisher + target/staging-deploy + + + + + SNAPSHOT + https://ossrh-staging-api.central.sonatype.com/service/local + https://central.sonatype.com/repository/maven-snapshots + true + true + true + true + target/staging-deploy + + + + + + + false + true + + + + + @@ -604,46 +647,59 @@ + + + org.jreleaser + jreleaser-maven-plugin + - - sign + sonar false + + + 11 + 3.9.1.2184 + + - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - false - - - - + - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar-maven-plugin.version} + + + + + + publication + + local::file:./target/staging-deploy + + + deploy + org.apache.maven.plugins - maven-gpg-plugin - ${maven-gpg-plugin.version} + maven-javadoc-plugin + ${maven-javadoc-plugin.version} - sign-artifacts - verify + attach-javadocs - sign + jar + + true + @@ -657,80 +713,16 @@ jar + + true + - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - none - - - - attach-javadocs - - jar - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging-maven-plugin.version} - true - - ossrh - https://oss.sonatype.org/ - - false - - - - - - - - release - - false - - - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - sonar - - false - - - - 11 - 3.9.1.2184 - - - - - - - org.sonarsource.scanner.maven - sonar-maven-plugin - ${sonar-maven-plugin.version} - + From 196cb8ac8f4b265f2fde67a78a47499af364c4f3 Mon Sep 17 00:00:00 2001 From: Vincent Paturet Date: Wed, 11 Dec 2024 10:49:00 +0100 Subject: [PATCH 05/53] Configure GitHub Actions --- .github/workflows/push.yml | 61 ++++++++++++++++++++++++++++++++++++++ pom.xml | 3 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..945e8ec --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,61 @@ +name: Build and push +on: + push: + branches: + - master + pull_request: + branches: + - master +env: + JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }} + JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + +jobs: + maven-package: + if: "!contains(github.event.head_commit.message, 'ci skip')" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + - name: Copy maven settings + run: | + wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml + - uses: actions/setup-java@v4 + with: + java-version: 17.0.13 + distribution: temurin + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + ${{ runner.os }}- + + - name: Run maven build + run: mvn package -s .github/workflows/settings.xml + - name: Sonar Scan + env: + SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} + SONAR_PROJECT_NAME: ${{ github.event.repository.name }} + SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} + run: | + mvn -Psonar -s .github/workflows/settings.xml \ + org.jacoco:jacoco-maven-plugin:prepare-agent verify \ + org.jacoco:jacoco-maven-plugin:report sonar:sonar \ + -Dmaven.main.skip \ + -DskipTests \ + -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ + -Dsonar.organization=enturas-github \ + -Dsonar.projectName=${SONAR_PROJECT_NAME} \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.token=${SONAR_TOKEN} + diff --git a/pom.xml b/pom.xml index 5269c1c..6c05137 100644 --- a/pom.xml +++ b/pom.xml @@ -110,6 +110,7 @@ 3.5.0 9.0.1 0.8.12 + 5.0.0.4389 1.18.0 @@ -722,7 +723,7 @@ - + From 0d1fcb1859686e93d9b41301cfff234ef2c1e21a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:14:14 +0000 Subject: [PATCH 06/53] Update all non-major dependencies (#210) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6c05137..a3c69c2 100644 --- a/pom.xml +++ b/pom.xml @@ -79,15 +79,15 @@ 2.1.8 2.2.0 - 4.0.2 - 4.0.2 + 4.1.0 + 4.1.0 2.0.16 3.17.0 - 3.26.3 + 3.27.2 5.11.4 From 6cad0d30c67d27f7ae9a22aa6d87bdeaec131383 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 06:55:40 +0000 Subject: [PATCH 07/53] Update dependency org.assertj:assertj-core from v3.27.2 to v3.27.3 (#213) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a3c69c2..de6938b 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ 3.17.0 - 3.27.2 + 3.27.3 5.11.4 From 3b049284f5395cbe863c9b5b967a75e7b7dbc175 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 05:02:24 +0000 Subject: [PATCH 08/53] Update dependency org.apache.maven.plugins:maven-clean-plugin from v3.4.0 to v3.4.1 (#214) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index de6938b..543bc3c 100644 --- a/pom.xml +++ b/pom.xml @@ -102,7 +102,7 @@ 3.13.0 3.4.2 - 3.4.0 + 3.4.1 3.1.3 3.21.0 3.3.1 From 1358c3d05e448889e7f850aabe1d001740dd06b8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 09:31:38 +0000 Subject: [PATCH 09/53] Update all non-major dependencies (#215) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 543bc3c..fac00f8 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.11.4 + 5.12.0 1.6.13 @@ -99,7 +99,7 @@ 3.1.1 1.6 3.1.2 - 3.13.0 + 3.14.0 3.4.2 3.4.1 From e03d73a763e6a00b9000311631e845884d292e3e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 04:55:54 +0000 Subject: [PATCH 10/53] Update all non-major dependencies (#216) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fac00f8..fd6d833 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ 4.1.0 - 2.0.16 + 2.0.17 3.17.0 @@ -103,7 +103,7 @@ 3.4.2 3.4.1 - 3.1.3 + 3.1.4 3.21.0 3.3.1 2.8.2 From ecfdc28bbb06b39a7a71548f1ff881874697eff9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 04:26:18 +0000 Subject: [PATCH 11/53] Update all non-major dependencies from v5.12.0 to v5.12.1 (#217) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fd6d833..3478bff 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.12.0 + 5.12.1 1.6.13 From c2bf3d5e805110bb2be9627957e3c173aaf7c6f6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 04:42:42 +0000 Subject: [PATCH 12/53] Update dependency org.apache.maven.plugins:maven-surefire-plugin from v3.5.2 to v3.5.3 (#218) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3478bff..ded6f74 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ 1.6.13 3.5.0 - 3.5.2 + 3.5.3 3.3.1 3.11.2 3.1.1 From fc8fe19cf35c6c0e4b13a058b689b2b514ef71f2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 08:27:43 +0000 Subject: [PATCH 13/53] Update dependency org.sonarsource.scanner.maven:sonar-maven-plugin from v5.0.0.4389 to v5.1.0.4751 (#219) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ded6f74..4207a0b 100644 --- a/pom.xml +++ b/pom.xml @@ -110,7 +110,7 @@ 3.5.0 9.0.1 0.8.12 - 5.0.0.4389 + 5.1.0.4751 1.18.0 From f2ff23afd86c855aa5a04c6a2a6c7f439489b0f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Apr 2025 04:42:11 +0000 Subject: [PATCH 14/53] Update dependency org.jacoco:jacoco-maven-plugin from v0.8.12 to v0.8.13 (#220) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4207a0b..dbd84b6 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ 2.8.2 3.5.0 9.0.1 - 0.8.12 + 0.8.13 5.1.0.4751 1.18.0 From e5f05bf9b20b10d9e168210fc4aeda3151f9b6f4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 05:16:55 +0000 Subject: [PATCH 15/53] Update all non-major dependencies from v5.12.1 to v5.12.2 (#221) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dbd84b6..fd64c3c 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.12.1 + 5.12.2 1.6.13 From c40395e2ec0ce33605012101182e16556ca23f32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 04:39:27 +0000 Subject: [PATCH 16/53] Update dependency io.github.git-commit-id:git-commit-id-maven-plugin from v9.0.1 to v9.0.2 (#223) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fd64c3c..9ee78c7 100644 --- a/pom.xml +++ b/pom.xml @@ -108,7 +108,7 @@ 3.3.1 2.8.2 3.5.0 - 9.0.1 + 9.0.2 0.8.13 5.1.0.4751 1.18.0 From 6ff48baed1b5963b1ee464daa45a45bbaa6f317f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 02:59:27 +0000 Subject: [PATCH 17/53] Update dependency org.codehaus.mojo:exec-maven-plugin from v3.5.0 to v3.5.1 (#224) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ee78c7..dda1500 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ 1.6.13 - 3.5.0 + 3.5.1 3.5.3 3.3.1 3.11.2 From a6d5d1d52bb14bb7620ca805bfce7da370de9fac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 07:57:21 +0000 Subject: [PATCH 18/53] Update all non-major dependencies (#225) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index dda1500..318717f 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.12.2 + 5.13.0 1.6.13 @@ -102,7 +102,7 @@ 3.14.0 3.4.2 - 3.4.1 + 3.5.0 3.1.4 3.21.0 3.3.1 From f9079e5372d538717144a7b8fcf4fbb4ed383c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Erik=20St=C3=B8wer?= Date: Mon, 2 Jun 2025 11:02:48 +0200 Subject: [PATCH 19/53] Replace status badge in README.md (#222) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2a7693..caaf191 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# netex-java-model [![CircleCI](https://circleci.com/gh/entur/netex-java-model/tree/master.svg?style=svg)](https://circleci.com/gh/entur/netex-java-model/tree/master) +# netex-java-model [![Build and push](https://github.com/entur/netex-java-model/actions/workflows/push.yml/badge.svg)](https://github.com/entur/netex-java-model/actions/workflows/push.yml) Downloads the NeTEx-XML XSD files from https://github.com/entur/NeTEx and generates java model using jaxb. From 0fb3355000bb7d02b55acb7943dd1926332caf6e Mon Sep 17 00:00:00 2001 From: Vincent Paturet <46598384+vpaturet@users.noreply.github.com> Date: Wed, 4 Jun 2025 09:35:35 +0200 Subject: [PATCH 20/53] Configure deploy to Artifactory (#229) --- .github/workflows/push.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 945e8ec..61c8e9e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -28,7 +28,7 @@ jobs: wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml - uses: actions/setup-java@v4 with: - java-version: 17.0.13 + java-version: 17.0.15 distribution: temurin - name: Cache Maven dependencies uses: actions/cache@v4 @@ -59,3 +59,37 @@ jobs: -Dsonar.host.url=https://sonarcloud.io \ -Dsonar.token=${SONAR_TOKEN} + deploy-artifactory: + if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: [maven-package] + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + - name: Copy maven settings + run: | + wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml + - uses: actions/setup-java@v4 + with: + java-version: 17.0.15 + distribution: liberica + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + ${{ runner.os }}- + + - name: Deploy to Entur Artifactory + run: mvn deploy -s .github/workflows/settings.xml -DskipTests + + From 91bbf622af2f84588396047f440be91238fb73c6 Mon Sep 17 00:00:00 2001 From: Vincent Paturet Date: Wed, 4 Jun 2025 09:58:16 +0200 Subject: [PATCH 21/53] Use temurin build image --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 61c8e9e..2d9f854 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -78,7 +78,7 @@ jobs: - uses: actions/setup-java@v4 with: java-version: 17.0.15 - distribution: liberica + distribution: temurin - name: Cache Maven dependencies uses: actions/cache@v4 with: From 2e040b74cb59f3df1dbfcc03c027203c3df9e247 Mon Sep 17 00:00:00 2001 From: Vincent Paturet <46598384+vpaturet@users.noreply.github.com> Date: Wed, 4 Jun 2025 10:11:37 +0200 Subject: [PATCH 22/53] Synchronize DatedServiceJourney with CEN version (#144) --- bindings.xjb | 16 +++++++-------- pom.xml | 20 +++++++++++++++++-- .../netex/validation/NeTExValidator.java | 5 +++-- .../model/UnmarshalTimetableFrameTest.java | 11 ++++++---- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/bindings.xjb b/bindings.xjb index e6536c9..a6502a6 100644 --- a/bindings.xjb +++ b/bindings.xjb @@ -14,14 +14,14 @@ -| +| + schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_genericFramework/netex_organisation_version.xsd"> @@ -30,35 +30,35 @@ + schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_fares/netex_salesOfferPackage_version.xsd"> + schemaLocation="./src/main/resources/xsd/1.16/netex_part_2/part2_journeyTimes/netex_vehicleJourneyFrequency_version.xsd"> + schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_salesTransactions/netex_salesContract_version.xsd"> + schemaLocation="./src/main/resources/xsd/1.16/netex_part_3/part3_salesTransactions/netex_retailConsortium_version.xsd"> + schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_responsibility/netex_version_support.xsd"> @@ -68,7 +68,7 @@ + schemaLocation="./src/main/resources/xsd/1.16/netex_framework/netex_genericFramework/netex_zone_version.xsd"> diff --git a/pom.xml b/pom.xml index 318717f..8247a61 100644 --- a/pom.xml +++ b/pom.xml @@ -69,9 +69,9 @@ 11 NeTEx - master + update_dsj https://github.com/entur/${netexRepoName} - 1.15 + 1.16 4.0.2 @@ -305,6 +305,22 @@ + + + download-extract-legacy-1.15 + generate-resources + + exec + + + + ${netexGithubUrl}/archive/tags/v1.0.15.zip + src/main/resources/xsd/1.15 + NeTEx-tags-v1.0.15/xsd/* + + ./bin/netex-download-extract.sh + + download-extract-legacy-1.14 diff --git a/src/main/java/org/rutebanken/netex/validation/NeTExValidator.java b/src/main/java/org/rutebanken/netex/validation/NeTExValidator.java index f214f93..4b3f4a8 100644 --- a/src/main/java/org/rutebanken/netex/validation/NeTExValidator.java +++ b/src/main/java/org/rutebanken/netex/validation/NeTExValidator.java @@ -43,7 +43,8 @@ public enum NetexVersion { v1_12 ("1.12"), v1_13 ("1.13"), v1_14 ("1.14"), - v1_15 ("1.15"); + v1_15 ("1.15"), + v1_16 ("1.16"); private final String folderName; @@ -58,7 +59,7 @@ public String toString() { } private final Schema neTExSchema; - public static final NetexVersion LATEST = NetexVersion.v1_15; + public static final NetexVersion LATEST = NetexVersion.v1_16; private static final Map VALIDATORS_PER_VERSION = new EnumMap<>(NetexVersion.class); diff --git a/src/test/java/org/rutebanken/netex/model/UnmarshalTimetableFrameTest.java b/src/test/java/org/rutebanken/netex/model/UnmarshalTimetableFrameTest.java index d3c1a07..9f2dcbf 100644 --- a/src/test/java/org/rutebanken/netex/model/UnmarshalTimetableFrameTest.java +++ b/src/test/java/org/rutebanken/netex/model/UnmarshalTimetableFrameTest.java @@ -97,8 +97,10 @@ void unmarshalTimetableFrame() throws JAXBException { " \n" + " cancellation" + " \n" + - " \n" + - " \n" + + " \n" + + " " + + " \n" + + " \n" + " \n" + " \n" + " \n" + @@ -127,12 +129,13 @@ void unmarshalTimetableFrame() throws JAXBException { DatedServiceJourney dsj = (DatedServiceJourney) timetableFrame.getVehicleJourneys().getVehicleJourneyOrDatedVehicleJourneyOrNormalDatedVehicleJourney().get(1); assertEquals("VYG:OperatingDay:2023-12-09", dsj.getOperatingDayRef().getRef()); - assertEquals("VYG:ServiceJourney:96-KMB_87815-R", dsj.getJourneyRef().get(0).getValue().getRef()); - assertEquals("VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19", dsj.getJourneyRef().get(1).getValue().getRef()); + assertEquals("VYG:ServiceJourney:96-KMB_87815-R", dsj.getJourneyRef().getValue().getRef()); + assertEquals("VYG:DatedServiceJourney:8916_KVG-DEG_23-10-19", dsj.getReplacedJourneys().getDatedVehicleJourneyRefOrNormalDatedVehicleJourneyRef().get(0).getValue().getRef()); assertEquals("cancellation", dsj.getServiceAlteration().value()); + } From 26f0ebabcfb14266293407f5e8752c0ddf6a81db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 04:07:51 +0000 Subject: [PATCH 23/53] Update all non-major dependencies from v5.13.0 to v5.13.1 (#231) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8247a61..7fbab03 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.13.0 + 5.13.1 1.6.13 From 55fc383973968ee343337860383b46bb80ba0cec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 04:01:15 +0000 Subject: [PATCH 24/53] Update all non-major dependencies from v5.13.1 to v5.13.2 (#232) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7fbab03..1a1b1a7 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.13.1 + 5.13.2 1.6.13 From e15cfe8f7feeeb7e7b52215a1d18e070b5291ff5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 03:38:56 +0000 Subject: [PATCH 25/53] Update all non-major dependencies from v5.13.2 to v5.13.3 (#233) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1a1b1a7..7ed952d 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.13.2 + 5.13.3 1.6.13 From f33f3514c2aecf00a0a66cb064162ab4f7e944da Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 08:40:23 +0000 Subject: [PATCH 26/53] Update dependency org.apache.maven.plugins:maven-enforcer-plugin from v3.5.0 to v3.6.0 (#234) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ed952d..ad2df0b 100644 --- a/pom.xml +++ b/pom.xml @@ -107,7 +107,7 @@ 3.21.0 3.3.1 2.8.2 - 3.5.0 + 3.6.0 9.0.2 0.8.13 5.1.0.4751 From b57d7aa56a897ad8105979adc760c0ef652beba8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Jul 2025 07:38:10 +0000 Subject: [PATCH 27/53] Update dependency org.apache.commons:commons-lang3 from v3.17.0 to v3.18.0 [SECURITY] (#236) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad2df0b..bee90d6 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 2.0.17 - 3.17.0 + 3.18.0 3.27.3 From 7f3da4ebfee5371e0c4fb37cf80e079209e2963a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 04:05:07 +0000 Subject: [PATCH 28/53] Update all non-major dependencies (#237) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bee90d6..d9871c8 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.3 - 5.13.3 + 5.13.4 1.6.13 @@ -107,7 +107,7 @@ 3.21.0 3.3.1 2.8.2 - 3.6.0 + 3.6.1 9.0.2 0.8.13 5.1.0.4751 From 6afb6f53dd20cf2d5150f00933bded6c544d2145 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 02:58:36 +0000 Subject: [PATCH 29/53] Update dependency org.assertj:assertj-core from v3.27.3 to v3.27.4 (#238) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9871c8..bc21479 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ 3.18.0 - 3.27.3 + 3.27.4 5.13.4 From 59e9a291e4b51465cb820e9da2e3141f54511fcd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 03:20:56 +0000 Subject: [PATCH 30/53] Update dependency org.apache.maven.plugins:maven-javadoc-plugin from v3.11.2 to v3.11.3 (#239) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc21479..7623e5c 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ 3.5.1 3.5.3 3.3.1 - 3.11.2 + 3.11.3 3.1.1 1.6 3.1.2 From 98f16639463939a72e65e17f1a44d1082d04c1d4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 08:41:08 +0000 Subject: [PATCH 31/53] Update dependency org.sonarsource.scanner.maven:sonar-maven-plugin from v5.1.0.4751 to v5.2.0.4988 (#242) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7623e5c..7c316dc 100644 --- a/pom.xml +++ b/pom.xml @@ -110,7 +110,7 @@ 3.6.1 9.0.2 0.8.13 - 5.1.0.4751 + 5.2.0.4988 1.18.0 From 547f41cf305945c368f3c9efa8203a8ecc7a5692 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 02:58:33 +0000 Subject: [PATCH 32/53] Update dependency org.apache.maven.plugins:maven-surefire-plugin from v3.5.3 to v3.5.4 (#243) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c316dc..18a0781 100644 --- a/pom.xml +++ b/pom.xml @@ -93,7 +93,7 @@ 1.6.13 3.5.1 - 3.5.3 + 3.5.4 3.3.1 3.11.3 3.1.1 From 535d0752c89ecf8d9fcc5664fb3ad74b08eb9fdb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 02:56:00 +0000 Subject: [PATCH 33/53] Update dependency org.apache.maven.plugins:maven-javadoc-plugin from v3.11.3 to v3.12.0 (#245) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 18a0781..462fc39 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ 3.5.1 3.5.4 3.3.1 - 3.11.3 + 3.12.0 3.1.1 1.6 3.1.2 From 83da605cf854253f039f6267ec99158c2e1925f8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 06:32:16 +0000 Subject: [PATCH 34/53] Update all non-major dependencies (#244) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 462fc39..689375b 100644 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ 1.16 - 4.0.2 + 4.0.4 4.0.5 2.1.8 2.2.0 @@ -87,7 +87,7 @@ 3.18.0 - 3.27.4 + 3.27.5 5.13.4 @@ -99,7 +99,7 @@ 3.1.1 1.6 3.1.2 - 3.14.0 + 3.14.1 3.4.2 3.5.0 From 1d74440124e079cbb294e6f7d63052d25955261b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 02:55:02 +0000 Subject: [PATCH 35/53] Update all non-major dependencies (#246) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 689375b..f7913cb 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ 4.0.4 - 4.0.5 + 4.0.6 2.1.8 2.2.0 @@ -87,7 +87,7 @@ 3.18.0 - 3.27.5 + 3.27.6 5.13.4 From 7ff96646f98a9ec1349295e90910dedccd683c07 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 06:52:45 +0000 Subject: [PATCH 36/53] Update all non-major dependencies (#247) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f7913cb..d0227a4 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 2.0.17 - 3.18.0 + 3.19.0 3.27.6 @@ -570,7 +570,7 @@ org.apache.maven.scm maven-scm-provider-gitexe - 2.1.0 + 2.2.1 From 60894e76b7d5aa4492c59c3867f89413e2558308 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 02:28:46 +0000 Subject: [PATCH 37/53] Update dependency org.apache.maven.plugins:maven-enforcer-plugin from v3.6.1 to v3.6.2 (#248) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0227a4..85ea720 100644 --- a/pom.xml +++ b/pom.xml @@ -107,7 +107,7 @@ 3.21.0 3.3.1 2.8.2 - 3.6.1 + 3.6.2 9.0.2 0.8.13 5.2.0.4988 From 617cba92a67fa257d88121df0de2b85eb6783fee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 06:49:44 +0000 Subject: [PATCH 38/53] Update all non-major dependencies (#249) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 85ea720..451269c 100644 --- a/pom.xml +++ b/pom.xml @@ -88,11 +88,11 @@ 3.27.6 - 5.13.4 + 5.14.0 1.6.13 - 3.5.1 + 3.6.1 3.5.4 3.3.1 3.12.0 From f13f6f7c8e916e4fa551f25bcae999481a9525ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 02:51:10 +0000 Subject: [PATCH 39/53] Update dependency org.jacoco:jacoco-maven-plugin from v0.8.13 to v0.8.14 (#251) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 451269c..9020971 100644 --- a/pom.xml +++ b/pom.xml @@ -109,7 +109,7 @@ 2.8.2 3.6.2 9.0.2 - 0.8.13 + 0.8.14 5.2.0.4988 1.18.0 From dbca7e231f27f37b7e99012213698462883d1e23 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 03:06:36 +0000 Subject: [PATCH 40/53] Update dependency org.codehaus.mojo:exec-maven-plugin from v3.6.1 to v3.6.2 (#252) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9020971..87d5073 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ 1.6.13 - 3.6.1 + 3.6.2 3.5.4 3.3.1 3.12.0 From 615154170eb2df18038b77c86b70582af5b36cdf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 03:51:21 +0000 Subject: [PATCH 41/53] Update all non-major dependencies from v4.1.0 to v4.1.1 (#253) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 87d5073..c2aabf4 100644 --- a/pom.xml +++ b/pom.xml @@ -79,8 +79,8 @@ 2.1.8 2.2.0 - 4.1.0 - 4.1.0 + 4.1.1 + 4.1.1 2.0.17 From 0219e7416551af55737a21d3e06f1d1dd80fe0d7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 03:49:28 +0000 Subject: [PATCH 42/53] Update all non-major dependencies from v5.14.0 to v5.14.1 (#254) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c2aabf4..f750c42 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.6 - 5.14.0 + 5.14.1 1.6.13 From 8255434e6168cd596f7ae24b2f531dc88ae9f916 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:00:06 +0000 Subject: [PATCH 43/53] Update all non-major dependencies (#255) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f750c42..4dd7fb9 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ 3.5.4 3.3.1 3.12.0 - 3.1.1 + 3.2.0 1.6 3.1.2 3.14.1 @@ -551,7 +551,7 @@ org.codehaus.plexus plexus-compiler-javac - 2.15.0 + 2.16.0 From 078489616222468b342ffe6bdb17ca48f4c07920 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 03:40:25 +0000 Subject: [PATCH 44/53] Update all non-major dependencies (#256) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4dd7fb9..a9bc3ee 100644 --- a/pom.xml +++ b/pom.xml @@ -84,7 +84,7 @@ 2.0.17 - 3.19.0 + 3.20.0 3.27.6 @@ -101,7 +101,7 @@ 3.1.2 3.14.1 - 3.4.2 + 3.5.0 3.5.0 3.1.4 3.21.0 @@ -110,7 +110,7 @@ 3.6.2 9.0.2 0.8.14 - 5.2.0.4988 + 5.3.0.6276 1.18.0 From ba352679f49816b5ca6d027050fcfba364ddf162 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 06:42:26 +0000 Subject: [PATCH 45/53] Update dependency org.codehaus.plexus:plexus-compiler-javac from v2.16.0 to v2.16.1 (#257) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a9bc3ee..88ab000 100644 --- a/pom.xml +++ b/pom.xml @@ -551,7 +551,7 @@ org.codehaus.plexus plexus-compiler-javac - 2.16.0 + 2.16.1 From 6591672ee726123c12b59c59dead7eea9e84f315 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 03:37:02 +0000 Subject: [PATCH 46/53] Update all non-major dependencies (#259) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 88ab000..5a210c3 100644 --- a/pom.xml +++ b/pom.xml @@ -94,9 +94,9 @@ 1.6.13 3.6.2 3.5.4 - 3.3.1 + 3.4.0 3.12.0 - 3.2.0 + 3.3.1 1.6 3.1.2 3.14.1 @@ -105,12 +105,12 @@ 3.5.0 3.1.4 3.21.0 - 3.3.1 + 3.4.0 2.8.2 3.6.2 9.0.2 0.8.14 - 5.3.0.6276 + 5.5.0.6356 1.18.0 From 5cb5d63907a228561f77fa8d9f475461083481cc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 03:40:00 +0000 Subject: [PATCH 47/53] Update dependency org.codehaus.mojo:exec-maven-plugin from v3.6.2 to v3.6.3 (#261) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5a210c3..1e0b24b 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ 1.6.13 - 3.6.2 + 3.6.3 3.5.4 3.4.0 3.12.0 From 66cc3eeb6ae714700251df8a2ae5d835e6a5dd41 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 06:11:10 +0000 Subject: [PATCH 48/53] Update all non-major dependencies from v5.14.1 to v5.14.2 (#262) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1e0b24b..d4701fc 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,7 @@ 3.27.6 - 5.14.1 + 5.14.2 1.6.13 From 6fbbf3220f3b3175c328c3f9b6b4438dc435ef65 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Fri, 27 Dec 2024 11:52:58 +0100 Subject: [PATCH 49/53] replace circleci config with gha config --- .github/workflows/deploy.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 791e1c9..21b24a6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,6 +35,19 @@ jobs: - name: Run maven build run: mvn verify -s .github/workflows/settings.xml + - name: Sonar Scan + env: + SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} + SONAR_PROJECT_NAME: ${{ github.event.repository.name }} + SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} + run: | + mvn -Psonar -s .github/workflows/settings.xml \ + sonar:sonar \ + -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ + -Dsonar.organization=enturas-github \ + -Dsonar.projectName=${SONAR_PROJECT_NAME} \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.token=${SONAR_TOKEN} - name: Upload artifact uses: actions/upload-artifact@v4.4.3 with: From 1fceca0528ed708c6b3f56c20f97eb0a6c17c2d0 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Mon, 19 Jan 2026 12:19:06 +0100 Subject: [PATCH 50/53] update workflow to use jrealser to release to maven central --- .github/workflows/deploy.yml | 13 ------------- pom.xml | 4 ---- 2 files changed, 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 21b24a6..791e1c9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -35,19 +35,6 @@ jobs: - name: Run maven build run: mvn verify -s .github/workflows/settings.xml - - name: Sonar Scan - env: - SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} - SONAR_PROJECT_NAME: ${{ github.event.repository.name }} - SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} - run: | - mvn -Psonar -s .github/workflows/settings.xml \ - sonar:sonar \ - -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ - -Dsonar.organization=enturas-github \ - -Dsonar.projectName=${SONAR_PROJECT_NAME} \ - -Dsonar.host.url=https://sonarcloud.io \ - -Dsonar.token=${SONAR_TOKEN} - name: Upload artifact uses: actions/upload-artifact@v4.4.3 with: diff --git a/pom.xml b/pom.xml index d4701fc..b5be055 100644 --- a/pom.xml +++ b/pom.xml @@ -116,10 +116,6 @@ - - gpg - ${env.GPG_KEY_NAME} - From d6af2671cad16f2277f4ba61f27a6b3b2d2e9899 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Mon, 19 Jan 2026 13:44:01 +0100 Subject: [PATCH 51/53] update workflows --- .github/workflows/deploy.yml | 47 ++- .github/workflows/gitflow-hotfix-finish.yml | 248 ++++++++++++++ .github/workflows/gitflow-release-finish.yml | 315 ++++++++++++++++++ .github/workflows/hotfix-finish.yml | 6 +- .github/workflows/hotfix-manual.yml | 74 +++- .github/workflows/maven-jreleaser-release.yml | 174 ++++++++++ .github/workflows/push.yml | 95 ------ .github/workflows/release-finish.yml | 6 +- .github/workflows/release-manual.yml | 74 +++- 9 files changed, 914 insertions(+), 125 deletions(-) create mode 100644 .github/workflows/gitflow-hotfix-finish.yml create mode 100644 .github/workflows/gitflow-release-finish.yml create mode 100644 .github/workflows/maven-jreleaser-release.yml delete mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 791e1c9..c35b21a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,19 +6,20 @@ on: pull_request: branches: - master -env: - JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }} - JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} jobs: maven-verify: runs-on: ubuntu-24.04 + outputs: + version: ${{ steps.get-version.outputs.version }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Copy maven settings + - name: Install xmlstarlet run: | - wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet - uses: actions/setup-java@v4 with: java-version: 11 @@ -33,8 +34,33 @@ jobs: ${{ runner.os }}-maven- ${{ runner.os }}- + - name: Get version from pom.xml + id: get-version + run: | + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Detected version: $VERSION" + - name: Run maven build - run: mvn verify -s .github/workflows/settings.xml + run: mvn package + + - name: Sonar Scan + env: + SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} + SONAR_PROJECT_NAME: ${{ github.event.repository.name }} + SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} + run: | + mvn -Psonar -s .github/workflows/settings.xml \ + org.jacoco:jacoco-maven-plugin:prepare-agent verify \ + org.jacoco:jacoco-maven-plugin:report sonar:sonar \ + -Dmaven.main.skip \ + -DskipTests \ + -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ + -Dsonar.organization=enturas-github \ + -Dsonar.projectName=${SONAR_PROJECT_NAME} \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.token=${SONAR_TOKEN} + - name: Upload artifact uses: actions/upload-artifact@v4.4.3 with: @@ -43,12 +69,13 @@ jobs: publish-snapshot: name: Publish snapshot to Maven Central - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master' needs: maven-verify - uses: entur/gha-maven-central/.github/workflows/maven-publish.yml@v1 + uses: ./.github/workflows/maven-jreleaser-release.yml with: + version: ${{ needs.maven-verify.outputs.version }} snapshot: true - push_to_repo: false + skip_version_update: true java_version: 11 - next_version: "" + java_distribution: liberica secrets: inherit \ No newline at end of file diff --git a/.github/workflows/gitflow-hotfix-finish.yml b/.github/workflows/gitflow-hotfix-finish.yml new file mode 100644 index 0000000..68ea738 --- /dev/null +++ b/.github/workflows/gitflow-hotfix-finish.yml @@ -0,0 +1,248 @@ +name: Hotfix Finish (Gitflow) + +on: + workflow_call: + inputs: + hotfix_branch: + description: 'Hotfix branch to finish (e.g., hotfix/2.0.16.1)' + required: true + type: string + merge_to_main: + description: 'Cherry-pick hotfix commits to base branch' + required: false + type: boolean + default: true + runner: + description: 'Runner to use for jobs' + required: false + type: string + default: "ubuntu-24.04" + java_version: + description: 'Java version to use' + required: false + type: number + default: 21 + java_distribution: + description: 'Java distribution to use' + required: false + type: string + default: "liberica" + version_tag_prefix: + description: 'Prefix for version tags' + required: false + type: string + default: "v" + artifact_group_id: + description: 'Maven group ID for summary links (e.g., io.entur)' + required: false + type: string + default: "" + artifact_ids: + description: 'Comma-separated artifact IDs for summary links (e.g., my-library,my-cli)' + required: false + type: string + default: "" + base_branch: + description: 'Base branch to cherry-pick changes to (e.g., main, master, develop)' + required: false + type: string + default: "main" + secrets: + SONATYPE_AUTH_USER: + required: true + SONATYPE_AUTH_TOKEN: + required: true + SONATYPE_GPG_KEY_PUBLIC: + required: true + SONATYPE_GPG_KEY: + required: true + SONATYPE_GPG_KEY_PASSWORD: + required: true + +jobs: + get-hotfix-version: + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + outputs: + version: ${{ steps.get_version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.hotfix_branch }} + fetch-depth: 0 + + - uses: actions/setup-java@v4 + with: + java-version: ${{ inputs.java_version || 21 }} + distribution: ${{ inputs.java_distribution || 'liberica' }} + + - name: Get hotfix version + id: get_version + run: | + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + # Remove -SNAPSHOT if present + VERSION="${VERSION%-SNAPSHOT}" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Hotfix version: $VERSION" + + create-tag: + name: Create hotfix tag + needs: get-hotfix-version + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.hotfix_branch }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Create and push tag + run: | + VERSION="${{ needs.get-hotfix-version.outputs.version }}" + TAG="${{ inputs.version_tag_prefix || 'v' }}${VERSION}" + + echo "Creating tag: $TAG from branch ${{ inputs.hotfix_branch }}" + git tag -a "$TAG" -m "Hotfix $VERSION" + git push origin "$TAG" + + publish-hotfix: + name: Publish to Maven Central + needs: [get-hotfix-version, create-tag] + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + env: + JRELEASER_MAVENCENTRAL_URL: "https://central.sonatype.com/api/v1/publisher" + JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_ACTIVE: "RELEASE" + JRELEASER_DEPLOY_MAVEN_NEXUS2_ACTIVE: "SNAPSHOT" + JRELEASER_NEXUS2_URL: "https://ossrh-staging-api.central.sonatype.com/service/local" + JRELEASER_NEXUS2_SNAPSHOT_URL: "https://central.sonatype.com/repository/maven-snapshots" + JRELEASER_OVERWRITE: true + JRELEASER_UPDATE: true + JRELEASER_GIT_ROOT_SEARCH: true + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.version_tag_prefix || 'v' }}${{ needs.get-hotfix-version.outputs.version }} + fetch-depth: 0 + + - uses: actions/setup-java@v4 + with: + java-version: ${{ inputs.java_version || 21 }} + distribution: ${{ inputs.java_distribution || 'liberica' }} + cache: maven + + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + + - name: JReleaser Release to Maven Central + uses: entur/gha-maven-central/.github/actions/jreleaser-release@v1 + with: + version: ${{ needs.get-hotfix-version.outputs.version }} + version_tag_prefix: ${{ inputs.version_tag_prefix || 'v' }} + github_token: ${{ secrets.GITHUB_TOKEN }} + sonatype_username: ${{ secrets.SONATYPE_AUTH_USER }} + sonatype_password: ${{ secrets.SONATYPE_AUTH_TOKEN }} + gpg_public_key: ${{ secrets.SONATYPE_GPG_KEY_PUBLIC }} + gpg_secret_key: ${{ secrets.SONATYPE_GPG_KEY }} + gpg_passphrase: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }} + artifactory_user: ${{ secrets.ARTIFACTORY_AUTH_USER }} + artifactory_token: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + + - name: Upload Build Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: jreleaser-reports + path: | + **/target/site + **/target/reports/ + **/target/surefire-reports + + merge-to-base-branch: + name: Cherry-pick hotfix to base branch + needs: [get-hotfix-version, publish-hotfix] + if: inputs.merge_to_main == true + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.base_branch || 'main' }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Cherry-pick hotfix commits + run: | + HOTFIX_BRANCH="${{ inputs.hotfix_branch }}" + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + echo "Cherry-picking commits from $HOTFIX_BRANCH to $BASE_BRANCH" + + # Get the base commit (where hotfix branched from) + git fetch origin "$HOTFIX_BRANCH" + + # Find all commits in the hotfix branch + HOTFIX_COMMITS=$(git log --reverse --pretty=format:"%H" origin/$HOTFIX_BRANCH --not $(git merge-base origin/$BASE_BRANCH origin/$HOTFIX_BRANCH)) + + # Cherry-pick each commit + for commit in $HOTFIX_COMMITS; do + echo "Cherry-picking commit: $commit" + git cherry-pick "$commit" || { + echo "::warning::Cherry-pick conflict on commit $commit. Resolve manually." + git cherry-pick --abort + exit 1 + } + done + + - name: Push to base branch + run: | + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + git push origin "$BASE_BRANCH" + + - name: Delete hotfix branch + continue-on-error: true + run: | + HOTFIX_BRANCH="${{ inputs.hotfix_branch }}" + echo "Deleting hotfix branch: $HOTFIX_BRANCH" + git push origin --delete "$HOTFIX_BRANCH" || echo "Branch already deleted" + + - name: Create summary + run: | + VERSION="${{ needs.get-hotfix-version.outputs.version }}" + TAG_PREFIX="${{ inputs.version_tag_prefix || 'v' }}" + GROUP_ID="${{ inputs.artifact_group_id }}" + ARTIFACT_IDS="${{ inputs.artifact_ids }}" + + cat >> $GITHUB_STEP_SUMMARY <> $GITHUB_STEP_SUMMARY + done + fi + + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + + cat >> $GITHUB_STEP_SUMMARY <> $GITHUB_OUTPUT + echo "Release version: $VERSION" + + create-tag: + name: Create release tag + needs: get-release-version + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.release_branch }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Create and push tag + run: | + VERSION="${{ needs.get-release-version.outputs.version }}" + TAG="${{ inputs.version_tag_prefix || 'v' }}${VERSION}" + + echo "Creating tag: $TAG from branch ${{ inputs.release_branch }}" + git tag -a "$TAG" -m "Release $VERSION" + git push origin "$TAG" + + publish-release: + name: Publish to Maven Central + needs: [get-release-version, create-tag] + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + env: + JRELEASER_MAVENCENTRAL_URL: "https://central.sonatype.com/api/v1/publisher" + JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_ACTIVE: "RELEASE" + JRELEASER_DEPLOY_MAVEN_NEXUS2_ACTIVE: "SNAPSHOT" + JRELEASER_NEXUS2_URL: "https://ossrh-staging-api.central.sonatype.com/service/local" + JRELEASER_NEXUS2_SNAPSHOT_URL: "https://central.sonatype.com/repository/maven-snapshots" + JRELEASER_OVERWRITE: true + JRELEASER_UPDATE: true + JRELEASER_GIT_ROOT_SEARCH: true + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.version_tag_prefix || 'v' }}${{ needs.get-release-version.outputs.version }} + fetch-depth: 0 + + - uses: actions/setup-java@v4 + with: + java-version: ${{ inputs.java_version || 21 }} + distribution: ${{ inputs.java_distribution || 'liberica' }} + cache: maven + + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + + - name: JReleaser Release to Maven Central + uses: entur/gha-maven-central/.github/actions/jreleaser-release@v1 + with: + version: ${{ needs.get-release-version.outputs.version }} + version_tag_prefix: ${{ inputs.version_tag_prefix || 'v' }} + github_token: ${{ secrets.GITHUB_TOKEN }} + sonatype_username: ${{ secrets.SONATYPE_AUTH_USER }} + sonatype_password: ${{ secrets.SONATYPE_AUTH_TOKEN }} + gpg_public_key: ${{ secrets.SONATYPE_GPG_KEY_PUBLIC }} + gpg_secret_key: ${{ secrets.SONATYPE_GPG_KEY }} + gpg_passphrase: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }} + artifactory_user: ${{ secrets.ARTIFACTORY_AUTH_USER }} + artifactory_token: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + + - name: Upload Build Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: jreleaser-reports + path: | + **/target/site + **/target/reports/ + **/target/surefire-reports + + merge-release-to-base: + name: Merge release branch to base branch + needs: [get-release-version, publish-release] + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.base_branch || 'main' }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Merge release branch + run: | + RELEASE_BRANCH="${{ inputs.release_branch }}" + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + VERSION="${{ needs.get-release-version.outputs.version }}" + + echo "Merging $RELEASE_BRANCH into $BASE_BRANCH" + git fetch origin "$RELEASE_BRANCH" + git merge "origin/$RELEASE_BRANCH" -m "chore: merge release $VERSION into $BASE_BRANCH" + git push origin "$BASE_BRANCH" + + update-base-branch: + name: Update base branch to next SNAPSHOT version + needs: [get-release-version, merge-release-to-base] + runs-on: ${{ inputs.runner || 'ubuntu-24.04' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.base_branch || 'main' }} + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - uses: actions/setup-java@v4 + with: + java-version: ${{ inputs.java_version || 21 }} + distribution: ${{ inputs.java_distribution || 'liberica' }} + + - name: Calculate next development version + id: next_version + run: | + CURRENT_VERSION="${{ needs.get-release-version.outputs.version }}" + + # Use custom version if provided, otherwise increment + if [ -n "${{ inputs.next_version }}" ]; then + NEXT_VERSION="${{ inputs.next_version }}" + # Ensure it has -SNAPSHOT + if [[ ! "$NEXT_VERSION" =~ -SNAPSHOT$ ]]; then + NEXT_VERSION="${NEXT_VERSION}-SNAPSHOT" + fi + else + INCREMENT_TYPE="${{ inputs.next_version_increment }}" + + # Parse version components + IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_VERSION" + MAJOR="${VERSION_PARTS[0]:-0}" + MINOR="${VERSION_PARTS[1]:-0}" + PATCH="${VERSION_PARTS[2]:-0}" + + # Calculate next version based on increment type + case "$INCREMENT_TYPE" in + major) + MAJOR=$((MAJOR + 1)) + MINOR=0 + PATCH=0 + ;; + minor) + MINOR=$((MINOR + 1)) + PATCH=0 + ;; + patch) + PATCH=$((PATCH + 1)) + ;; + *) + echo "Error: Invalid increment type: $INCREMENT_TYPE" + exit 1 + ;; + esac + + NEXT_VERSION="$MAJOR.$MINOR.$PATCH-SNAPSHOT" + fi + + echo "next_version=$NEXT_VERSION" >> $GITHUB_OUTPUT + echo "Next development version: $NEXT_VERSION" + + - name: Update base branch version + run: | + NEXT_VERSION="${{ steps.next_version.outputs.next_version }}" + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + echo "Updating $BASE_BRANCH to: $NEXT_VERSION" + + mvn -B versions:set -DnewVersion="$NEXT_VERSION" -DgenerateBackupPoms=false -DprocessAllModules=true + + git add '*/pom.xml' pom.xml + git commit -m "chore: prepare for next development iteration $NEXT_VERSION [skip ci]" + git push origin "$BASE_BRANCH" + + - name: Delete release branch + continue-on-error: true + run: | + RELEASE_BRANCH="${{ inputs.release_branch }}" + echo "Deleting release branch: $RELEASE_BRANCH" + git push origin --delete "$RELEASE_BRANCH" || echo "Branch already deleted" + + - name: Create summary + run: | + VERSION="${{ needs.get-release-version.outputs.version }}" + TAG_PREFIX="${{ inputs.version_tag_prefix || 'v' }}" + GROUP_ID="${{ inputs.artifact_group_id }}" + ARTIFACT_IDS="${{ inputs.artifact_ids }}" + + cat >> $GITHUB_STEP_SUMMARY <> $GITHUB_STEP_SUMMARY + done + fi + + BASE_BRANCH="${{ inputs.base_branch || 'main' }}" + + cat >> $GITHUB_STEP_SUMMARY <> $GITHUB_OUTPUT + echo "Publishing hotfix version: $VERSION" + + - name: JReleaser Release to Maven Central + uses: entur/gha-maven-central/.github/actions/jreleaser-release@v1 + with: + version: ${{ steps.get_version.outputs.version }} + version_tag_prefix: v + github_token: ${{ secrets.GITHUB_TOKEN }} + sonatype_username: ${{ secrets.SONATYPE_AUTH_USER }} + sonatype_password: ${{ secrets.SONATYPE_AUTH_TOKEN }} + gpg_public_key: ${{ secrets.SONATYPE_GPG_KEY_PUBLIC }} + gpg_secret_key: ${{ secrets.SONATYPE_GPG_KEY }} + gpg_passphrase: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }} + artifactory_user: ${{ secrets.ARTIFACTORY_AUTH_USER }} + artifactory_token: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + + - name: Upload Build Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: jreleaser-reports + path: | + **/target/site + **/target/reports/ + **/target/surefire-reports \ No newline at end of file diff --git a/.github/workflows/maven-jreleaser-release.yml b/.github/workflows/maven-jreleaser-release.yml new file mode 100644 index 0000000..0dfc5ab --- /dev/null +++ b/.github/workflows/maven-jreleaser-release.yml @@ -0,0 +1,174 @@ +name: JReleaser Release to Maven Central (Maven) + +on: + workflow_call: + inputs: + runner: + description: "Job Runner" + required: false + type: string + default: "ubuntu-24.04" + git_ref: + description: "Option to override git reference to checkout before build" + type: string + required: false + settings-xml_file: + description: "Link to the external settings.xml file" + required: false + type: string + default: "" + java_version: + description: "Java Runtime Version" + required: false + type: number + default: 21 + java_distribution: + description: "Java distribution for Setup-Java" + required: false + type: string + default: "liberica" + version: + description: "The version to release (e.g., '1.3.0' or '1.3.0-SNAPSHOT'). This is required for this standalone workflow." + required: true + type: string + version_file_name: + description: "The name of the file containing the version number" + required: false + type: string + default: "pom.xml" + version_tag_prefix: + description: "The prefix for the git tag (e.g., 'v' for 'v1.0.0')" + required: false + type: string + default: "v" + snapshot: + description: "Whether the artifact is a snapshot or not" + required: false + type: boolean + default: false + skip_version_update: + description: "Skip setting version in pom.xml (useful if version is already set)" + required: false + type: boolean + default: false + secrets: + GIT_SSH_KEY: + description: "Option to override git ssh key to checkout before build" + required: false + SONATYPE_AUTH_USER: + required: true + SONATYPE_AUTH_TOKEN: + required: true + SONATYPE_GPG_KEY_PUBLIC: + required: true + SONATYPE_GPG_KEY: + required: true + SONATYPE_GPG_KEY_PASSWORD: + required: true + + outputs: + version: + description: Published version + value: ${{ jobs.release.outputs.version }} + +concurrency: + group: maven-jreleaser-release-${{ github.ref }} + +jobs: + release: + runs-on: ${{ inputs.runner }} + permissions: + contents: write + issues: write + packages: write + env: + JRELEASER_MAVENCENTRAL_URL: "https://central.sonatype.com/api/v1/publisher" + JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_ACTIVE: "RELEASE" + JRELEASER_DEPLOY_MAVEN_NEXUS2_ACTIVE: "SNAPSHOT" + JRELEASER_NEXUS2_URL: "https://ossrh-staging-api.central.sonatype.com/service/local" + JRELEASER_NEXUS2_SNAPSHOT_URL: "https://central.sonatype.com/repository/maven-snapshots" + JRELEASER_OVERWRITE: true + JRELEASER_UPDATE: true + JRELEASER_GIT_ROOT_SEARCH: true + outputs: + version: ${{ steps.release.outputs.version }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + if: ${{ inputs.git_ref == '' }} + with: + fetch-depth: 0 + ssh-key: ${{ secrets.GIT_SSH_KEY }} + + - name: Checkout code with reference + uses: actions/checkout@v4 + if: ${{ inputs.git_ref != '' }} + with: + ref: ${{ inputs.git_ref }} + fetch-depth: 0 + ssh-key: ${{ secrets.GIT_SSH_KEY }} + + - name: Set up Java ${{ inputs.java_version }} + uses: actions/setup-java@v4 + with: + java-version: ${{ inputs.java_version }} + distribution: ${{ inputs.java_distribution }} + cache: maven + + - name: Copy maven settings + if: ${{ inputs.settings-xml_file != '' }} + run: | + wget ${{ inputs.settings-xml_file }} -O ~/.m2/settings.xml + + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + + - name: Validate version input + shell: bash + env: + GHA_MAVENCENTRAL_VERSION: ${{ inputs.version }} + run: | + if [ -z "$GHA_MAVENCENTRAL_VERSION" ]; then + echo "Error: version input is required for this workflow" + exit 1 + fi + echo "Using version: $GHA_MAVENCENTRAL_VERSION" + + - name: Set version + if: ${{ inputs.skip_version_update == false }} + shell: bash + env: + GHA_MAVENCENTRAL_VERSION_FILE_NAME: ${{ inputs.version_file_name}} + GHA_MAVENCENTRAL_VERSION: ${{ inputs.version }} + JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }} + JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + run: | + mvn -B versions:set -f $GHA_MAVENCENTRAL_VERSION_FILE_NAME -DnewVersion=$GHA_MAVENCENTRAL_VERSION -DgenerateBackupPoms=false -DprocessAllModules=true + + - name: JReleaser Release to Maven Central + id: release + uses: entur/gha-maven-central/.github/actions/jreleaser-release@v1 + with: + version: ${{ inputs.version }} + version_tag_prefix: ${{ inputs.version_tag_prefix }} + github_token: ${{ secrets.GITHUB_TOKEN }} + sonatype_username: ${{ secrets.SONATYPE_AUTH_USER }} + sonatype_password: ${{ secrets.SONATYPE_AUTH_TOKEN }} + gpg_public_key: ${{ secrets.SONATYPE_GPG_KEY_PUBLIC }} + gpg_secret_key: ${{ secrets.SONATYPE_GPG_KEY }} + gpg_passphrase: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }} + artifactory_user: ${{ secrets.ARTIFACTORY_AUTH_USER }} + artifactory_token: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + + - name: Upload Build Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: jreleaser-reports + path: | + **/target/site + **/target/reports/ + **/target/surefire-reports \ No newline at end of file diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 2d9f854..0000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Build and push -on: - push: - branches: - - master - pull_request: - branches: - - master -env: - JFROG_USER: ${{ secrets.ARTIFACTORY_AUTH_USER }} - JFROG_PASS: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} - -jobs: - maven-package: - if: "!contains(github.event.head_commit.message, 'ci skip')" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install xmlstarlet - run: | - sudo rm -rf /var/lib/apt/lists/* - sudo apt-get update - sudo apt-get -y install xmlstarlet - - name: Copy maven settings - run: | - wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml - - uses: actions/setup-java@v4 - with: - java-version: 17.0.15 - distribution: temurin - - name: Cache Maven dependencies - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - ${{ runner.os }}-maven- - ${{ runner.os }}- - - - name: Run maven build - run: mvn package -s .github/workflows/settings.xml - - name: Sonar Scan - env: - SONAR_TOKEN: ${{ secrets.ENTUR_SONAR_PASSWORD }} - SONAR_PROJECT_NAME: ${{ github.event.repository.name }} - SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} - run: | - mvn -Psonar -s .github/workflows/settings.xml \ - org.jacoco:jacoco-maven-plugin:prepare-agent verify \ - org.jacoco:jacoco-maven-plugin:report sonar:sonar \ - -Dmaven.main.skip \ - -DskipTests \ - -Dsonar.projectKey=${SONAR_PROJECT_KEY} \ - -Dsonar.organization=enturas-github \ - -Dsonar.projectName=${SONAR_PROJECT_NAME} \ - -Dsonar.host.url=https://sonarcloud.io \ - -Dsonar.token=${SONAR_TOKEN} - - deploy-artifactory: - if: github.repository_owner == 'entur' && github.event_name == 'push' && github.ref == 'refs/heads/master' - needs: [maven-package] - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Install xmlstarlet - run: | - sudo rm -rf /var/lib/apt/lists/* - sudo apt-get update - sudo apt-get -y install xmlstarlet - - name: Copy maven settings - run: | - wget https://raw.githubusercontent.com/entur/ror-maven-settings/master/.m2/settings.xml -O .github/workflows/settings.xml - - uses: actions/setup-java@v4 - with: - java-version: 17.0.15 - distribution: temurin - - name: Cache Maven dependencies - uses: actions/cache@v4 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - ${{ runner.os }}-maven- - ${{ runner.os }}- - - - name: Deploy to Entur Artifactory - run: mvn deploy -s .github/workflows/settings.xml -DskipTests - - diff --git a/.github/workflows/release-finish.yml b/.github/workflows/release-finish.yml index 3b8742f..f93f24b 100644 --- a/.github/workflows/release-finish.yml +++ b/.github/workflows/release-finish.yml @@ -23,7 +23,7 @@ on: jobs: release-finish: - uses: entur/ror-gha-workflows/.github/workflows/release-finish.yml@v1 + uses: ./.github/workflows/gitflow-release-finish.yml with: release_branch: ${{ inputs.release_branch }} next_version_increment: ${{ inputs.next_version_increment }} @@ -33,6 +33,6 @@ jobs: java_version: 11 java_distribution: liberica version_tag_prefix: v - artifact_group_id: io.entur - artifact_ids: osm-to-netex-beta,osm-to-netex-beta-cli + artifact_group_id: org.entur + artifact_ids: netex-java-model secrets: inherit \ No newline at end of file diff --git a/.github/workflows/release-manual.yml b/.github/workflows/release-manual.yml index 917a348..177b328 100644 --- a/.github/workflows/release-manual.yml +++ b/.github/workflows/release-manual.yml @@ -11,14 +11,74 @@ on: description: 'Git tag to release (e.g., v2.0.16). Tag must already exist!' required: true type: string + version: + description: 'Version to release (if different from tag, e.g., 2.0.16)' + required: false + type: string jobs: publish-release: name: Publish release to Maven Central - uses: entur/ror-gha-workflows/.github/workflows/release-manual.yml@v1 - with: - git_ref: ${{ inputs.git_ref }} - java_version: 11 - java_distribution: liberica - version_tag_prefix: v - secrets: inherit \ No newline at end of file + runs-on: ubuntu-24.04 + env: + JRELEASER_MAVENCENTRAL_URL: "https://central.sonatype.com/api/v1/publisher" + JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_ACTIVE: "RELEASE" + JRELEASER_DEPLOY_MAVEN_NEXUS2_ACTIVE: "SNAPSHOT" + JRELEASER_NEXUS2_URL: "https://ossrh-staging-api.central.sonatype.com/service/local" + JRELEASER_NEXUS2_SNAPSHOT_URL: "https://central.sonatype.com/repository/maven-snapshots" + JRELEASER_OVERWRITE: true + JRELEASER_UPDATE: true + JRELEASER_GIT_ROOT_SEARCH: true + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.git_ref }} + fetch-depth: 0 + + - uses: actions/setup-java@v4 + with: + java-version: 11 + distribution: liberica + cache: maven + + - name: Install xmlstarlet + run: | + sudo rm -rf /var/lib/apt/lists/* + sudo apt-get update + sudo apt-get -y install xmlstarlet + + - name: Get version from tag or input + id: get_version + run: | + if [ -n "${{ github.event.inputs.version }}" ]; then + VERSION="${{ github.event.inputs.version }}" + else + GIT_REF="${{ github.event.inputs.git_ref }}" + VERSION="${GIT_REF#v}" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Publishing version: $VERSION" + + - name: JReleaser Release to Maven Central + uses: entur/gha-maven-central/.github/actions/jreleaser-release@v1 + with: + version: ${{ steps.get_version.outputs.version }} + version_tag_prefix: v + github_token: ${{ secrets.GITHUB_TOKEN }} + sonatype_username: ${{ secrets.SONATYPE_AUTH_USER }} + sonatype_password: ${{ secrets.SONATYPE_AUTH_TOKEN }} + gpg_public_key: ${{ secrets.SONATYPE_GPG_KEY_PUBLIC }} + gpg_secret_key: ${{ secrets.SONATYPE_GPG_KEY }} + gpg_passphrase: ${{ secrets.SONATYPE_GPG_KEY_PASSWORD }} + artifactory_user: ${{ secrets.ARTIFACTORY_AUTH_USER }} + artifactory_token: ${{ secrets.ARTIFACTORY_AUTH_TOKEN }} + + - name: Upload Build Reports + if: failure() + uses: actions/upload-artifact@v4 + with: + name: jreleaser-reports + path: | + **/target/site + **/target/reports/ + **/target/surefire-reports \ No newline at end of file From 9884d74386f3e2da3d2a2f2b25aa45bfc92ae477 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Mon, 19 Jan 2026 13:49:51 +0100 Subject: [PATCH 52/53] update deploy.yml --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c35b21a..7b675b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,8 +50,7 @@ jobs: SONAR_PROJECT_NAME: ${{ github.event.repository.name }} SONAR_PROJECT_KEY: entur_${{ github.event.repository.name }} run: | - mvn -Psonar -s .github/workflows/settings.xml \ - org.jacoco:jacoco-maven-plugin:prepare-agent verify \ + mvn -Psonar org.jacoco:jacoco-maven-plugin:prepare-agent verify \ org.jacoco:jacoco-maven-plugin:report sonar:sonar \ -Dmaven.main.skip \ -DskipTests \ From 3376e774b06e51e32802e282db89a96d39e34c85 Mon Sep 17 00:00:00 2001 From: Assad Riaz Date: Mon, 19 Jan 2026 14:59:09 +0100 Subject: [PATCH 53/53] update deploy.yml, use java 17 --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7b675b9..5858e8d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: sudo apt-get -y install xmlstarlet - uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 17 distribution: liberica - name: Cache Maven dependencies uses: actions/cache@v4