Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: oracle/weblogic-image-tool
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release-1.14.3
Choose a base ref
...
head repository: oracle/weblogic-image-tool
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release-1.14.4
Choose a head ref
  • 6 commits
  • 13 files changed
  • 1 contributor

Commits on Dec 3, 2024

  1. preparing for next development iteration

    ddsharpe committed Dec 3, 2024
    Copy the full SHA
    18d83cf View commit details

Commits on Jan 7, 2025

  1. Copy the full SHA
    c5af585 View commit details
  2. Merge branch 'buildx-force-rm' into 'main'

    Remove force-rm default from buildx and add command line option for buildx
    
    See merge request weblogic-cloud/weblogic-image-tool!495
    ddsharpe committed Jan 7, 2025
    Copy the full SHA
    44a1ada View commit details

Commits on Jan 9, 2025

  1. Copy the full SHA
    43cf0b9 View commit details
  2. Merge branch 'installer-spaces' into 'main'

    Allow spaces in the WLS installer zip name
    
    See merge request weblogic-cloud/weblogic-image-tool!496
    ddsharpe committed Jan 9, 2025
    Copy the full SHA
    b29acb3 View commit details

Commits on Feb 5, 2025

  1. release 1.14.4

    ddsharpe committed Feb 5, 2025
    Copy the full SHA
    eb25493 View commit details
27 changes: 15 additions & 12 deletions bug_release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
# Only use this script when releasing bug fixes (removes SNAPSHOT for version)
set -e
git checkout main

project_version=$(mvn help:evaluate -q -DforceStdout -D"expression=project.version")
echo Current POM version: ${project_version}
@@ -10,18 +13,18 @@ new_version=$(echo $project_version | sed -e "s/[0-9][0-9]*\([^0-9]*\)$/$next_di

echo New Version: ${new_version}

echo mvn versions:set -DremoveSnapshot -DgenerateBackupPoms=false
echo mvn clean install
echo git add .
echo git commit -m \"release ${project_version_number_only}\"
echo git push
mvn versions:set -DremoveSnapshot -DgenerateBackupPoms=false
mvn clean install
git add .
git commit -m "release ${project_version_number_only}"
git push

echo git tag release-${project_version_number_only}
echo git push origin release-${project_version_number_only}
git tag release-${project_version_number_only}
git push origin release-${project_version_number_only}

echo mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${new_version}
echo mvn clean install
echo git add .
echo git commit -m \"preparing for next development iteration\"
echo git push
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${new_version}
mvn clean install
git add .
git commit -m "preparing for next development iteration"
git push

1 change: 1 addition & 0 deletions documentation/site/content/userguide/tools/create-image.md
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@ Usage: imagetool create [OPTIONS]
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
| `--target` | Select the target environment in which the created image will be used. Supported values: `Default` (Docker/Kubernetes), `OpenShift`. See [Additional information](#--target). | `Default` |
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `MFT`, `OAM`, `ODI`, `OHS`, `OIG`, `OUD`, `OUD_WLS`, `OID`, `OSB`, `SOA`, `SOA_OSB`, `SOA_OSB_B2B`, `WCC`, `WCP`, `WCS` | `WLS` |
| `--useBuildx` | Use BuildKit for building the container image. | |
| `--user` | Oracle support email ID. When supplying `user`, you must supply the password either as an environment variable using `--passwordEnv`, or as a file using `--passwordFile`, or interactively, on the command line with `--password`. | |
| `--version` | Installer version. | `12.2.1.3.0` |
| `--wdtArchive` | A WDT archive ZIP file or comma-separated list of files. | |
1 change: 1 addition & 0 deletions documentation/site/content/userguide/tools/rebase-image.md
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ Usage: imagetool rebase [OPTIONS]
| `--target` | Select the target environment in which the created image will be used. Supported values: `Default` (Docker/Kubernetes), `OpenShift`. See [Additional information](#--target). | `Default` |
| `--targetImage` | Container image to extend for the domain's new image. | |
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `MFT`, `OAM`, `ODI`, `OHS`, `OIG`, `OUD`, `OUD_WLS`, `OID`, `OSB`, `SOA`, `SOA_OSB`, `SOA_OSB_B2B`, `WCC`, `WCP`, `WCS` | `WLS` |
| `--useBuildx` | Use BuildKit for building the container image. | |
| `--user` | Your Oracle support email ID. When supplying `user`, you must supply the password either as an environment variable using `--passwordEnv`, or as a file using `--passwordFile`, or interactively, on the command line with `--password`. | |
| `--version` | Installer version. | `12.2.1.3.0` |

1 change: 1 addition & 0 deletions documentation/site/content/userguide/tools/update-image.md
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ Update WebLogic Docker image with selected patches
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
| `--target` | Select the target environment in which the created image will be used. Supported values: `Default` (Docker/Kubernetes), `OpenShift`. See [Additional information](#--target). | `Default` |
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `MFT`, `OAM`, `ODI`, `OHS`, `OIG`, `OUD`, `OUD_WLS`, `OID`, `OSB`, `SOA`, `SOA_OSB`, `SOA_OSB_B2B`, `WCC`, `WCP`, `WCS` | `WLS` |
| `--useBuildx` | Use BuildKit for building the container image. | |
| `--user` | Oracle support email ID. When supplying `user`, you must supply the password either as an environment variable using `--passwordEnv`, or as a file using `--passwordFile`, or interactively, on the command line with `--password`. | |
| `--wdtArchive` | A WDT archive ZIP file or comma-separated list of files. | |
| `--wdtDomainHome` | Path to the `-domain_home` for WDT. | `/u01/domains/base_domain` |
2 changes: 1 addition & 1 deletion imagetool/pom.xml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
<parent>
<artifactId>imagetool-parent</artifactId>
<groupId>com.oracle.weblogic.lifecycle.imagetool</groupId>
<version>1.14.3</version>
<version>1.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

Original file line number Diff line number Diff line change
@@ -60,6 +60,18 @@ public BuildCommand tag(String value) {
return this;
}

/**
* Toggle the use of the BuildKit.
* If true, the build command will start "buildx build".
* If false, the build command will start "build".
* @param value true to enable buildx
* @return this
*/
public BuildCommand useBuildx(boolean value) {
useBuildx = value;
return this;
}

/**
* Add container build platform. Pass the desired
* build architecture to the build process.
@@ -72,7 +84,7 @@ public BuildCommand platform(String value) {
}
command.add("--platform");
command.add(value);
useBuildx = true;
useBuildx(true);
return this;
}

@@ -83,7 +95,8 @@ public BuildCommand platform(String value) {
* @return this
*/
public BuildCommand forceRm(boolean value) {
if (value) {
// Docker removed --force-rm from the buildx build API, and Podman defaults --force-rm=true
if (value && !useBuildx) {
command.add("--force-rm");
}
return this;
Original file line number Diff line number Diff line change
@@ -121,9 +121,10 @@ BuildCommand getInitialBuildCmd(String contextFolder) {
logger.entering();
BuildCommand cmdBuilder = new BuildCommand(buildEngine, contextFolder);

cmdBuilder.forceRm(!skipcleanup)
.tag(imageTag)
cmdBuilder.tag(imageTag)
.useBuildx(useBuildx)
.platform(buildPlatform)
.forceRm(!skipcleanup)
.network(buildNetwork)
.pull(buildPull)
.additionalOptions(buildOptions)
@@ -450,6 +451,12 @@ public Architecture getTargetArchitecture() {
)
private String buildPlatform;

@Option(
names = {"--useBuildx"},
description = "Use the BuildKit for building the container image (default when building multi-architecture)"
)
private boolean useBuildx;

@Parameters(
description = "Container build options.",
hidden = true
Original file line number Diff line number Diff line change
@@ -21,10 +21,10 @@ RUN mkdir -p {{{oracle_home}}} \
&& chown {{userid}}:{{groupid}} {{orainv_dir}} \
&& chown {{userid}}:{{groupid}} {{{oracle_home}}}

{{#installJava}}COPY --from=jdk_build --chown={{userid}}:{{groupid}} {{{java_home}}} {{{java_home}}}/
{{#installJava}}COPY --from=jdk_build --chown={{userid}}:{{groupid}} ["{{{java_home}}}", "{{{java_home}}}/"]
{{/installJava}}

{{#installPackages}}COPY --chown={{userid}}:{{groupid}} {{installerFilename}} {{responseFile.name}} {{{tempDir}}}/{{{type}}}/
{{#installPackages}}COPY --chown={{userid}}:{{groupid}} ["{{installerFilename}}", "{{responseFile.name}}", "{{{tempDir}}}/{{{type}}}/"]
{{/installPackages}}
COPY --chown={{userid}}:{{groupid}} oraInst.loc {{inv_loc}}/

@@ -38,7 +38,7 @@ RUN echo "INSTALLING MIDDLEWARE" \
{{#installPackages}}
&& echo "INSTALLING {{type}}" \
# If installer is packaged in a ZIP, extract it before running it
{{#isZip}}&& unzip -q {{{tempDir}}}/{{{type}}}/{{installerFilename}} -d {{{tempDir}}}/{{{type}}} {{/isZip}} \
{{#isZip}}&& unzip -q "{{{tempDir}}}/{{{type}}}/{{installerFilename}}" -d {{{tempDir}}}/{{{type}}} {{/isZip}} \
{{#preinstallCommands}}&& {{{tempDir}}}/{{{type}}}/{{{.}}} {{/preinstallCommands}} \
# IF the installer is a JAR file (not a .bin), run the silent install using Java
{{^isBin}} && {{{java_home}}}/bin/java -Xmx1024m -jar {{{tempDir}}}/{{{type}}}/{{jarName}} \
Original file line number Diff line number Diff line change
@@ -79,4 +79,25 @@ void testBuildWithProxyPass() {
cmd.tag("img:3").buildArg("http_proxy", "http://user:pass@blah/blah", true);
assertEquals(expected("--tag img:3 --build-arg http_proxy=********"), cmd.toString());
}

@Test
void testBuildArgsWithPlatform() {
Map<String,String> argMap = null;

BuildCommand cmd = new BuildCommand(BUILD_ENGINE, BUILD_CONTEXT)
.tag("img:4")
.pull(true)
.platform("linux/amd64")
.forceRm(true)
.network("private-net")
.buildArg(argMap);

// expect that "--force-rm" will not be used, expect "buildx build" will be used
assertEquals(
String.format("%s buildx build %s %s",
BUILD_ENGINE,
"--tag img:4 --pull --platform linux/amd64 --network private-net",
BUILD_CONTEXT),
cmd.toString());
}
}
2 changes: 1 addition & 1 deletion installer/pom.xml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
<parent>
<artifactId>imagetool-parent</artifactId>
<groupId>com.oracle.weblogic.lifecycle.imagetool</groupId>
<version>1.14.3</version>
<version>1.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.oracle.weblogic.lifecycle.imagetool</groupId>
<artifactId>imagetool-parent</artifactId>
<version>1.14.3</version>
<version>1.14.4</version>
<packaging>pom</packaging>

<name>WebLogic Image Tool</name>
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.3</version>
<version>5.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -154,7 +154,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.0</version>
<version>3.5.2</version>
<configuration>
<groups>${test.groups}</groups>
<excludedGroups>failing</excludedGroups>
@@ -214,7 +214,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<executions>
<execution>
<id>checkstyle</id>
@@ -242,14 +242,14 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.20.2</version>
<version>10.21.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.1</version>
<version>3.5.2</version>
<configuration>
<groups>unit</groups>
<excludedGroups>failing</excludedGroups>
@@ -281,7 +281,7 @@
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>4.0.0.4121</version>
<version>5.0.0.4389</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
<parent>
<artifactId>imagetool-parent</artifactId>
<groupId>com.oracle.weblogic.lifecycle.imagetool</groupId>
<version>1.14.3</version>
<version>1.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

Original file line number Diff line number Diff line change
@@ -68,12 +68,13 @@ public static CommandResult run(String command, PrintWriter output) throws IOExc

p = pb.start();

BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream(), UTF_8));
StringBuilder processOut = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
processOut.append(line);
output.println(line);
try (BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream(), UTF_8))) {
String line;
while ((line = reader.readLine()) != null) {
processOut.append(line);
output.println(line);
}
}

p.waitFor();