Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the deprecated things and replace Fabric8 Maven plugin with JKube maven plugin #1309

Merged
merged 15 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commands:
steps:
- run:
name: "Maven build for Docker"
command: ./mvnw clean package -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker
command: ./mvnw clean package -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker -Dcontainerless.skip.tests=true
fabiobrz marked this conversation as resolved.
Show resolved Hide resolved
- when:
condition:
equal: [ kubernetes, << parameters.category >> ]
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 20.10.18
version: docker24
docker_layer_caching: true
- restore_cache:
key: circleci-arquillian-cube-{{ checksum "pom.xml" }}
Expand Down
4 changes: 0 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ include::{asciidoctor-source}/bom.adoc[]

include::{asciidoctor-source}/configuration.adoc[]

include::{asciidoctor-source}/boot2docker-dockermachine.adoc[]

include::{asciidoctor-source}/build-containers.adoc[]

include::{asciidoctor-source}/compose.adoc[]
Expand All @@ -57,8 +55,6 @@ include::{asciidoctor-source}/kubernetes.adoc[]

include::{asciidoctor-source}/fabric8.adoc[]

include::{asciidoctor-source}/forge.adoc[]
fabiobrz marked this conversation as resolved.
Show resolved Hide resolved

endif::generated-doc[]

== Future work
Expand Down
4 changes: 3 additions & 1 deletion containerless/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@
</build>

<properties>
<containerless.skip.tests>false</containerless.skip.tests>
<skipTests>${containerless.skip.tests}</skipTests>
<tests.exp.node>**/*Node*</tests.exp.node>
<tests.exp.undertow>**/*Daytime*</tests.exp.undertow>
<tests.container.node>node</tests.container.node>
<tests.container.undertow>daytime</tests.container.undertow>
<docker.api.version>1.12</docker.api.version>
<docker.api.version>1.30</docker.api.version>
<docker.api.url>tcp://localhost:2375</docker.api.url>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.net.URL;
import java.net.UnknownHostException;
import org.arquillian.cube.docker.impl.requirement.RequiresDocker;
import org.arquillian.cube.docker.impl.requirement.RequiresDockerMachine;
import org.arquillian.cube.requirement.ArquillianConditionalRunner;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.test.api.ArquillianResource;
Expand All @@ -22,8 +21,7 @@
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

@Category({RequiresDocker.class, RequiresDockerMachine.class})
@RequiresDockerMachine(name = "dev")
@Category({RequiresDocker.class})
@RunWith(ArquillianConditionalRunner.class)
public class DaytimeTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.net.URL;
import java.net.UnknownHostException;
import org.arquillian.cube.docker.impl.requirement.RequiresDocker;
import org.arquillian.cube.docker.impl.requirement.RequiresDockerMachine;
import org.arquillian.cube.requirement.ArquillianConditionalRunner;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.test.api.ArquillianResource;
Expand All @@ -22,8 +21,7 @@
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

@Category({RequiresDocker.class, RequiresDockerMachine.class})
@RequiresDockerMachine(name = "dev")
@Category({RequiresDocker.class})
@RunWith(ArquillianConditionalRunner.class)
public class NodeTest {

Expand Down
1 change: 0 additions & 1 deletion containerless/src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

<extension qualifier="docker">
<property name="serverVersion">${docker.api.version}</property>
<property name="machineName">dev</property>
<property name="definitionFormat">CUBE</property>
<property name="dockerContainers">
daytime:
Expand Down
4 changes: 2 additions & 2 deletions containerless/src/test/resources/node/DockerfileTemplate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:0.11.14
FROM node:22.5.1

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand All @@ -7,4 +7,4 @@ ADD ${deployableFilename} /usr/src/app
RUN npm install
EXPOSE 8080

CMD [ "npm", "start" ]
CMD [ "npm", "start" ]
4 changes: 2 additions & 2 deletions containerless/src/test/resources/undertow/DockerfileTemplate
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM java:7
FROM openjdk:11

WORKDIR /usr/src/server
COPY ${deployableFilename} /usr/src/server/${deployableFilename}
EXPOSE 8080
CMD ["java", "-jar", "${deployableFilename}"]
CMD ["java", "-jar", "${deployableFilename}"]

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.arquillian.cube.docker.impl.client.config.DockerCompositions;
import org.arquillian.cube.docker.impl.model.DockerMachineDistro;
import org.arquillian.cube.docker.impl.util.ConfigUtil;
import org.arquillian.cube.docker.impl.util.DockerMachine;
import org.arquillian.cube.docker.impl.util.HomeResolverUtil;
import org.arquillian.cube.impl.util.IOUtil;
import org.arquillian.cube.spi.AutoStartParser;
Expand All @@ -26,13 +25,7 @@ public class CubeDockerConfiguration {
public static final String CERT_PATH = "certPath";
public static final String TLS_VERIFY = "tlsVerify";
public static final String DOCKER_CONTAINERS = "dockerContainers";
public static final String BOOT2DOCKER_PATH = "boot2dockerPath";
public static final String DOCKER_MACHINE_PATH = "dockerMachinePath";
public static final String DOCKER_MACHINE_NAME = "machineName";
public static final String DOCKER_MACHINE_DRIVER = "machineDriver";
public static final String AUTO_START_ORDER = "autoStartOrder";
public static final String DOCKER_MACHINE_CUSTOM_PATH = "dockerMachineCustomPath";
public static final String DOCKER_MACHINE_ARQUILLIAN_PATH = "~/.arquillian/machine";
public static final String CUBE_SPECIFIC_PROPERTIES = "cubeSpecificProperties";
public static final String CLEAN = "clean";
public static final String REMOVE_VOLUMES = "removeVolumes";
Expand All @@ -54,7 +47,6 @@ public class CubeDockerConfiguration {
private String dockerServerUri;
private String dockerRegistry;
private String boot2DockerPath;
private String dockerMachinePath;
private String machineName;
private String username;
private String password;
Expand Down Expand Up @@ -93,18 +85,6 @@ public static CubeDockerConfiguration fromMap(Map<String, String> map, Injector
cubeConfiguration.dockerInsideDockerResolution = Boolean.parseBoolean(map.get(DIND_RESOLUTION));
}

if (map.containsKey(BOOT2DOCKER_PATH)) {
cubeConfiguration.boot2DockerPath = map.get(BOOT2DOCKER_PATH);
}

if (map.containsKey(DOCKER_MACHINE_PATH)) {
cubeConfiguration.dockerMachinePath = map.get(DOCKER_MACHINE_PATH);
}

if (map.containsKey(DOCKER_MACHINE_NAME)) {
cubeConfiguration.machineName = map.get(DOCKER_MACHINE_NAME);
}

if (map.containsKey(USERNAME)) {
cubeConfiguration.username = map.get(USERNAME);
}
Expand Down Expand Up @@ -281,15 +261,6 @@ public static String resolveUrl(String machineVersion) {
+ DockerMachineDistro.resolveDistro();
}

public static File resolveMachinePath(String machineCustomPath, String machineVersion) {
if (StringUtils.isBlank(machineCustomPath)) {
machineCustomPath = DOCKER_MACHINE_ARQUILLIAN_PATH;
}
String dockerMachineFile = HomeResolverUtil.resolveHomeDirectoryChar(
machineCustomPath + "/" + machineVersion + "/" + DockerMachine.DOCKER_MACHINE_EXEC);
return new File(dockerMachineFile);
}

public String getDockerServerUri() {
return dockerServerUri;
}
Expand All @@ -306,21 +277,11 @@ public String getDockerRegistry() {
return dockerRegistry;
}

public String getBoot2DockerPath() {
return boot2DockerPath;
}

public String getDockerMachinePath() {
return dockerMachinePath;
}

public String getMachineName() {
return machineName;
}

public boolean isDockerMachineName() {
return this.getMachineName() != null;
}

public String getUsername() {
return username;
Expand Down Expand Up @@ -394,15 +355,6 @@ public String toString() {
if (dockerRegistry != null) {
content.append(" ").append(DOCKER_REGISTRY).append(" = ").append(dockerRegistry).append(lineSeparator);
}
if (boot2DockerPath != null) {
content.append(" ").append(BOOT2DOCKER_PATH).append(" = ").append(boot2DockerPath).append(lineSeparator);
}
if (dockerMachinePath != null) {
content.append(" ").append(DOCKER_MACHINE_PATH).append(" = ").append(dockerMachinePath).append(lineSeparator);
}
if (machineName != null) {
content.append(" ").append(DOCKER_MACHINE_NAME).append(" = ").append(machineName).append(lineSeparator);
}
if (username != null) {
content.append(" ").append(USERNAME).append(" = ").append(username).append(lineSeparator);
}
Expand Down
Loading
Loading