Skip to content

Commit 797c995

Browse files
committed
Merge branch 'develop' into update-from-template-github_com_xdev-software_standard-maven-template_master-merged
2 parents 1cb7ab0 + ab0d732 commit 797c995

66 files changed

Lines changed: 6773 additions & 50 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/bug_report.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/releases/latest)"
1919
required: true
20-
- 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."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

‎.github/ISSUE_TEMPLATE/enhancement.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- 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."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

‎.github/ISSUE_TEMPLATE/question.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- 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."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues) or [closed](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

‎.github/workflows/check-build.yml‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ env:
2424

2525
jobs:
2626
build:
27-
runs-on: ubuntu-latest
2827
timeout-minutes: 30
2928
strategy:
3029
matrix:
31-
java: [17, 21, 25]
30+
java: [21, 25]
3231
distribution: [temurin]
32+
os: [ubuntu-latest, windows-latest] # Windows is needed for recursive NTFS junctions
33+
runs-on: ${{ matrix.os }}
3334
steps:
3435
- uses: actions/checkout@v7
3536

@@ -47,10 +48,27 @@ jobs:
4748
restore-keys: |
4849
${{ runner.os }}-mvn-build-
4950
51+
# These are required for caching
52+
# https://docs.docker.com/build/cache/backends/gha/#authentication
53+
- name: Get Actions Runtime credentials
54+
id: actions-vars
55+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
56+
with:
57+
script: |
58+
core.setOutput('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
59+
core.setOutput('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL'])
60+
61+
- uses: docker/setup-buildx-action@v4
62+
if: matrix.os != 'windows-latest'
63+
5064
- name: Build with Maven
51-
run: ./mvnw -B clean package
65+
run: ./mvnw -B clean package -P run-integration-tests -T2C
66+
env:
67+
ACTIONS_RUNTIME_TOKEN: ${{ steps.actions-vars.outputs.ACTIONS_RUNTIME_TOKEN }}
68+
ACTIONS_RESULTS_URL: ${{ steps.actions-vars.outputs.ACTIONS_RESULTS_URL }}
5269

5370
- name: Check for uncommited changes
71+
shell: bash
5472
run: |
5573
if [[ "$(git status --porcelain)" != "" ]]; then
5674
echo ----------------------------------------
@@ -68,13 +86,6 @@ jobs:
6886
exit 1
6987
fi
7088
71-
- name: Upload demo files
72-
uses: actions/upload-artifact@v7
73-
with:
74-
name: demo-files-java-${{ matrix.java }}
75-
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
76-
if-no-files-found: error
77-
7889
checkstyle:
7990
runs-on: ubuntu-latest
8091
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
@@ -117,7 +128,7 @@ jobs:
117128
timeout-minutes: 15
118129
strategy:
119130
matrix:
120-
java: [17]
131+
java: [21]
121132
distribution: [temurin]
122133
steps:
123134
- uses: actions/checkout@v7

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up JDK
2424
uses: actions/setup-java@v6
2525
with:
26-
java-version: '17'
26+
java-version: '21'
2727
distribution: 'temurin'
2828

2929
# Try to reuse existing cache from check-build
@@ -127,7 +127,7 @@ jobs:
127127
uses: actions/setup-java@v6
128128
with: # running setup-java overwrites the settings.xml
129129
distribution: 'temurin'
130-
java-version: '17'
130+
java-version: '21'
131131
server-id: github-central
132132
server-password: PACKAGES_CENTRAL_TOKEN
133133
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -144,7 +144,7 @@ jobs:
144144
uses: actions/setup-java@v6
145145
with: # running setup-java again overwrites the settings.xml
146146
distribution: 'temurin'
147-
java-version: '17'
147+
java-version: '21'
148148
server-id: sonatype-central-portal
149149
server-username: MAVEN_CENTRAL_USERNAME
150150
server-password: MAVEN_CENTRAL_TOKEN
@@ -174,7 +174,7 @@ jobs:
174174
- name: Setup - Java
175175
uses: actions/setup-java@v6
176176
with:
177-
java-version: '17'
177+
java-version: '21'
178178
distribution: 'temurin'
179179

180180
# Try to reuse existing cache from check-build

‎.github/workflows/test-deploy.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@v6
1818
with: # running setup-java overwrites the settings.xml
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121
server-id: github-central
2222
server-password: PACKAGES_CENTRAL_TOKEN
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/setup-java@v6
3535
with: # running setup-java again overwrites the settings.xml
3636
distribution: 'temurin'
37-
java-version: '17'
37+
java-version: '21'
3838
server-id: sonatype-central-portal
3939
server-username: MAVEN_CENTRAL_USERNAME
4040
server-password: MAVEN_CENTRAL_TOKEN

‎.run/Run Demo.run.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="testcontainers-advanced-imagebuilder-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

‎CHANGELOG.md‎

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# 4.2.0
2+
* Make it possible to add (additional) labels directly
3+
* Updated dependencies
4+
5+
# 4.1.2
6+
* Do not copy logger in `copyForExactRebuild`
7+
8+
# 4.1.1
9+
* Move `cleanCreatedTransferFilesCache` method to correct place
10+
11+
# 4.1.0
12+
* New method `copyForExactRebuild`
13+
14+
# 4.0.0
15+
* Add `NativeAdvancedImageFromDockerfile`
16+
* Builds the image using a new `docker build` process
17+
* Runs isolated of Testcontainers / does not directly utilize Docker API
18+
* Comparison to `AdvancedImageFromDockerFile`
19+
* Advantages
20+
* Full buildx/buildkit support
21+
* Caching can easily be implemented (using --cache-to and --cache-from)
22+
* Disadvantages
23+
* buildx/buildkit is required locally
24+
* Authentication (if required) needs to be done manually
25+
* External process might not be fully controllable e.g. on JVM crash
26+
* No (type-safe) API
27+
* Abstracted common code of `NativeAdvancedImageFromDockerfile` and `AdvancedImageFromDockerfile`
28+
* Minor performance improvements
29+
30+
# 3.0.1
31+
* Add overload for `copyForIntermediateTag`
32+
33+
# 3.0.0
34+
* Added support to build intermediate named images (after the actual images was built)
35+
* This is highly useful if you want to cache certain images in a CI environment that ignores dangling images instead
36+
* All file transfer logic was moved to `FilesToTransferHandler`
37+
* Updated dependencies
38+
39+
# 2.5.0
40+
* Renamed `FastFilePathUtil` -> `FastFilePathRelativzer`
41+
* Updated dependencies
42+
43+
# 2.4.1
44+
* Updated dependencies
45+
46+
# 2.4.0
47+
* Update to Testcontainers v2
48+
49+
# 2.3.0
50+
* Use Virtual Threads on Java 21+
51+
* Minor optimizations
52+
* Updated dependencies
53+
54+
# 2.2.1
55+
* Windows NTFS junction fix
56+
* Automatically disable it on Java 26+ as [JDK-8364277](https://bugs.openjdk.org/browse/JDK-8364277) is fixed there
57+
* Backport changes from Java 25 to ensure compatibility and get performance improvements (JEP 486)
58+
* Updated dependencies
59+
60+
# 2.2.0
61+
* Added an explicit option for enabling the Windows NTFS junction fix: ``useWinNTFSJunctionFixIfApplicable`` #155
62+
* Enabling it also requires adding ``--add-exports java.base/sun.nio.fs=ALL-UNNAMED`` or performance will be impacted by ~20x due to non-accessible file attributes cache
63+
* This option is temporary and will be removed once the [underlying JDK bug](https://bugs.openjdk.org/browse/JDK-8364277) was fixed
64+
* The default logger of ``AdvancedImageFromDockerFile`` now also includes ``dockerImageName`` to make it easier to distinguish between parallel builds
65+
66+
# 2.1.1
67+
* Addresses a JDK bug which results in a crash or "infinite" loop when encountering recursive NTFS junctions on Windows #155
68+
69+
# 2.1.0
70+
* Add customizer for ``TransferArchiveTARCompressor``
71+
* Create more predefined FileContentModifiers
72+
* This allows to e.g. remove not needed Maven modules when building
73+
74+
# 2.0.2
75+
* Don't try to pull reserved ``scratch`` image during build
76+
77+
# 2.0.1
78+
* Improve matching in ``DockerfileCOPYParentsEmulator`` #134
79+
* Now should properly handle ``./``
80+
81+
# 2.0.0
82+
* Changed ignore backend to utilize [JGit](https://github.com/eclipse-jgit/jgit)
83+
* This should now behave exactly like a ``.gitignore``
84+
* Overall performance should be a lot faster
85+
* Make it possible to modify transferred files
86+
* Provide an option to emulate [``COPY --parents``](https://docs.docker.com/reference/dockerfile/#copy---parents) using ``DockerfileCOPYParentsEmulator`` (which is currently not supported by Docker out of the box)
87+
* This option is required to utilize Docker's cache properly
88+
```docker
89+
# syntax=docker/dockerfile:1-labs
90+
# ...
91+
92+
# Copy & Cache wrapper
93+
COPY --parents mvnw .mvn/** ./
94+
RUN ./mvnw --version
95+
96+
# Copy & Cache poms/dependencies
97+
COPY --parents **/pom.xml ./
98+
# Resolve jars so that they can be cached and don't need to be downloaded when a Java file changes
99+
RUN ./mvnw -B dependency:go-offline -pl app -am -DincludeScope=runtime -T2C
100+
101+
# Copying all other files
102+
COPY . ./
103+
# Run the actual build
104+
RUN ./mvnw -B clean package -pl app -am -T2C -Dmaven.test.skip
105+
```
106+
* At ton of minor optimizations and improvements
107+
108+
# 1.2.0
109+
* Provide an option to always transfer specific paths
110+
* Always transfer Dockerfile - as it is required for building - by default
111+
112+
# 1.1.1
113+
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
114+
115+
# 1.1.0
116+
* Remove testcontainer's dependency [onto JUnit 4](https://github.com/xdev-software/testcontainers-junit4-mock/?tab=readme-ov-file)
117+
* Updated dependencies
118+
119+
# 1.0.2
120+
* Do not pull images that are declared inside the Dockerfile (Multi-Stage build)
121+
122+
# 1.0.1
123+
* Minor improvements in cleanup behavior (backported from upstream)
124+
125+
# 1.0.0
126+
_Initial release_

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/testcontainers-advanced-imagebuilder/release.yml?branch=master)](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/testcontainers-advanced-imagebuilder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

‎LICENSE‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
identification within third-party archives.
188188

189189
Copyright 2024 XDEV Software
190+
Copyright 2023 Java Git Contributors
190191

191192
Licensed under the Apache License, Version 2.0 (the "License");
192193
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)