From 843acf00d18caea236bd9a620a20d50e060449d4 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:16:36 +0200 Subject: [PATCH 01/95] Update .gitattributes --- .gitattributes | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitattributes b/.gitattributes index dfe0770..9c74e42 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,9 @@ # Auto detect text files and perform LF normalization * text=auto + +# Force sh files to have LF +*.sh text eol=lf + +# Force MVN Wrapper Linux files LF +mvnw text eol=lf +.mvn/wrapper/maven-wrapper.properties text eol=lf From 81cb6a5a1c06093652032b1b6565e88c2d816647 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:18:14 +0200 Subject: [PATCH 02/95] Update .gitattributes --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index dfe0770..0f9f33e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ # Auto detect text files and perform LF normalization * text=auto + +# Force sh files to have LF +*.sh text eol=lf From eafa314e3a3396f49fc725c40a39770b2195a984 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 24 Apr 2024 13:15:04 +0200 Subject: [PATCH 03/95] Improve readme Co-Authored-By: Johannes Rabauer <8188460+johannesrabauer@users.noreply.github.com> --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 8aebd84..6ad00f8 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,12 @@ A re-implementation of [Testcontainer Selenium/WebDriver](https://java.testconta * Everything can be ``@Override``n if required * Caches "Selenium version detection via classpath" so that it's not invoked everytime you build a new container +## Usage +Usage is very similar to [Testcontainers default implementation](https://java.testcontainers.org/modules/webdriver_containers/). + +Make sure to remove the original Testcontainer Webdrivers dependency to avert any mix ups while using the library. +For more information take a look at our demo. + ## Installation [Installation guide for the latest release](https://github.com/xdev-software/testcontainers-selenium/releases/latest#Installation) From ac92746e5c5e96e883c8241312b9d3dd7a2cfe10 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 24 Apr 2024 13:51:40 +0200 Subject: [PATCH 04/95] Update README.md Co-Authored-By: Johannes Rabauer <8188460+johannesrabauer@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ad00f8..81e405f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ A re-implementation of [Testcontainer Selenium/WebDriver](https://java.testconta Usage is very similar to [Testcontainers default implementation](https://java.testcontainers.org/modules/webdriver_containers/). Make sure to remove the original Testcontainer Webdrivers dependency to avert any mix ups while using the library. -For more information take a look at our demo. +For more information take a look at [our demo](./testcontainers-selenium-demo/src/main/java/software/xdev/Application.java). ## Installation [Installation guide for the latest release](https://github.com/xdev-software/testcontainers-selenium/releases/latest#Installation) From 2fddb4f8d67802420c6fe5ab905874257474528c Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 29 Apr 2024 02:19:20 +0000 Subject: [PATCH 05/95] Update dependency com.puppycrawl.tools:checkstyle to v10.16.0 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 78b4a3e..863e7bb 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -90,7 +90,7 @@ com.puppycrawl.tools checkstyle - 10.15.0 + 10.16.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index b72a766..f05847e 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -230,7 +230,7 @@ com.puppycrawl.tools checkstyle - 10.15.0 + 10.16.0 From 80ca5915702edf25a92c75751418498dc8b09433 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 30 Apr 2024 11:20:37 +0200 Subject: [PATCH 06/95] Enable ``includeTestSourceDirectory`` Fix #48 --- template-placeholder-demo/pom.xml | 1 + template-placeholder/pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 863e7bb..b319445 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -95,6 +95,7 @@ ../.config/checkstyle/checkstyle.xml + true diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index f05847e..881534d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -235,6 +235,7 @@ ../.config/checkstyle/checkstyle.xml + true From 43f018d33b1dad80bdec4b3aa0dcf5b32fbfbe27 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 30 Apr 2024 14:50:46 +0200 Subject: [PATCH 07/95] Group selenium --- renovate.json5 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/renovate.json5 b/renovate.json5 index 11a77b2..3112848 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,4 +1,16 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "rebaseWhen": "behind-base-branch" + "rebaseWhen": "behind-base-branch", + "packageRules": [ + { + "description": "Group Selenium", + "matchPackagePatterns": [ + "^org.seleniumhq.selenium" + ], + "datasources": [ + "maven" + ], + "groupName": "org.seleniumhq.selenium" + } + ] } From bd73e6b88ddf4b2cf063a018c847e904e48c8e62 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Tue, 30 Apr 2024 12:52:34 +0000 Subject: [PATCH 08/95] Update org.seleniumhq.selenium to v4.20.0 --- testcontainers-selenium-demo/pom.xml | 2 +- testcontainers-selenium/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index ae31ce6..d5ce6a3 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -29,7 +29,7 @@ org.seleniumhq.selenium selenium-dependencies-bom - 4.19.1 + 4.20.0 pom import diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 846d3ff..1fffabc 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -104,7 +104,7 @@ org.seleniumhq.selenium selenium-api - 4.19.1 + 4.20.0 provided @@ -124,7 +124,7 @@ org.seleniumhq.selenium selenium-remote-driver - 4.19.1 + 4.20.0 test @@ -142,13 +142,13 @@ org.seleniumhq.selenium selenium-support - 4.19.1 + 4.20.0 test org.seleniumhq.selenium selenium-firefox-driver - 4.19.1 + 4.20.0 test @@ -161,7 +161,7 @@ org.seleniumhq.selenium selenium-chrome-driver - 4.19.1 + 4.20.0 test From 2afe2fce60b15901230c31f68854c54919611799 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 6 May 2024 16:35:52 +0200 Subject: [PATCH 09/95] Update CONTRIBUTING.md Add note about (stealthy) Sonarlint telemetry --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d241a28..71adf87 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,7 @@ You should have the following things installed: * Install the following plugins: * [Save Actions](https://plugins.jetbrains.com/plugin/22113) - Provides save actions, like running the formatter or adding ``final`` to fields * [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis + * You may consider disabling telemetry in the settings under ``Tools > Sonarlint -> About`` * [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis * Import the project * Ensure that everything is encoded in ``UTF-8`` From 451d36f3e2427c999d371ab07438ccb1ccd738d4 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 9 May 2024 02:20:36 +0000 Subject: [PATCH 10/95] Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.0-M14 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 881534d..0bf57cb 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -90,7 +90,7 @@ org.apache.maven.plugins maven-site-plugin - 4.0.0-M13 + 4.0.0-M14 org.apache.maven.plugins From 75bf8319e325f3ef4db2c2a509c1612807e2c243 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 9 May 2024 02:21:04 +0000 Subject: [PATCH 11/95] Update dependency org.testcontainers:testcontainers to v1.19.8 --- testcontainers-selenium/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 1fffabc..cddb4c7 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -91,7 +91,7 @@ org.testcontainers testcontainers - 1.19.7 + 1.19.8 From 5a2a8da2c515f0ceb7c0c66d8f95c0049bf35c45 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 12 May 2024 02:22:20 +0000 Subject: [PATCH 12/95] Update dependency com.mycila:license-maven-plugin to v4.5 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 881534d..3b07391 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -103,7 +103,7 @@ com.mycila license-maven-plugin - 4.3 + 4.5 ${project.organization.url} From 0effe0a8a8e89c35d0c533440977bf62993a8cec Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 13:37:44 +0200 Subject: [PATCH 13/95] Create issue templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 68 ++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 7 +++ .github/ISSUE_TEMPLATE/enhancement.yml | 32 ++++++++++++ .github/ISSUE_TEMPLATE/question.yml | 31 ++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/enhancement.yml create mode 100644 .github/ISSUE_TEMPLATE/question.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..68299d5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,68 @@ +name: 🐞 Bug +description: Create a bug report for something that is broken +labels: [bug] +body: + - type: markdown + attributes: + value: | + Thank you for reporting a bug. + + Please fill in as much information as possible about your bug so that we don't have to play "information ping-pong" and can help you immediately. + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)" + required: true + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + required: true + - label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise." + required: true + - label: "This issue contains only one bug." + required: true + + - type: input + id: app-version + attributes: + label: Affected version + description: "In which version did you encounter the bug?" + placeholder: "x.x.x" + validations: + required: true + + - type: textarea + id: steps-to-reproduce + attributes: + label: Steps to reproduce the bug + description: | + What did you do for the bug to show up? + + If you can't cause the bug to show up again reliably (and hence don't have a proper set of steps to give us), please still try to give as many details as possible on how you think you encountered the bug. + placeholder: | + 1. Use '...' + 2. Do '...' + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: | + Tell us what you expect to happen. + + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: | + Tell us what happens with the steps given above. + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: | + Any other relevant information you'd like to include diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..302a7c1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,7 @@ +contact_links: + - name: 💬 Contact support + url: https://xdev.software/en/services/support + about: "If you need support as soon as possible or/and you can't wait for any pull request" + - name: 🐱‍💻 Security vulnerability + url: https://github.com/xdev-software/template-placeholder/security/advisories/new + about: "If you found a security vulnerability report it here" diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml new file mode 100644 index 0000000..7523129 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -0,0 +1,32 @@ +name: ✨ Feature/Enhancement +description: Suggest a new feature or enhancement +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Thank you for suggesting a new feature/enhancement. + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + required: true + - label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise." + required: true + - label: "This issue contains only one feature request/enhancement." + required: true + + - type: textarea + id: description + attributes: + label: Description + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional information diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..6ecd6ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,31 @@ +name: ❓ Question +description: Ask a question +labels: [question] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this form! + + - type: checkboxes + id: checklist + attributes: + label: "Checklist" + options: + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + required: true + - label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise." + required: true + + - type: textarea + id: what-is-the-question + attributes: + label: What is/are your question(s)? + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: "Any other information you'd like to include - for instance logs, screenshots, etc." From ab0a8d2cb906f5ad6b4a702f29ae2829349ad157 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 13:38:00 +0200 Subject: [PATCH 14/95] Create issue labels automatically --- .github/labels.yml | 35 +++++++++++++++++++++++++++++++ .github/workflows/sync-labels.yml | 24 +++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/labels.yml create mode 100644 .github/workflows/sync-labels.yml diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..3679ae5 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,35 @@ +# Default +## Required for template +- name: bug + description: "Something isn't working" + color: 'd73a4a' +- name: enhancement + description: New feature or request + color: '#a2eeef' +- name: question + description: Information is requested + color: '#d876e3' +## Others +- name: duplicate + description: This already exists + color: '#cfd3d7' +- name: good first issue + description: Good for newcomers + color: '#7057ff' +- name: help wanted + description: Extra attention is needed + color: '#008672' +- name: invalid + description: "This doesn't seem right" + color: '#e4e669' +# Custom +- name: "can't reproduce" + color: '#e95f2c' +- name: customer-requested + description: was requested by a customer of us + color: '#068374' +- name: stale + color: '#ededed' +- name: waiting-for-response + description: If no response is received after a certain time the issue will be closed + color: '#202020' diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml new file mode 100644 index 0000000..ff880f0 --- /dev/null +++ b/.github/workflows/sync-labels.yml @@ -0,0 +1,24 @@ +name: Sync labels + +on: + push: + branches: develop + paths: + - .github/labels.yml + + workflow_dispatch: + +permissions: + issues: write + +jobs: + labels: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: .github/labels.yml + + - uses: EndBug/label-sync@v2 + with: + config-file: .github/labels.yml From 209777d67ea68277111923ae002b8d3e2ccec26a Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Mon, 13 May 2024 13:43:47 +0200 Subject: [PATCH 15/95] Security vulnerabilities are automatically added by GitHub --- .github/ISSUE_TEMPLATE/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 302a7c1..b6fb79b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,6 +2,3 @@ contact_links: - name: 💬 Contact support url: https://xdev.software/en/services/support about: "If you need support as soon as possible or/and you can't wait for any pull request" - - name: 🐱‍💻 Security vulnerability - url: https://github.com/xdev-software/template-placeholder/security/advisories/new - about: "If you found a security vulnerability report it here" From 0c0f9f17f5a34e61f9aecf47339d30df45af878e Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 14:44:44 +0200 Subject: [PATCH 16/95] Add search and report for broken links --- .github/labels.yml | 5 +++- .github/workflows/broken-links.yml | 41 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/broken-links.yml diff --git a/.github/labels.yml b/.github/labels.yml index 3679ae5..1c09985 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -23,10 +23,13 @@ description: "This doesn't seem right" color: '#e4e669' # Custom +- name: automated + description: Created by a 🤖 + color: '#000000' - name: "can't reproduce" color: '#e95f2c' - name: customer-requested - description: was requested by a customer of us + description: Was requested by a customer of us color: '#068374' - name: stale color: '#ededed' diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml new file mode 100644 index 0000000..9b57bd4 --- /dev/null +++ b/.github/workflows/broken-links.yml @@ -0,0 +1,41 @@ +name: Broken links + +on: + workflow_dispatch: + schedule: + - cron: "23 23 * * 0" + +permissions: + issues: write + +jobs: + link-checker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v1 + + - name: Find already existing issue + id: find-issue + run: | + echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ github.token }} + + - name: Close issue if everything is fine + if: env.lychee_exit_code == 0 && steps.find-issue.outputs.number != '' + run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }} + env: + GH_TOKEN: ${{ github.token }} + + - name: Create Issue From File + if: env.lychee_exit_code != 0 + uses: peter-evans/create-issue-from-file@v5 + with: + issue-number: ${{ steps.find-issue.outputs.number }} + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: bug, automated From 89be6d9cfbee3960fcd4d1e197bdffd22efe8913 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 14:55:34 +0200 Subject: [PATCH 17/95] Fix "we can't handle unicode" problems --- .github/labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labels.yml b/.github/labels.yml index 1c09985..325f4ce 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -24,7 +24,7 @@ color: '#e4e669' # Custom - name: automated - description: Created by a 🤖 + description: Created by an automation color: '#000000' - name: "can't reproduce" color: '#e95f2c' From 117e21e14048d60504cc64b9ce4422741398a8a4 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 15:21:41 +0200 Subject: [PATCH 18/95] Add ignore file --- .github/.lycheeignore | 2 ++ .github/workflows/broken-links.yml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 .github/.lycheeignore diff --git a/.github/.lycheeignore b/.github/.lycheeignore new file mode 100644 index 0000000..972ca61 --- /dev/null +++ b/.github/.lycheeignore @@ -0,0 +1,2 @@ +# Ignorefile for broken link check +localhost diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 9b57bd4..96af798 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + - run: mv .github/.lycheeignore .lycheeignore + - name: Link Checker id: lychee uses: lycheeverse/lychee-action@v1 From 8dbbdf91ff9f49dadba0277b776d3f79d6600ce1 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 13 May 2024 15:22:53 +0200 Subject: [PATCH 19/95] Ignore non resolveable links --- .github/.lycheeignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/.lycheeignore b/.github/.lycheeignore index 972ca61..dc88a07 100644 --- a/.github/.lycheeignore +++ b/.github/.lycheeignore @@ -1,2 +1,3 @@ # Ignorefile for broken link check localhost +mvnrepository.com From 40428137c29d7e1fa003ed62eabf5b3b659755d2 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 17 May 2024 02:19:22 +0000 Subject: [PATCH 20/95] Update org.seleniumhq.selenium to v4.21.0 --- testcontainers-selenium-demo/pom.xml | 2 +- testcontainers-selenium/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index d5ce6a3..9403194 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -29,7 +29,7 @@ org.seleniumhq.selenium selenium-dependencies-bom - 4.20.0 + 4.21.0 pom import diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 1fffabc..27123fc 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -104,7 +104,7 @@ org.seleniumhq.selenium selenium-api - 4.20.0 + 4.21.0 provided @@ -124,7 +124,7 @@ org.seleniumhq.selenium selenium-remote-driver - 4.20.0 + 4.21.0 test @@ -142,13 +142,13 @@ org.seleniumhq.selenium selenium-support - 4.20.0 + 4.21.0 test org.seleniumhq.selenium selenium-firefox-driver - 4.20.0 + 4.21.0 test @@ -161,7 +161,7 @@ org.seleniumhq.selenium selenium-chrome-driver - 4.20.0 + 4.21.0 test From 97034e8c3c3edec50a154b6f895eec9d41b5ea3b Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Fri, 17 May 2024 09:01:17 +0200 Subject: [PATCH 21/95] Slight rewording --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71adf87..7f1156e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ We would absolutely love to get the community involved, and we welcome any form ### Ways to help * **Report bugs**
Create an issue or send a pull request * **Send pull requests**
If you want to contribute code, check out the development instructions below. - * However when contributing new features, please first discuss the change you wish to make via issue with the owners of this repository before making a change. Otherwise your work might be rejected and your effort was pointless. + * However when contributing larger new features, please first discuss the change you wish to make via issue with the owners of this repository before making it.
Otherwise your work might be rejected and your effort was pointless. We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects). From 9a522773d1930bb3688252ffda8648018103a2b2 Mon Sep 17 00:00:00 2001 From: AB Date: Fri, 17 May 2024 09:42:19 +0200 Subject: [PATCH 22/95] Fill in template --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- .github/ISSUE_TEMPLATE/enhancement.yml | 2 +- .github/ISSUE_TEMPLATE/question.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 68299d5..3e513ac 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -14,9 +14,9 @@ body: attributes: label: "Checklist" options: - - label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)" + - label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/testcontainers-selenium/releases/latest)" required: true - - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." required: true - label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise." required: true diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml index 7523129..ff3255f 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.yml +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -12,7 +12,7 @@ body: attributes: label: "Checklist" options: - - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." required: true - label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise." required: true diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 6ecd6ad..59c4e87 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -12,7 +12,7 @@ body: attributes: label: "Checklist" options: - - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." + - label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-selenium/issues) or [closed](https://github.com/xdev-software/testcontainers-selenium/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to." required: true - label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise." required: true From 69604577dc40e6d61d57b4868839194bf16aaf02 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 26 May 2024 02:24:16 +0000 Subject: [PATCH 23/95] Update dependency maven to v3.9.7 --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 7f15621..f800e78 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip From f22a35b6327ac7f8c9af16da8b377c5a6770dc5f Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 27 May 2024 02:21:47 +0000 Subject: [PATCH 24/95] Update dependency com.puppycrawl.tools:checkstyle to v10.17.0 --- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index b319445..f40d02e 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -90,7 +90,7 @@ com.puppycrawl.tools checkstyle - 10.16.0 + 10.17.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index b9369a7..36e4236 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -230,7 +230,7 @@ com.puppycrawl.tools checkstyle - 10.16.0 + 10.17.0 From 457533698cb76fa8c50b82b99365e23737b843f0 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 27 May 2024 11:05:40 +0200 Subject: [PATCH 25/95] Only run sonar workflow when secret is present Fixes https://github.com/xdev-software/standard-maven-template/issues/57 --- .github/workflows/sonar.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 1c9b0f8..061abbd 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -27,7 +27,7 @@ jobs: sonar: name: SonarCloud Scan runs-on: ubuntu-latest - if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }} + if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }} steps: - uses: actions/checkout@v4 with: From 403faee28d7778d19d589fa22e5f502bf4e8ed87 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 27 May 2024 16:08:06 +0200 Subject: [PATCH 26/95] Secrets are not available in if So let's startup a job before and check it there... You know because efficient design --- .github/workflows/sonar.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 061abbd..917868b 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -24,10 +24,22 @@ env: SONARCLOUD_HOST: https://sonarcloud.io jobs: + token-check: + runs-on: ubuntu-latest + outputs: + hasToken: ${{ steps.check-token.outputs.has }} + steps: + - id: check-token + run: | + [ -z $SONAR_TOKEN ] && echo "has=false" || echo "has=true" >> "$GITHUB_OUTPUT" + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + sonar: name: SonarCloud Scan runs-on: ubuntu-latest - if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && secrets.SONAR_TOKEN != '' }} + needs: token-check + if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && needs.token-check.outputs.hasToken }} steps: - uses: actions/checkout@v4 with: From d562e83d8ff58946f6ef75dcc86ab6ac9c139928 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Tue, 28 May 2024 02:21:58 +0000 Subject: [PATCH 27/95] Update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.7.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 36e4236..7a44509 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -205,7 +205,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true ossrh From bef3a777eee48445b3c7c806da17ba7df91d156c Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 28 May 2024 08:23:59 +0200 Subject: [PATCH 28/95] Don't run sonar token check when not required --- .github/workflows/sonar.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 917868b..7824917 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -26,6 +26,7 @@ env: jobs: token-check: runs-on: ubuntu-latest + if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }} outputs: hasToken: ${{ steps.check-token.outputs.has }} steps: @@ -35,11 +36,10 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - sonar: - name: SonarCloud Scan + sonar-scan: runs-on: ubuntu-latest needs: token-check - if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) && needs.token-check.outputs.hasToken }} + if: ${{ needs.token-check.outputs.hasToken }} steps: - uses: actions/checkout@v4 with: From 8d48e75a2b3bc9535431421a4cd8bfb19c517530 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 28 May 2024 08:47:01 +0200 Subject: [PATCH 29/95] Compact/Flatten pom on release --- template-placeholder/pom.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 36e4236..d832697 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -179,6 +179,23 @@ ossrh + + org.codehaus.mojo + flatten-maven-plugin + 1.6.0 + + ossrh + + + + flatten + process-resources + + flatten + + + + org.apache.maven.plugins maven-gpg-plugin From a16ac0640bc49566cf4ecfcbcfb3d0c35db03c9f Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 28 May 2024 14:09:40 +0200 Subject: [PATCH 30/95] Standardize job names --- .github/workflows/release.yml | 16 ++++++++-------- .github/workflows/test-deploy.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ad042f..a1e3e8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ permissions: pull-requests: write jobs: - check_code: # Validates the code + check-code: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -45,9 +45,9 @@ jobs: exit 1 fi - prepare_release: + prepare-release: runs-on: ubuntu-latest - needs: [check_code] + needs: [check-code] outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} steps: @@ -106,9 +106,9 @@ jobs:
``` - publish_central: # Publish the code to central + publish-maven: runs-on: ubuntu-latest - needs: [prepare_release] + needs: [prepare-release] steps: - uses: actions/checkout@v4 @@ -139,7 +139,7 @@ jobs: publish-pages: runs-on: ubuntu-latest - needs: [prepare_release] + needs: [prepare-release] steps: - uses: actions/checkout@v4 @@ -166,9 +166,9 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site - after_release: + after-release: runs-on: ubuntu-latest - needs: [publish_central] + needs: [publish-maven] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index cdd96cc..9c07de2 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -7,7 +7,7 @@ env: PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }} jobs: - publish_central: # Publish the code to central + publish-maven: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 4de451fa872278bcc682a234014fce0c08e8df88 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 28 May 2024 14:11:12 +0200 Subject: [PATCH 31/95] Substitute using repo name --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1e3e8b..9a3c5da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,8 +93,8 @@ jobs: release_name: v${{ steps.version.outputs.release }} commitish: master body: | - ## [Changelog](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) - See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/xdev-software/${{ env.PRIMARY_MAVEN_MODULE }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information. + ## [Changelog](https://github.com/${{ github.repository }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) + See [Changelog#v${{ steps.version.outputs.release }}](https://github.com/${{ github.repository }}/blob/develop/CHANGELOG.md#${{ steps.version.outputs.releasenumber }}) for more information. ## Installation Add the following lines to your pom: From 21769fcb17f890c24d9db4909552aa431b0ba947 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 28 May 2024 14:11:53 +0200 Subject: [PATCH 32/95] Normalize workflow names --- .github/workflows/{checkBuild.yml => check-build.yml} | 0 README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{checkBuild.yml => check-build.yml} (100%) diff --git a/.github/workflows/checkBuild.yml b/.github/workflows/check-build.yml similarity index 100% rename from .github/workflows/checkBuild.yml rename to .github/workflows/check-build.yml diff --git a/README.md b/README.md index 8da47a0..eccf80b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder) -[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/checkBuild.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/checkBuild.yml?query=branch%3Adevelop) +[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder) # template-placeholder From 7ab86667b9fe51602690b0df081c47848195a834 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 1 Jun 2024 02:28:02 +0000 Subject: [PATCH 33/95] Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.0-M15 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a1a300d..7a5c2dc 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -90,7 +90,7 @@ org.apache.maven.plugins maven-site-plugin - 4.0.0-M14 + 4.0.0-M15 org.apache.maven.plugins From 3b682e831f3f596ed23ba3ff2a643ea4ac6301fd Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 1 Jun 2024 02:28:04 +0000 Subject: [PATCH 34/95] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.7.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a1a300d..0046bdb 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -143,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.3 + 3.7.0 attach-javadocs From 0a48eeec49daec9938b1f9758a14eff4b82be2be Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 3 Jun 2024 14:45:56 +0200 Subject: [PATCH 35/95] Update update-from-template.yml https://github.com/xdev-software/java-template/issues/8 --- .github/workflows/update-from-template.yml | 209 +++++++++++++++++++-- 1 file changed, 193 insertions(+), 16 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 41a1bcd..3157785 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -11,9 +11,15 @@ on: schedule: - cron: '55 2 * * 1' workflow_dispatch: + inputs: + no_automatic_merge: + type: boolean + description: 'No automatic merge' + default: false env: UPDATE_BRANCH: update-from-template + UPDATE_BRANCH_MERGED: update-from-template-merged REMOTE_URL: https://github.com/xdev-software/java-template.git REMOTE_BRANCH: master @@ -36,11 +42,11 @@ jobs: - name: Init Git run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" + git config --global user.email "111048771+xdev-gh-bot@users.noreply.github.com" + git config --global user.name "XDEV Bot" - - name: Main workflow - id: main + - name: Manage branches + id: manage-branches run: | echo "Adding remote template-repo" git remote add template ${{ env.REMOTE_URL }} @@ -48,8 +54,9 @@ jobs: echo "Fetching remote template repo" git fetch template - echo "Deleting local branch that will contain the updates - if present" + echo "Deleting local branches that will contain the updates - if present" git branch -D ${{ env.UPDATE_BRANCH }} || true + git branch -D ${{ env.UPDATE_BRANCH_MERGED }} || true echo "Checking if the remote template repo has new commits" git rev-list ..template/${{ env.REMOTE_BRANCH }} @@ -57,10 +64,12 @@ jobs: if [ $(git rev-list --count ..template/${{ env.REMOTE_BRANCH }}) -eq 0 ]; then echo "There are no commits new commits on the template repo" - echo "Deleting origin branch that contains the updates - if present" + echo "Deleting origin branch(es) that contain the updates - if present" git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true + git push -f origin --delete ${{ env.UPDATE_BRANCH_MERGED }} || true - echo "abort=1" >> $GITHUB_OUTPUT + echo "create_update_branch_pr=0" >> $GITHUB_OUTPUT + echo "create_update_branch_merged_pr=0" >> $GITHUB_OUTPUT exit 0 fi @@ -73,21 +82,189 @@ jobs: echo "Pushing update branch" git push -f -u origin ${{ env.UPDATE_BRANCH }} - echo "Getting current branch" - current_branch=$(git branch --show-current) - echo "Current branch is $current_branch" - echo "current_branch=$current_branch" >> $GITHUB_OUTPUT + echo "Getting base branch" + base_branch=$(git branch --show-current) + echo "Base branch is $base_branch" + echo "base_branch=$base_branch" >> $GITHUB_OUTPUT - echo "abort=0" >> $GITHUB_OUTPUT + echo "Trying to create auto-merged branch ${{ env.UPDATE_BRANCH_MERGED }}" + git branch ${{ env.UPDATE_BRANCH_MERGED }} ${{ env.UPDATE_BRANCH }} + git checkout ${{ env.UPDATE_BRANCH_MERGED }} - - name: pull-request - if: steps.main.outputs.abort == 0 + echo "Merging branch $base_branch into ${{ env.UPDATE_BRANCH_MERGED }}" + git merge $base_branch && merge_exit_code=$? || merge_exit_code=$? + if [ $merge_exit_code -ne 0 ]; then + echo "Auto merge failed! Manual merge required" + echo "::notice ::Auto merge failed - Manual merge required" + + echo "Cleaning up failed merge" + git merge --abort + git checkout $base_branch + git branch -D ${{ env.UPDATE_BRANCH_MERGED }} || true + + echo "Deleting auto-merge branch - if present" + git push -f origin --delete ${{ env.UPDATE_BRANCH_MERGED }} || true + + echo "create_update_branch_pr=1" >> $GITHUB_OUTPUT + echo "create_update_branch_merged_pr=0" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "Post processing: Trying to automatically fill in template variables" + find . -type f \ + -not -path "./.git/**" \ + -not -path "./.github/workflows/update-from-template.yml" -print0 \ + | xargs -0 sed -i "s/template-placeholder/${GITHUB_REPOSITORY#*/}/g" + + git status + git add --all + + if [[ "$(git status --porcelain)" != "" ]]; then + echo "Filled in template; Committing" + + git commit -m "Fill in template" + fi + + echo "Pushing auto-merged branch" + git push -f -u origin ${{ env.UPDATE_BRANCH_MERGED }} + + echo "update_branch_merged_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + + echo "Restoring base branch $base_branch" + git checkout $base_branch + + echo "create_update_branch_pr=0" >> $GITHUB_OUTPUT + echo "create_update_branch_merged_pr=1" >> $GITHUB_OUTPUT + + - name: PR update_branch + if: steps.manage-branches.outputs.create_update_branch_pr == 1 env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} run: | gh_pr_up() { gh pr create -H "${{ env.UPDATE_BRANCH }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH }}" && gh pr edit "$@") } - gh_pr_up -B "${{ steps.main.outputs.current_branch }}" \ + gh_pr_up -B "${{ steps.manage-branches.outputs.base_branch }}" \ --title "Update from template" \ --body "An automated PR to sync changes from the template into this repo" + + - name: PR update_branch_merged + if: steps.manage-branches.outputs.create_update_branch_merged_pr == 1 + env: + GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} + run: | + gh_pr_up() { + gh pr create -H "${{ env.UPDATE_BRANCH_MERGED }}" "$@" || (git checkout "${{ env.UPDATE_BRANCH_MERGED }}" && gh pr edit "$@") + } + gh_pr_up -B "${{ steps.manage-branches.outputs.base_branch }}" \ + --title "Update from template (auto-merged)" \ + --body "An automated PR to sync changes from the template into this repo" + + - name: Checking if auto-merge for PR update_branch_merged can be done + id: auto-merge-check + if: steps.manage-branches.outputs.create_update_branch_merged_pr == 1 + env: + GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} + run: | + not_failed_conclusion="skipped|neutral|success" + not_relevant_app_slug="dependabot" + + echo "Waiting for workflows to start..." + sleep 60s + + for i in {1..15}; do + echo "Checking if PR can be auto-merged. Try: $i" + + echo "Fetching checks" + cs_response=$(curl -sL \ + --fail-with-body \ + --connect-timeout 60 \ + --max-time 120 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/${{ github.repository }}/commits/${{ steps.manage-branches.outputs.update_branch_merged_commit }}/check-suites) + + cs_data=$(echo $cs_response | jq '.check_suites[] | { conclusion: .conclusion, slug: .app.slug, check_runs_url: .check_runs_url }') + echo $cs_data + + if [[ -z "$cs_data" ]]; then + echo "No check suite data - Assuming that there are no checks to run" + + echo "perform=1" >> $GITHUB_OUTPUT + exit 0 + fi + + cs_failed=$(echo $cs_data | jq --arg x "$not_failed_conclusion" 'select ((.conclusion == null or (.conclusion | test($x))) | not)') + if [[ -z "$cs_failed" ]]; then + echo "No check failed so far; Checking if relevant checks are still running" + + cs_relevant_still_running=$(echo $cs_data | jq --arg x "$not_relevant_app_slug" 'select (.conclusion == null and (.slug | test($x) | not))') + if [[ -z $cs_relevant_still_running ]]; then + echo "All relevant checks finished - PR can be merged" + + echo "perform=1" >> $GITHUB_OUTPUT + exit 0 + else + echo "Relevant checks are still running" + echo $cs_relevant_still_running + fi + else + echo "Detected failed check" + echo $cs_failed + + echo "perform=0" >> $GITHUB_OUTPUT + exit 0 + fi + + echo "Waiting before next run..." + sleep 60s + done + + echo "Timed out" + echo "perform=0" >> $GITHUB_OUTPUT + + - name: Auto-merge update_branch_merged + if: steps.auto-merge-check.outputs.perform == 1 + run: | + base_branch="${{ steps.manage-branches.outputs.base_branch }}" + echo "Restoring base branch $base_branch" + git checkout $base_branch + + echo "Fetching..." + git fetch + + expected_commit="${{ steps.manage-branches.outputs.update_branch_merged_commit }}" + actual_commit=$(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) + if [[ "$expected_commit" != "$actual_commit" ]]; then + echo "Branch ${{ env.UPDATE_BRANCH_MERGED }} contains unexpected commit $actual_commit" + echo "Expected: $expected_commit" + + exit 0 + fi + + echo "Ensuring that current branch $base_branch is up-to-date" + git pull + + echo "Merging ${{ env.UPDATE_BRANCH_MERGED }} into $base_branch" + git merge ${{ env.UPDATE_BRANCH_MERGED }} && merge_exit_code=$? || merge_exit_code=$? + if [ $merge_exit_code -ne 0 ]; then + echo "Unexpected merge failure $merge_exit_code - Requires manual resolution" + + exit 0 + fi + + if [[ "${{ inputs.no_automatic_merge }}" == "true" ]]; then + echo "Exiting due no_automatic_merge" + + exit 0 + fi + + echo "Pushing" + git push + + echo "Cleaning up" + git branch -D ${{ env.UPDATE_BRANCH }} || true + git branch -D ${{ env.UPDATE_BRANCH_MERGED }} || true + git push -f origin --delete ${{ env.UPDATE_BRANCH }} || true + git push -f origin --delete ${{ env.UPDATE_BRANCH_MERGED }} || true From b68fe4193432c2559bcc8480d1b502b8e3bfe188 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 3 Jun 2024 14:59:51 +0200 Subject: [PATCH 36/95] Ignore github pages --- .github/workflows/update-from-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 3157785..1d60c77 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -167,7 +167,7 @@ jobs: GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} run: | not_failed_conclusion="skipped|neutral|success" - not_relevant_app_slug="dependabot" + not_relevant_app_slug="dependabot|github-pages" echo "Waiting for workflows to start..." sleep 60s From dbbac6832830f480103f195afd7382812a0c7ddc Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 3 Jun 2024 15:17:07 +0200 Subject: [PATCH 37/95] Update update-from-template.yml https://github.com/xdev-software/java-template/issues/8 --- .github/workflows/update-from-template.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 1d60c77..cf23b4f 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -1,9 +1,10 @@ name: Update from Template # This workflow keeps the repo up to date with changes from the template repo (REMOTE_URL) -# It duplicates the REMOTE_BRANCH (into UPDATE_BRANCH) and tries to merge it into the +# It duplicates the REMOTE_BRANCH (into UPDATE_BRANCH) and tries to merge it into # this repos default branch (which is checked out here) # Note that this requires a PAT (Personal Access Token) - at best from a servicing account +# PAT permissions: read:discussion, read:org, repo, workflow # Also note that you should have at least once merged the template repo into the current repo manually # otherwise a "refusing to merge unrelated histories" error might occur. @@ -135,8 +136,9 @@ jobs: echo "create_update_branch_pr=0" >> $GITHUB_OUTPUT echo "create_update_branch_merged_pr=1" >> $GITHUB_OUTPUT + echo "try_close_update_branch_pr=1" >> $GITHUB_OUTPUT - - name: PR update_branch + - name: Create/Update PR update_branch if: steps.manage-branches.outputs.create_update_branch_pr == 1 env: GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} @@ -147,8 +149,16 @@ jobs: gh_pr_up -B "${{ steps.manage-branches.outputs.base_branch }}" \ --title "Update from template" \ --body "An automated PR to sync changes from the template into this repo" + + # Ensure that only a single PR is open (otherwise confusion and spam) + - name: Close PR update_branch + if: steps.manage-branches.outputs.try_close_update_branch_pr == 1 + env: + GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} + run: | + gh pr close "${{ env.UPDATE_BRANCH }}" || true - - name: PR update_branch_merged + - name: Create/Update PR update_branch_merged if: steps.manage-branches.outputs.create_update_branch_merged_pr == 1 env: GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} From a96e946f81379f189a57e3188d9e2e23d472e4c3 Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 3 Jun 2024 16:48:26 +0200 Subject: [PATCH 38/95] Update update-from-template.yml Split into 2 jobs to help with expected executor starvation --- .github/workflows/update-from-template.yml | 49 ++++++++++++++++------ 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index cf23b4f..cfebf39 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -31,7 +31,9 @@ permissions: jobs: update: runs-on: ubuntu-latest - + outputs: + update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }} + create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }} steps: - uses: actions/checkout@v4 with: @@ -169,20 +171,41 @@ jobs: gh_pr_up -B "${{ steps.manage-branches.outputs.base_branch }}" \ --title "Update from template (auto-merged)" \ --body "An automated PR to sync changes from the template into this repo" + + # Wait a moment so that checks of PR have higher prio than following job + sleep 3 + + # Split into two jobs to help with executor starvation + auto-merge: + needs: [update] + if: needs.update.outputs.create_update_branch_merged_pr == 1 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + # Required because otherwise there are always changes detected when executing diff/rev-list + fetch-depth: 0 + # If no PAT is used the following error occurs on a push: + # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission + token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} + + - name: Init Git + run: | + git config --global user.email "111048771+xdev-gh-bot@users.noreply.github.com" + git config --global user.name "XDEV Bot" - name: Checking if auto-merge for PR update_branch_merged can be done id: auto-merge-check - if: steps.manage-branches.outputs.create_update_branch_merged_pr == 1 env: GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} run: | not_failed_conclusion="skipped|neutral|success" not_relevant_app_slug="dependabot|github-pages" - echo "Waiting for workflows to start..." - sleep 60s + echo "Waiting for checks to start..." + sleep 40s - for i in {1..15}; do + for i in {1..20}; do echo "Checking if PR can be auto-merged. Try: $i" echo "Fetching checks" @@ -193,7 +216,7 @@ jobs: -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer $GH_TOKEN" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ github.repository }}/commits/${{ steps.manage-branches.outputs.update_branch_merged_commit }}/check-suites) + https://api.github.com/repos/${{ github.repository }}/commits/${{ needs.update.outputs.update_branch_merged_commit }}/check-suites) cs_data=$(echo $cs_response | jq '.check_suites[] | { conclusion: .conclusion, slug: .app.slug, check_runs_url: .check_runs_url }') echo $cs_data @@ -228,7 +251,7 @@ jobs: fi echo "Waiting before next run..." - sleep 60s + sleep 30s done echo "Timed out" @@ -237,14 +260,14 @@ jobs: - name: Auto-merge update_branch_merged if: steps.auto-merge-check.outputs.perform == 1 run: | - base_branch="${{ steps.manage-branches.outputs.base_branch }}" - echo "Restoring base branch $base_branch" - git checkout $base_branch + echo "Getting base branch" + base_branch=$(git branch --show-current) + echo "Base branch is $base_branch" echo "Fetching..." git fetch - expected_commit="${{ steps.manage-branches.outputs.update_branch_merged_commit }}" + expected_commit="${{ needs.update.outputs.update_branch_merged_commit }}" actual_commit=$(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) if [[ "$expected_commit" != "$actual_commit" ]]; then echo "Branch ${{ env.UPDATE_BRANCH_MERGED }} contains unexpected commit $actual_commit" @@ -256,8 +279,8 @@ jobs: echo "Ensuring that current branch $base_branch is up-to-date" git pull - echo "Merging ${{ env.UPDATE_BRANCH_MERGED }} into $base_branch" - git merge ${{ env.UPDATE_BRANCH_MERGED }} && merge_exit_code=$? || merge_exit_code=$? + echo "Merging origin/${{ env.UPDATE_BRANCH_MERGED }} into $base_branch" + git merge origin/${{ env.UPDATE_BRANCH_MERGED }} && merge_exit_code=$? || merge_exit_code=$? if [ $merge_exit_code -ne 0 ]; then echo "Unexpected merge failure $merge_exit_code - Requires manual resolution" From 8aef4988554ac2fe092b93900105d55be9664e4e Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 3 Jun 2024 17:03:16 +0200 Subject: [PATCH 39/95] Update update-from-template.yml --- .github/workflows/update-from-template.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index cfebf39..57a6cdd 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -200,7 +200,7 @@ jobs: GH_TOKEN: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} run: | not_failed_conclusion="skipped|neutral|success" - not_relevant_app_slug="dependabot|github-pages" + not_relevant_app_slug="dependabot|github-pages|sonarcloud" echo "Waiting for checks to start..." sleep 40s @@ -254,8 +254,8 @@ jobs: sleep 30s done - echo "Timed out" - echo "perform=0" >> $GITHUB_OUTPUT + echo "Timed out - Assuming executor starvation - Forcing merge" + echo "perform=1" >> $GITHUB_OUTPUT - name: Auto-merge update_branch_merged if: steps.auto-merge-check.outputs.perform == 1 From e48734d3d797a563dd75eb0fa8c6c5af2bd52b50 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 4 Jun 2024 08:33:31 +0200 Subject: [PATCH 40/95] Update update-from-template.yml Handle PR merges before workflow finishes --- .github/workflows/update-from-template.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 57a6cdd..756607d 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -208,6 +208,13 @@ jobs: for i in {1..20}; do echo "Checking if PR can be auto-merged. Try: $i" + echo "Checking if update-branch-merged exists" + git fetch + if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" + exit 0 + fi + echo "Fetching checks" cs_response=$(curl -sL \ --fail-with-body \ @@ -266,6 +273,10 @@ jobs: echo "Fetching..." git fetch + if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" + exit 0 + fi expected_commit="${{ needs.update.outputs.update_branch_merged_commit }}" actual_commit=$(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) From 3feccd234eb90229ff4887db845e87a37d0df9f7 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 6 Jun 2024 02:21:49 +0000 Subject: [PATCH 41/95] Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.4.0 --- pom.xml | 2 +- template-placeholder-demo/pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 5da2110..8fc5ca9 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + 3.4.0 true diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index f40d02e..326f855 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + 3.4.0 com.puppycrawl.tools diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 539a8a0..fb307dd 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -242,7 +242,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.1 + 3.4.0 com.puppycrawl.tools From 544753bfbed0449cbc29d0926f09d27bbcb55fc2 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 15:59:00 +0200 Subject: [PATCH 42/95] Fix rev-parse not working --- .github/workflows/update-from-template.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 756607d..4bba6aa 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -183,8 +183,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - # Required because otherwise there are always changes detected when executing diff/rev-list - fetch-depth: 0 # If no PAT is used the following error occurs on a push: # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} From 49f82a1418e2de0ccdd209b8682fcd32620d1802 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:14:47 +0200 Subject: [PATCH 43/95] Fix problem with fetch depth of 0 --- .github/workflows/update-from-template.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 4bba6aa..235ac3f 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -183,6 +183,8 @@ jobs: steps: - uses: actions/checkout@v4 with: + # Required because otherwise there are always changes detected when executing diff/rev-list + fetch-depth: 0 # If no PAT is used the following error occurs on a push: # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} @@ -208,7 +210,7 @@ jobs: echo "Checking if update-branch-merged exists" git fetch - if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi @@ -269,8 +271,11 @@ jobs: base_branch=$(git branch --show-current) echo "Base branch is $base_branch" - echo "Fetching..." - git fetch + echo "Fully fetching..." + git fetch --unshallow || true + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + git fetch origin + if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 From 1b8b6b20e4726f16762b36ba8b8eaa9d92513216 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:26:17 +0200 Subject: [PATCH 44/95] Fully unshallow every as ls-remote also fails --- .github/workflows/update-from-template.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 235ac3f..7a07bc6 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -209,8 +209,9 @@ jobs: echo "Checking if PR can be auto-merged. Try: $i" echo "Checking if update-branch-merged exists" - git fetch - if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true + git fetch origin + if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi @@ -272,8 +273,7 @@ jobs: echo "Base branch is $base_branch" echo "Fully fetching..." - git fetch --unshallow || true - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true git fetch origin if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then From 538caf18362b0f16b17a492e02193073bf6a61f3 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:36:56 +0200 Subject: [PATCH 45/95] Revert "Fully unshallow every as ls-remote also fails" This reverts commit 1b8b6b20e4726f16762b36ba8b8eaa9d92513216. --- .github/workflows/update-from-template.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 7a07bc6..235ac3f 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -209,9 +209,8 @@ jobs: echo "Checking if PR can be auto-merged. Try: $i" echo "Checking if update-branch-merged exists" - git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true - git fetch origin - if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + git fetch + if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi @@ -273,7 +272,8 @@ jobs: echo "Base branch is $base_branch" echo "Fully fetching..." - git fetch --unshallow && git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" || true + git fetch --unshallow || true + git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" git fetch origin if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then From ca909f162c7505f5fc2db36c7e3b00dc91004b0e Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:37:01 +0200 Subject: [PATCH 46/95] Revert "Fix problem with fetch depth of 0" This reverts commit 49f82a1418e2de0ccdd209b8682fcd32620d1802. --- .github/workflows/update-from-template.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 235ac3f..4bba6aa 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -183,8 +183,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - # Required because otherwise there are always changes detected when executing diff/rev-list - fetch-depth: 0 # If no PAT is used the following error occurs on a push: # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} @@ -210,7 +208,7 @@ jobs: echo "Checking if update-branch-merged exists" git fetch - if [[ $(git ls-remote --exit-code --heads origin ${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi @@ -271,11 +269,8 @@ jobs: base_branch=$(git branch --show-current) echo "Base branch is $base_branch" - echo "Fully fetching..." - git fetch --unshallow || true - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - git fetch origin - + echo "Fetching..." + git fetch if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 From 38e37eb825c282f05f573b687027e07c8fef039f Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:37:05 +0200 Subject: [PATCH 47/95] Revert "Fix rev-parse not working" This reverts commit 544753bfbed0449cbc29d0926f09d27bbcb55fc2. --- .github/workflows/update-from-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 4bba6aa..756607d 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -183,6 +183,8 @@ jobs: steps: - uses: actions/checkout@v4 with: + # Required because otherwise there are always changes detected when executing diff/rev-list + fetch-depth: 0 # If no PAT is used the following error occurs on a push: # refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }} From 56ef08ae9bb3602a486543843dd0e8b5f09bb72e Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 11 Jun 2024 16:38:49 +0200 Subject: [PATCH 48/95] Correct if --- .github/workflows/update-from-template.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-from-template.yml b/.github/workflows/update-from-template.yml index 756607d..ba0bf09 100644 --- a/.github/workflows/update-from-template.yml +++ b/.github/workflows/update-from-template.yml @@ -211,6 +211,8 @@ jobs: echo "Checking if update-branch-merged exists" git fetch if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + echo "Branch still exists; Continuing..." + else echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi @@ -274,6 +276,8 @@ jobs: echo "Fetching..." git fetch if [[ $(git rev-parse origin/${{ env.UPDATE_BRANCH_MERGED }}) ]]; then + echo "Branch still exists; Continuing..." + else echo "Branch origin/${{ env.UPDATE_BRANCH_MERGED }} is missing" exit 0 fi From 89779cfba4c8794e4b3da2aad06469515c361be9 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 15 Jun 2024 02:22:37 +0000 Subject: [PATCH 49/95] Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.3.0 --- testcontainers-selenium/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 9012cfb..bde69b7 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -265,7 +265,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.3.0 ${skipTests} From 03dd57153ee758d4354a4fad9663e974dfb14e24 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 17 Jun 2024 02:25:02 +0000 Subject: [PATCH 50/95] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index fb307dd..5030ab1 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.5.0 + 3.6.0 From 7313ce9b3960ac6cbca4f6b5e16d211463164bf8 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Tue, 18 Jun 2024 02:23:41 +0000 Subject: [PATCH 51/95] Update dependency maven to v3.9.8 --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index f800e78..e56bc18 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip From 3e41f58521ab545319736284844e1784e678e4a4 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 18 Jun 2024 16:46:50 +0200 Subject: [PATCH 52/95] Add default PMD ruleset Co-Authored-By: ds-xdev <85935842+ds-xdev@users.noreply.github.com> --- .config/pmd/ruleset.xml | 149 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .config/pmd/ruleset.xml diff --git a/.config/pmd/ruleset.xml b/.config/pmd/ruleset.xml new file mode 100644 index 0000000..02f64d7 --- /dev/null +++ b/.config/pmd/ruleset.xml @@ -0,0 +1,149 @@ + + + + + This ruleset checks the code for discouraged programming constructs. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 43ddc48eac02aeaea23d332fd4c88bebf9e0c4f8 Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 18 Jun 2024 16:56:51 +0200 Subject: [PATCH 53/95] Attach demo to parent --- template-placeholder-demo/pom.xml | 39 +++++-------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/template-placeholder-demo/pom.xml b/template-placeholder-demo/pom.xml index 326f855..1af633c 100644 --- a/template-placeholder-demo/pom.xml +++ b/template-placeholder-demo/pom.xml @@ -4,7 +4,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - software.xdev + + software.xdev + template-placeholder-root + 1.0.0-SNAPSHOT + + template-placeholder-demo 1.0.0-SNAPSHOT jar @@ -77,36 +82,4 @@ - - - checkstyle - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.4.0 - - - com.puppycrawl.tools - checkstyle - 10.17.0 - - - - ../.config/checkstyle/checkstyle.xml - true - - - - - check - - - - - - - - From 3bc085a454ffefea389f3d3519e13445d97b60ef Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 18 Jun 2024 16:57:26 +0200 Subject: [PATCH 54/95] Reconfigure root and add pmd --- pom.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8fc5ca9..3a04c7a 100644 --- a/pom.xml +++ b/pom.xml @@ -19,6 +19,11 @@ template-placeholder-demo + + UTF-8 + UTF-8 + + Apache License, Version 2.0 @@ -29,7 +34,6 @@ - checkstyle @@ -37,12 +41,67 @@ org.apache.maven.plugins maven-checkstyle-plugin 3.4.0 + + + com.puppycrawl.tools + checkstyle + 10.17.0 + + + + .config/checkstyle/checkstyle.xml + true + + + + + check + + + + + + + + + pmd + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.23.0 - true + true + + .config/pmd/ruleset.xml + + + + net.sourceforge.pmd + pmd-core + 7.2.0 + + + net.sourceforge.pmd + pmd-java + 7.2.0 + + + + + + + org.apache.maven.plugins + maven-jxr-plugin + 3.4.0 + + + From f5240c0ba9f96827abdd6c76d072883bda47edec Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 18 Jun 2024 16:57:44 +0200 Subject: [PATCH 55/95] Add pmd to published module --- template-placeholder/pom.xml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 5030ab1..05a241f 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -265,5 +265,45 @@ + + pmd + + + + org.apache.maven.plugins + maven-pmd-plugin + 3.23.0 + + true + + ../.config/pmd/ruleset.xml + + + + + net.sourceforge.pmd + pmd-core + 7.2.0 + + + net.sourceforge.pmd + pmd-java + 7.2.0 + + + + + + + + + + org.apache.maven.plugins + maven-jxr-plugin + 3.4.0 + + + + From 11c6f7e9bd7a831a0929da58d4143406f95eeede Mon Sep 17 00:00:00 2001 From: AB Date: Tue, 18 Jun 2024 16:59:00 +0200 Subject: [PATCH 56/95] Add pmd to check-build workflow --- .github/workflows/check-build.yml | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index fa9b7f5..2ac6530 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -70,7 +70,7 @@ jobs: path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar if-no-files-found: error - code-style: + checkstyle: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }} @@ -91,3 +91,40 @@ jobs: - name: Run Checkstyle run: ./mvnw -B checkstyle:check -P checkstyle -T2C + + pmd: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }} + + strategy: + matrix: + java: [17] + distribution: [temurin] + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java }} + cache: 'maven' + + - name: Run PMD + run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C + + - name: Run CPD (Copy Paste Detector) + run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -DskipTests -T2C + + - name: Upload report + if: always() + uses: actions/upload-artifact@v4 + with: + name: pmd-report + if-no-files-found: ignore + path: | + target/site/*.html + target/site/css/** + target/site/images/logos/maven-feather.png + target/site/images/external.png From d979ab94bb0a290219aef5cfbd97625843b93a8d Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 19 Jun 2024 08:41:49 +0200 Subject: [PATCH 57/95] PMD: printFailingErrors --- pom.xml | 1 + template-placeholder/pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 3a04c7a..e41a6a2 100644 --- a/pom.xml +++ b/pom.xml @@ -73,6 +73,7 @@ 3.23.0 true + true .config/pmd/ruleset.xml diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 05a241f..b743ae7 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -275,6 +275,7 @@ 3.23.0 true + true ../.config/pmd/ruleset.xml From eed3d8aa02516e03553f39e83875b3776ce87240 Mon Sep 17 00:00:00 2001 From: AB Date: Wed, 19 Jun 2024 13:02:11 +0200 Subject: [PATCH 58/95] Update ruleset.xml --- .config/pmd/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/pmd/ruleset.xml b/.config/pmd/ruleset.xml index 02f64d7..5f88156 100644 --- a/.config/pmd/ruleset.xml +++ b/.config/pmd/ruleset.xml @@ -135,6 +135,9 @@ + + + From 6a258c70a5b6a423ca90196e79f0b37a2a2302b3 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:02:41 +0200 Subject: [PATCH 59/95] Remove duplicate in .gitignore --- .gitignore | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitignore b/.gitignore index d0e81bf..116a656 100644 --- a/.gitignore +++ b/.gitignore @@ -39,11 +39,6 @@ buildNumber.properties # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* - -# bin / compiled stuff -target/ - - # JRebel **/resources/rebel.xml **/resources/rebel-remote.xml From 74ab749006a7d2fffbe54a6f5d26460031115476 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 21 Jun 2024 02:22:08 +0000 Subject: [PATCH 60/95] Update org.seleniumhq.selenium to v4.22.0 --- testcontainers-selenium-demo/pom.xml | 2 +- testcontainers-selenium/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index e29db27..4822147 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -29,7 +29,7 @@ org.seleniumhq.selenium selenium-dependencies-bom - 4.21.0 + 4.22.0 pom import diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 9012cfb..e555771 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -104,7 +104,7 @@ org.seleniumhq.selenium selenium-api - 4.21.0 + 4.22.0 provided @@ -124,7 +124,7 @@ org.seleniumhq.selenium selenium-remote-driver - 4.21.0 + 4.22.0 test @@ -142,13 +142,13 @@ org.seleniumhq.selenium selenium-support - 4.21.0 + 4.22.0 test org.seleniumhq.selenium selenium-firefox-driver - 4.21.0 + 4.22.0 test @@ -161,7 +161,7 @@ org.seleniumhq.selenium selenium-chrome-driver - 4.21.0 + 4.22.0 test From f2290e689466bac63811f4ca96b6069ec1f9c8ee Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 24 Jun 2024 08:34:54 +0200 Subject: [PATCH 61/95] Ignore project internal depenedencies --- renovate.json5 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/renovate.json5 b/renovate.json5 index 11a77b2..11024f4 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,4 +1,14 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "rebaseWhen": "behind-base-branch" + "rebaseWhen": "behind-base-branch", + "packageRules": [ + { + "description": "Ignore project internal dependencies", + "packagePattern": "^software.xdev:template-placeholder", + "datasources": [ + "maven" + ], + "enabled": false + } + ] } From 1cec0e0809e89e1bb27048655dcbcea3774da293 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 27 Jun 2024 02:23:10 +0000 Subject: [PATCH 62/95] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.1 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index b743ae7..a81bb5e 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.0 + 3.6.1 From e26126ffc437aa36f6483cbb7bee96bb576cbf52 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Thu, 27 Jun 2024 10:27:39 +0200 Subject: [PATCH 63/95] [Save Actions] Allow batch activation --- .idea/saveactions_settings.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.idea/saveactions_settings.xml b/.idea/saveactions_settings.xml index 71a42c4..cd28798 100644 --- a/.idea/saveactions_settings.xml +++ b/.idea/saveactions_settings.xml @@ -4,6 +4,7 @@ diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a81bb5e..afe5def 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -289,7 +289,7 @@ net.sourceforge.pmd pmd-java - 7.2.0 + 7.3.0 From 35437967bbc243b045bd8f8a7aee87ce3057130d Mon Sep 17 00:00:00 2001 From: AB Date: Mon, 1 Jul 2024 16:43:02 +0200 Subject: [PATCH 71/95] Group pmd --- renovate.json5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/renovate.json5 b/renovate.json5 index 11024f4..2874d45 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -9,6 +9,16 @@ "maven" ], "enabled": false + }, + { + "description": "Group net.sourceforge.pmd", + "matchPackagePatterns": [ + "^net.sourceforge.pmd" + ], + "datasources": [ + "maven" + ], + "groupName": "net.sourceforge.pmd" } ] } From 501c04d9a11974b61ebe187ba302f007c6e90e1e Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 4 Jul 2024 11:21:54 +0200 Subject: [PATCH 72/95] Fix site failing to find deps --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0510bc..0bf3805 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -157,7 +157,7 @@ jobs: cache: 'maven' - name: Build site - run: ../mvnw -B site -DskipTests + run: ../mvnw -B compile site -DskipTests -T2C working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} - name: Deploy to Github pages From dc7774e109f62b25cc2cd6a752e3e50e0ea863fa Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 14 Jul 2024 02:27:31 +0000 Subject: [PATCH 73/95] Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.24.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 676c238..d15d6dc 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.23.0 + 3.24.0 true true diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c5877da..9a50c24 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -272,7 +272,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.23.0 + 3.24.0 true true From 33122d407e2ab6bd85ef86b3d413f9b5c46e29e0 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 15 Jul 2024 02:26:55 +0000 Subject: [PATCH 74/95] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.6.2 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c5877da..43eb0b2 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.1 + 3.6.2 From aca0e6496acd2366eb255c0d9bc7b2944b6c0ec2 Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 18 Jul 2024 14:31:58 +0200 Subject: [PATCH 75/95] Also skip tests on test deploy --- .github/workflows/test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index 9c07de2..e3ed038 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -24,7 +24,7 @@ jobs: gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} - name: Publish to OSSRH - run: ../mvnw -B deploy -Possrh + run: ../mvnw -B deploy -Possrh -DskipTests working-directory: ${{ env.PRIMARY_MAVEN_MODULE }} env: MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }} From 99f469ba138ababef51e12af56bd5d11c7ac3ab4 Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 18 Jul 2024 15:23:59 +0200 Subject: [PATCH 76/95] Add release failure docs --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f1156e..be2a186 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,3 +44,31 @@ If the ``develop`` is ready for release, create a pull request to the ``master`` When the release is finished do the following: * Merge the auto-generated PR (with the incremented version number) back into the ``develop`` + +### Release failures + +There are 2 modes of release failure: +1. The remote server was e.g. down and non of the artifacts got published +2. There was a build failure during release and only parts of the artifacts got released + +In case 1 we can re-release the existing version,
in case 2 we have to release a new version when we can't get the artifacts deleted (as is the case with Maven Central) + +#### How-to: Re-Releasing an existing version + +1. Delete the release on GitHub +2. Delete the release Git tag from the repo (locally and remote!) +3. Delete the ``master``-Branch and re-create it from the ``develop`` branch (or reset it to the state before the release-workflow commits have been done) + * This requires __temporarily__ removing the branch protection + * Once this was done a new release is triggered immediately! + +#### How-to: Releasing a new version + +1. Merge the ``master`` branch back into ``develop`` (or another temporary branch) +2. Make sure all master branch versions are prepared for a new release
e.g. if the broken release was ``1.0.0`` the version should now be at ``1.0.1-SNAPSHOT`` - the ``SNAPSHOT`` is important for the workflow! +3. Mark the broken release as broken e.g. inside the Changelog, GitHub Release page, etc.
+You can use something like this: + ``` + > [!WARNING] + > This release is broken as my cat accidentally clicked the abort button during the process + ``` +4. Merge the changes back into the ``master`` branch to trigger a new release From 24d9ce186aea2221fcedb91a9d26c49ddf2c4539 Mon Sep 17 00:00:00 2001 From: AB Date: Fri, 19 Jul 2024 12:27:31 +0200 Subject: [PATCH 77/95] Ignore Ncss Count as it does the same as Checkstyle --- .config/pmd/ruleset.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/pmd/ruleset.xml b/.config/pmd/ruleset.xml index 5f88156..667f74e 100644 --- a/.config/pmd/ruleset.xml +++ b/.config/pmd/ruleset.xml @@ -59,6 +59,9 @@ + + + From 9aeed0769e4376c8d032fc06102f9242b8e5e1fd Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 21 Jul 2024 02:28:38 +0000 Subject: [PATCH 78/95] Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.0-M16 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c98fc9d..896862d 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -90,7 +90,7 @@ org.apache.maven.plugins maven-site-plugin - 4.0.0-M15 + 4.0.0-M16 org.apache.maven.plugins From b9f8a597518c1525c87cee20158bbf082124cf97 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 21 Jul 2024 02:28:39 +0000 Subject: [PATCH 79/95] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.8.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index c98fc9d..bbdc318 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -143,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.8.0 attach-javadocs From 0635abd78ba95d5ca77d5192f5330e5b8598818f Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sat, 27 Jul 2024 02:24:46 +0000 Subject: [PATCH 80/95] Update net.sourceforge.pmd to v7.4.0 --- pom.xml | 4 ++-- template-placeholder/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index d15d6dc..cea11b4 100644 --- a/pom.xml +++ b/pom.xml @@ -82,12 +82,12 @@ net.sourceforge.pmd pmd-core - 7.3.0 + 7.4.0 net.sourceforge.pmd pmd-java - 7.3.0 + 7.4.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 3c96888..a6011a3 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -284,12 +284,12 @@ net.sourceforge.pmd pmd-core - 7.3.0 + 7.4.0 net.sourceforge.pmd pmd-java - 7.3.0 + 7.4.0 From d88dcfb3eed121f05d095afa3a2ad42c00555920 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 12 Aug 2024 15:01:43 +0000 Subject: [PATCH 81/95] Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.5 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a3..e603ab0 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.4 + 3.2.5 sign-artifacts From ae41533919a32ed17ac22c629d0576d1f9bbe175 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Sun, 18 Aug 2024 02:26:34 +0000 Subject: [PATCH 82/95] Update dependency maven to v3.9.9 --- .mvn/wrapper/maven-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index e56bc18..4d624fa 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip From f247c9acbad11e1b6d7ed9f3c0d913ac631d60f9 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Thu, 22 Aug 2024 02:26:24 +0000 Subject: [PATCH 83/95] Update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.7.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a3..5400694 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.6.2 + 3.7.0 From 2f8e6e26ae33d11a0597a5f2878423f5761a71c1 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 23 Aug 2024 02:26:15 +0000 Subject: [PATCH 84/95] Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to v3.5.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b4..7311976 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.4.0 + 3.5.0 com.puppycrawl.tools diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a3..1e7c935 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -242,7 +242,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.4.0 + 3.5.0 com.puppycrawl.tools From 5cf7f3f1c0b5567e7f5797f8f1a16c4ca54ab1d0 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 23 Aug 2024 02:26:16 +0000 Subject: [PATCH 85/95] Update dependency org.apache.maven.plugins:maven-jxr-plugin to v3.5.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b4..d5f11c8 100644 --- a/pom.xml +++ b/pom.xml @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-jxr-plugin - 3.4.0 + 3.5.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a3..4e1a3cc 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -301,7 +301,7 @@ org.apache.maven.plugins maven-jxr-plugin - 3.4.0 + 3.5.0 From fdd3d611a02fe75d6eb0d03573dc862437b378ea Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Mon, 26 Aug 2024 02:27:01 +0000 Subject: [PATCH 86/95] Update dependency com.puppycrawl.tools:checkstyle to v10.18.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index cea11b4..559e3c0 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ com.puppycrawl.tools checkstyle - 10.17.0 + 10.18.0 diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index a6011a3..989286a 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -247,7 +247,7 @@ com.puppycrawl.tools checkstyle - 10.17.0 + 10.18.0 From ca025085f1b5302d0251ff6386ebacea52dc0850 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 02:27:15 +0000 Subject: [PATCH 87/95] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.10.0 --- template-placeholder/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9f9e034..0abe26e 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -143,7 +143,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 + 3.10.0 attach-javadocs From 409f50d453be93f747e55b02f3d100452f335a50 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Wed, 28 Aug 2024 02:27:16 +0000 Subject: [PATCH 88/95] Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.25.0 --- pom.xml | 2 +- template-placeholder/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f13d4f4..421afd4 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.24.0 + 3.25.0 true true diff --git a/template-placeholder/pom.xml b/template-placeholder/pom.xml index 9f9e034..8f3bbba 100644 --- a/template-placeholder/pom.xml +++ b/template-placeholder/pom.xml @@ -272,7 +272,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.24.0 + 3.25.0 true true From d40e8d8e46f7aad4ff62ba94cbe05b94fe0c68bb Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 30 Aug 2024 07:27:42 +0000 Subject: [PATCH 89/95] Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.5.0 --- testcontainers-selenium/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index cfefa7c..d71d821 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -265,7 +265,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.3.0 + 3.5.0 ${skipTests} From 9012a7a893c0e8872df51b75a4c5d53618729838 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 30 Aug 2024 07:27:43 +0000 Subject: [PATCH 90/95] Update dependency org.junit.jupiter:junit-jupiter to v5.11.0 --- testcontainers-selenium/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index cfefa7c..d121a00 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -112,7 +112,7 @@ org.junit.jupiter junit-jupiter - 5.10.3 + 5.11.0 test From 1bc843c73911b28b8fdf34bb9f31e155ab2020ad Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 30 Aug 2024 07:27:47 +0000 Subject: [PATCH 91/95] Update dependency org.testcontainers:testcontainers to v1.20.1 --- testcontainers-selenium/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index cfefa7c..8d16bc6 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -91,7 +91,7 @@ org.testcontainers testcontainers - 1.19.8 + 1.20.1 From 9ce8964f828118cb54d9f738f268b6939846c99b Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 30 Aug 2024 07:27:48 +0000 Subject: [PATCH 92/95] Update org.seleniumhq.selenium to v4.24.0 --- testcontainers-selenium-demo/pom.xml | 2 +- testcontainers-selenium/pom.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index 9dd29da..d457a5b 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -34,7 +34,7 @@ org.seleniumhq.selenium selenium-dependencies-bom - 4.22.0 + 4.24.0 pom import diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index cfefa7c..c22cc4f 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -104,7 +104,7 @@ org.seleniumhq.selenium selenium-api - 4.22.0 + 4.24.0 provided @@ -124,7 +124,7 @@ org.seleniumhq.selenium selenium-remote-driver - 4.22.0 + 4.24.0 test @@ -142,13 +142,13 @@ org.seleniumhq.selenium selenium-support - 4.22.0 + 4.24.0 test org.seleniumhq.selenium selenium-firefox-driver - 4.22.0 + 4.24.0 test @@ -161,7 +161,7 @@ org.seleniumhq.selenium selenium-chrome-driver - 4.22.0 + 4.24.0 test From 6aca7a2bbfebda631b565c3dfe9eb9f803e52063 Mon Sep 17 00:00:00 2001 From: AB Date: Fri, 30 Aug 2024 09:30:31 +0200 Subject: [PATCH 93/95] Update renovate.json5 --- renovate.json5 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index 73ea2f8..0fc0a6f 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -4,7 +4,7 @@ "packageRules": [ { "description": "Ignore project internal dependencies", - "packagePattern": "^software.xdev:testcontainers-selenium ", + "packagePattern": "^software.xdev:testcontainers-selenium", "datasources": [ "maven" ], @@ -21,7 +21,17 @@ "groupName": "net.sourceforge.pmd" }, { - "description": "Group Selenium", + "description": "Group org.slf4j", + "matchPackagePatterns": [ + "^org.slf4j" + ], + "datasources": [ + "maven" + ], + "groupName": "org.slf4j" + }, + { + "description": "Group org.seleniumhq.selenium", "matchPackagePatterns": [ "^org.seleniumhq.selenium" ], From 07c71aeaee8194d6d7121edec8ebe2274e82fcc9 Mon Sep 17 00:00:00 2001 From: XDEV Renovate Bot Date: Fri, 30 Aug 2024 07:32:39 +0000 Subject: [PATCH 94/95] Update org.slf4j to v2.0.16 --- testcontainers-selenium-demo/pom.xml | 2 +- testcontainers-selenium/pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testcontainers-selenium-demo/pom.xml b/testcontainers-selenium-demo/pom.xml index d457a5b..4adc99a 100644 --- a/testcontainers-selenium-demo/pom.xml +++ b/testcontainers-selenium-demo/pom.xml @@ -51,7 +51,7 @@ org.slf4j slf4j-simple - 2.0.13 + 2.0.16 diff --git a/testcontainers-selenium/pom.xml b/testcontainers-selenium/pom.xml index 7803647..bf4598b 100644 --- a/testcontainers-selenium/pom.xml +++ b/testcontainers-selenium/pom.xml @@ -97,7 +97,7 @@ org.slf4j slf4j-api - 2.0.13 + 2.0.16 @@ -118,7 +118,7 @@ org.slf4j slf4j-simple - 2.0.13 + 2.0.16 test From 7ec57b41352cd15b1d808a6f3d1d21c10ed68395 Mon Sep 17 00:00:00 2001 From: AB Date: Fri, 30 Aug 2024 09:35:42 +0200 Subject: [PATCH 95/95] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 967c9f7..1e6a214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.0.2 +* Updated dependencies + # 1.0.1 Rename artifactId from ``testcontainers-java-selenium`` to ``testcontainers-selenium``