From 4ebbcb01ae8d73be14ed97d3f1a8d1282b3b1c75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:07:29 +0000 Subject: [PATCH 01/15] Update dependency org.mozilla:rhino to v1.8.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 452375fb..43519ce0 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208' - implementation 'org.mozilla:rhino:1.7.13' + implementation 'org.mozilla:rhino:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From f7fe09a29454b0fbaaead1817d0f72360c7a6326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 09:53:53 +0100 Subject: [PATCH 02/15] Switch to rhino-all.jar, Helma needs the full Rhino experience --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 43519ce0..e920c689 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208' - implementation 'org.mozilla:rhino:1.8.0' + implementation 'org.mozilla:rhino-all:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From 28887aaccde077a1e2c17f256100b30244d755be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 09:32:00 +0000 Subject: [PATCH 03/15] Update dependency org.mozilla:rhino to v1.8.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 38eb392b..6bb788b9 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826' implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826' - implementation 'org.mozilla:rhino:1.7.13' + implementation 'org.mozilla:rhino:1.8.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'xerces:xercesImpl:2.12.2' implementation 'xmlrpc:xmlrpc:2.0.1' From cbb6599ce0e8c3689af8d990cdc9b710e9bab26b Mon Sep 17 00:00:00 2001 From: tobi Date: Fri, 3 Jan 2025 11:46:46 +0000 Subject: [PATCH 04/15] Add Renovate workflow --- .github/workflows/renovate.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/renovate.yml diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 00000000..2fcf99f1 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,40 @@ +name: Run Renovate + +on: + workflow_dispatch + #schedule: + # - cron: "13 * * * *" + +jobs: + renovate: + runs-on: antville + + steps: + - uses: actions/checkout@v4 + + - name: Run Renovate + run: npx renovate + env: + # Renovate is using this token to retrieve release notes + GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} + # See + LOG_LEVEL: info # debug | info | warn | error | fatal + RENOVATE_AUTODISCOVER: 'true' + RENOVATE_CONFIG_FILE: renovate.json + RENOVATE_ENDPOINT: ${{ github.api_url }} + RENOVATE_GIT_AUTHOR: Renovate Bot + #RENOVATE_GIT_IGNORED_AUTHORS: + # - 29139614+renovate[bot]@users.noreply.github.com + RENOVATE_IGNORE_PR_AUTHOR: 'true' + RENOVATE_LOG_FILE: renovate-log.ndjson + RENOVATE_LOG_FILE_LEVEL: debug + RENOVATE_PLATFORM: gitea + RENOVATE_REPOSITORY_CACHE: 'enabled' + # github.token is not working here, it lacks some permissions required by Renovate + RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} + + - name: Save log file + uses: actions/upload-artifact@v3 + with: + name: renovate-log.ndjson + path: renovate-log.ndjson From 3284a1ca19340b949b769fd6b17250264820856b Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 3 Jan 2025 11:57:30 +0000 Subject: [PATCH 05/15] Update actions/upload-artifact action to v4 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 2fcf99f1..27f81ba1 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -34,7 +34,7 @@ jobs: RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} - name: Save log file - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: renovate-log.ndjson path: renovate-log.ndjson From c1e9371f6bc4614d5f1f5527f87719b44a05a463 Mon Sep 17 00:00:00 2001 From: tobi Date: Fri, 3 Jan 2025 11:59:50 +0000 Subject: [PATCH 06/15] Update .github/workflows/renovate.yml --- .github/workflows/renovate.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 2fcf99f1..f35a2569 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -1,9 +1,8 @@ name: Run Renovate on: - workflow_dispatch - #schedule: - # - cron: "13 * * * *" + schedule: + - cron: "13 * * * *" jobs: renovate: @@ -31,7 +30,7 @@ jobs: RENOVATE_PLATFORM: gitea RENOVATE_REPOSITORY_CACHE: 'enabled' # github.token is not working here, it lacks some permissions required by Renovate - RENOVATE_TOKEN: ${{ secrets.renovate_token }} #${{ github.token }} + RENOVATE_TOKEN: ${{ secrets.renovate_token }} - name: Save log file uses: actions/upload-artifact@v3 From c2b37a8243a6a52e8e0bffeb114198160bd205da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 13:35:33 +0100 Subject: [PATCH 07/15] Update workflows for Forgejo runner --- .github/workflows/deploy.yml | 9 +-------- .github/workflows/release.yml | 17 +++++------------ .github/workflows/stage.yml | 20 ++------------------ 3 files changed, 8 insertions(+), 38 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c01702e5..cdad2c55 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,19 +4,12 @@ on: workflow_dispatch jobs: deploy: - runs-on: ubuntu-latest + runs-on: antville environment: name: weblogs.at url: https://weblogs.at steps: - - name: Set up SSH agent - uses: antville/helma/.github/actions/ssh@helma-🐜 - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - name: Copy files to production server run: ssh staging-server deploy-helma diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59d8f365..b189f260 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: antville env: GH_TOKEN: ${{ github.token }} @@ -19,27 +19,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle run: ./gradlew assembleDist - name: Create release + # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - gh release create "$GITHUB_REF_NAME" \ + echo gh release create "$GITHUB_REF_NAME" \ --repo "$GITHUB_REPOSITORY" \ --title "$(date +'%d %b %Y')" \ --generate-notes - name: Upload assets + # FIXME: Currently only outputs gh command; adapt for Forgejo run: | - gh release upload "$GITHUB_REF_NAME" \ + echo gh release upload "$GITHUB_REF_NAME" \ build/distributions/helma-*.* \ --clobber diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index eac49cc3..17e693d4 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -4,31 +4,15 @@ on: workflow_dispatch jobs: stage: - runs-on: ubuntu-latest + runs-on: antville environment: name: stage - url: https://antville-test.online + url: ${{ vars.stage_url }} steps: - uses: actions/checkout@v4 - - name: Set up SSH agent - uses: ./.github/actions/ssh - with: - config: ${{ vars.SSH_CONFIG }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - known-hosts: ${{ vars.SSH_KNOWN_HOSTS }} - - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 21 - - - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4 - - name: Build with Gradle run: ./gradlew installDist From 66fa98353ee5287aae50a6c864b248ed5f095c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:22:23 +0100 Subject: [PATCH 08/15] Add the actual version string to helma.main.Server again --- build.gradle | 1 + src/main/java/helma/main/Server.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 620f953f..abf4287f 100644 --- a/build.gradle +++ b/build.gradle @@ -172,6 +172,7 @@ tasks.register('processSource', Sync) { line -> line .replaceAll('__builddate__', new Date().format("d MMM yyyy")) .replaceAll('__commithash__', gitOutput.toString().trim()) + .replaceAll('__version__', version) } into "${project.buildDir}/src" } diff --git a/src/main/java/helma/main/Server.java b/src/main/java/helma/main/Server.java index b747f11e..90564689 100644 --- a/src/main/java/helma/main/Server.java +++ b/src/main/java/helma/main/Server.java @@ -36,7 +36,7 @@ import helma.util.ResourceProperties; */ public class Server implements Runnable { // version string - public static final String version = "🐜"; + public static final String version = "__version__"; // build date public static final String buildDate = "__builddate__"; From d10f8d6d90c492533677ffca2a15234905cb0485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:22:47 +0100 Subject: [PATCH 09/15] Replace elaborate checks for Java version with single one for Java 11 --- src/main/java/helma/main/Server.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/helma/main/Server.java b/src/main/java/helma/main/Server.java index 90564689..6155de3b 100644 --- a/src/main/java/helma/main/Server.java +++ b/src/main/java/helma/main/Server.java @@ -151,13 +151,8 @@ public class Server implements Runnable { public static void checkJavaVersion() { String javaVersion = System.getProperty("java.version"); - if ((javaVersion == null) || javaVersion.startsWith("1.5") - || javaVersion.startsWith("1.4") - || javaVersion.startsWith("1.3") - || javaVersion.startsWith("1.2") - || javaVersion.startsWith("1.1") - || javaVersion.startsWith("1.0")) { - System.err.println("This version of Helma requires Java 1.6 or greater."); + if ((javaVersion == null) || !javaVersion.startsWith("11")) { + System.err.println("This version of Helma requires Java 11 or greater."); if (javaVersion == null) { // don't think this will ever happen, but you never know System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version."); From d18513fb764326d005de1362e7280c04dee76ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:50:47 +0100 Subject: [PATCH 10/15] Downgrade upload-artifact action again v4 causes an error --- .github/workflows/renovate.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index e2bab10d..6c163a9d 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -22,7 +22,7 @@ jobs: RENOVATE_CONFIG_FILE: renovate.json RENOVATE_ENDPOINT: ${{ github.api_url }} RENOVATE_GIT_AUTHOR: Renovate Bot - #RENOVATE_GIT_IGNORED_AUTHORS: + #RENOVATE_GIT_IGNORED_AUTHORS: # - 29139614+renovate[bot]@users.noreply.github.com RENOVATE_IGNORE_PR_AUTHOR: 'true' RENOVATE_LOG_FILE: renovate-log.ndjson @@ -33,7 +33,8 @@ jobs: RENOVATE_TOKEN: ${{ secrets.renovate_token }} - name: Save log file - uses: actions/upload-artifact@v4 + # FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”) + uses: actions/upload-artifact@v3 with: name: renovate-log.ndjson path: renovate-log.ndjson From 6d355fc5bdc443f629c3fdc3998fbcd0d911b58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:55:49 +0100 Subject: [PATCH 11/15] Allow manual trigger of Renovate workflow --- .github/workflows/renovate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 6c163a9d..230c84e6 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -3,6 +3,7 @@ name: Run Renovate on: schedule: - cron: "13 * * * *" + workflow_dispatch: jobs: renovate: From 1341c241bdde482ddb64f4e853dbe506ca90d86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 15:58:31 +0100 Subject: [PATCH 12/15] Replace Renovate autodiscovery with explicitly setting the repository --- .github/workflows/renovate.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 230c84e6..64b55a82 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -19,7 +19,8 @@ jobs: GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} # See LOG_LEVEL: info # debug | info | warn | error | fatal - RENOVATE_AUTODISCOVER: 'true' + # Autodiscover is better suited for an extra repo running Renovate on all desired repos + #RENOVATE_AUTODISCOVER: 'true' RENOVATE_CONFIG_FILE: renovate.json RENOVATE_ENDPOINT: ${{ github.api_url }} RENOVATE_GIT_AUTHOR: Renovate Bot @@ -29,6 +30,7 @@ jobs: RENOVATE_LOG_FILE: renovate-log.ndjson RENOVATE_LOG_FILE_LEVEL: debug RENOVATE_PLATFORM: gitea + RENOVATE_REPOSITORIES: ${{ github.repository }} RENOVATE_REPOSITORY_CACHE: 'enabled' # github.token is not working here, it lacks some permissions required by Renovate RENOVATE_TOKEN: ${{ secrets.renovate_token }} From 0fc7d9134858e27223dd32fc82067996754561e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 16:06:15 +0100 Subject: [PATCH 13/15] Always save the Renovate log --- .github/workflows/renovate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 64b55a82..26dc20ad 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -38,6 +38,7 @@ jobs: - name: Save log file # FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”) uses: actions/upload-artifact@v3 + if: always() with: name: renovate-log.ndjson path: renovate-log.ndjson From f7add5ec47643ce626986bc37bfc80fd21a9a5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Sch=C3=A4fer?= Date: Fri, 3 Jan 2025 16:20:01 +0100 Subject: [PATCH 14/15] Looks like setting the LOG_LEVEL variable in the env section does not work Setting it before the npx command does --- .github/workflows/renovate.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 26dc20ad..e470128c 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -13,12 +13,12 @@ jobs: - uses: actions/checkout@v4 - name: Run Renovate - run: npx renovate + # See + # debug | info | warn | error | fatal + run: LOG_LEVEL=info npx renovate env: # Renovate is using this token to retrieve release notes GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }} - # See - LOG_LEVEL: info # debug | info | warn | error | fatal # Autodiscover is better suited for an extra repo running Renovate on all desired repos #RENOVATE_AUTODISCOVER: 'true' RENOVATE_CONFIG_FILE: renovate.json From cb07313509afe0fb568b6485e56fb15d307bc38a Mon Sep 17 00:00:00 2001 From: tobi Date: Fri, 3 Jan 2025 20:08:00 +0000 Subject: [PATCH 15/15] Remove obsolete Renovate config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Git author is set via access token (renovate-bot) * Ignored Git and PR authors should not be necessary, anymore 🤞 --- .github/workflows/renovate.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index e470128c..847df5c7 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -23,10 +23,6 @@ jobs: #RENOVATE_AUTODISCOVER: 'true' RENOVATE_CONFIG_FILE: renovate.json RENOVATE_ENDPOINT: ${{ github.api_url }} - RENOVATE_GIT_AUTHOR: Renovate Bot - #RENOVATE_GIT_IGNORED_AUTHORS: - # - 29139614+renovate[bot]@users.noreply.github.com - RENOVATE_IGNORE_PR_AUTHOR: 'true' RENOVATE_LOG_FILE: renovate-log.ndjson RENOVATE_LOG_FILE_LEVEL: debug RENOVATE_PLATFORM: gitea