From 3757a136bed2fc0775b3790f2704f346fb25833d Mon Sep 17 00:00:00 2001 From: Yuri Blankenstein Date: Mon, 22 Jun 2026 17:00:24 +0200 Subject: [PATCH 1/2] [#21] prepared builds for CI/CD (TODO: deployment) --- .../{build_main.yml => build_nightly.yml} | 15 +++-- .github/workflows/build_pull_request.yml | 55 +++++++++++++++++++ .../{build_tag.yml => build_release.yml} | 3 +- .../nl.esi.pps.target.target | 4 +- releng/nl.esi.pps.website/pom.xml | 25 --------- 5 files changed, 69 insertions(+), 33 deletions(-) rename .github/workflows/{build_main.yml => build_nightly.yml} (80%) create mode 100644 .github/workflows/build_pull_request.yml rename .github/workflows/{build_tag.yml => build_release.yml} (96%) diff --git a/.github/workflows/build_main.yml b/.github/workflows/build_nightly.yml similarity index 80% rename from .github/workflows/build_main.yml rename to .github/workflows/build_nightly.yml index b9fd5088..b7001353 100644 --- a/.github/workflows/build_main.yml +++ b/.github/workflows/build_nightly.yml @@ -20,14 +20,13 @@ name: Build and Test PPS on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: [ "develop" ] jobs: build: - runs-on: ubuntu-latest + env: + MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED steps: - name: Checkout @@ -43,8 +42,14 @@ jobs: if: success() || failure() uses: scacap/action-surefire-report@v1 - name: Attach Website - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: PPS-website path: releng/nl.esi.pps.website/target/website retention-days: 5 + - name: Attach Update-Site + uses: actions/upload-artifact@v7 + with: + name: PPS-update-site + path: products/nl.esi.pps.product/target/repository + retention-days: 5 diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml new file mode 100644 index 00000000..16663407 --- /dev/null +++ b/.github/workflows/build_pull_request.yml @@ -0,0 +1,55 @@ +# +# Copyright (c) 2018-2023 TNO and Contributors to the GitHub community +# +# This program and the accompanying materials are made available +# under the terms of the MIT License which is available at +# https://opensource.org/licenses/MIT +# +# SPDX-License-Identifier: MIT +# + +# This workflow will build PPS with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Build and Test PPS + +on: + pull_request: + branches: [ "main", "develop" ] + +jobs: + build: + runs-on: ubuntu-latest + env: + MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Maven Action + uses: s4u/setup-maven-action@v1.18.0 + with: + java-version: 21 + java-distribution: temurin + - name: Build and Test with Maven + run: mvn verify --batch-mode --update-snapshots --fail-at-end --file pom.xml -Dpps.version.qualifier=$(./versionQualifier.sh) + - name: Attach Test Report + if: success() || failure() + uses: scacap/action-surefire-report@v1 + - name: Attach Website + uses: actions/upload-artifact@v7 + with: + name: PPS-website + path: releng/nl.esi.pps.website/target/website + retention-days: 5 + - name: Attach Update-Site + uses: actions/upload-artifact@v7 + with: + name: PPS-update-site + path: products/nl.esi.pps.product/target/repository + retention-days: 5 diff --git a/.github/workflows/build_tag.yml b/.github/workflows/build_release.yml similarity index 96% rename from .github/workflows/build_tag.yml rename to .github/workflows/build_release.yml index 965b7d13..da2acc80 100644 --- a/.github/workflows/build_tag.yml +++ b/.github/workflows/build_release.yml @@ -25,10 +25,10 @@ on: jobs: build: - runs-on: ubuntu-latest env: MAVEN_OPTS: --add-opens java.base/java.lang=ALL-UNNAMED + steps: - name: Checkout uses: actions/checkout@v4 @@ -47,4 +47,5 @@ jobs: with: files: | products/nl.esi.pps.product/target/products/pps-*.zip + products/nl.esi.pps.product/target/pps-*.zip releng/nl.esi.pps.website/target/pps-*.zip \ No newline at end of file diff --git a/releng/nl.esi.pps.target/nl.esi.pps.target.target b/releng/nl.esi.pps.target/nl.esi.pps.target.target index d5bd855b..c733fab0 100644 --- a/releng/nl.esi.pps.target/nl.esi.pps.target.target +++ b/releng/nl.esi.pps.target/nl.esi.pps.target.target @@ -1,6 +1,6 @@ - + @@ -164,7 +164,7 @@ - + diff --git a/releng/nl.esi.pps.website/pom.xml b/releng/nl.esi.pps.website/pom.xml index bffc99ca..3d436a02 100644 --- a/releng/nl.esi.pps.website/pom.xml +++ b/releng/nl.esi.pps.website/pom.xml @@ -45,13 +45,6 @@ website zip - - - ${project.groupId} - nl.esi.pps.product - ${project.version} - zip - @@ -127,24 +120,6 @@ ${project.build.directory}/website/developerguide - - unpack-update-site - prepare-package - - unpack - - - - - ${project.groupId} - nl.esi.pps.product - ${project.version} - zip - - - ${project.build.directory}/website/update-site/${pps.version.enduser} - - From 82020ea18dcceaeb2e16df072c1b379d5afac816 Mon Sep 17 00:00:00 2001 From: Yuri Blankenstein Date: Tue, 23 Jun 2026 11:22:46 +0200 Subject: [PATCH 2/2] [#21] Add deployment --- .github/workflows/build_nightly.yml | 12 +++++++++++- .github/workflows/build_pull_request.yml | 2 +- .github/workflows/build_release.yml | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_nightly.yml b/.github/workflows/build_nightly.yml index b7001353..c4984f73 100644 --- a/.github/workflows/build_nightly.yml +++ b/.github/workflows/build_nightly.yml @@ -16,7 +16,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build and Test PPS +name: Build and Test PPS (Nightly) on: push: @@ -53,3 +53,13 @@ jobs: name: PPS-update-site path: products/nl.esi.pps.product/target/repository retention-days: 5 + + # Deploy P2 Repository to GitHub Pages for nightly builds + - name: Deploy P2 Repository (Nightly) + if: success() + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./products/nl.esi.pps.product/target/repository + destination_dir: update-site/nightly + keep_files: false diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index 16663407..cee59922 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -16,7 +16,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build and Test PPS +name: Build and Test PPS (Pull Request) on: pull_request: diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index da2acc80..cc33aef3 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -16,12 +16,12 @@ # separate terms of service, privacy policy, and support # documentation. -name: Build and Test PPS +name: Build and Test PPS (Release) on: push: tags: - - "v*" + - "v*.*.*" jobs: build: @@ -48,4 +48,14 @@ jobs: files: | products/nl.esi.pps.product/target/products/pps-*.zip products/nl.esi.pps.product/target/pps-*.zip - releng/nl.esi.pps.website/target/pps-*.zip \ No newline at end of file + releng/nl.esi.pps.website/target/pps-*.zip + + # Deploy P2 Repository to GitHub Pages for nightly builds + - name: Deploy P2 Repository (Release) + if: success() + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./products/nl.esi.pps.product/target/repository + destination_dir: update-site/${{ github.ref_name }} + keep_files: true