Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-rs committed Jun 6, 2023
2 parents ea4c1f7 + 5ac4d0f commit 5abcc74
Show file tree
Hide file tree
Showing 36 changed files with 480 additions and 1,029 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,29 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: 📁 Check out the repository
uses: actions/checkout@v3

- name: 🏗 Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'

- name: Build with Gradle
run: gradle build
- name: 🐳 Check Docker version
run: docker version

- name: 🐳 Check running containers
run: docker ps

- name: 🔨 Build the project
run: gradle build -x test --stacktrace
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 🧪 Run tests
run: gradle test --stacktrace
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 13 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ subprojects {
apply plugin: 'maven-publish'
apply plugin: "com.github.johnrengelman.shadow"

version = '1.3.2'
version = '1.3.3'
group = 'io.github.nullptr'

java {
Expand Down Expand Up @@ -40,6 +40,18 @@ subprojects {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.slf4j:log4j-over-slf4j:2.0.6'
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}

publishing {
publications {
mavenJava(MavenPublication) { publication ->
Expand Down
4 changes: 2 additions & 2 deletions docker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api 'com.github.docker-java:docker-java-transport-zerodep:3.2.13'
api 'com.github.docker-java:docker-java:3.2.13'
api 'com.github.docker-java:docker-java-transport-zerodep:3.3.1'
api 'com.github.docker-java:docker-java:3.3.1'
api project(':tools')
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.github.dockerjava.core.DockerClientImpl;
import com.github.dockerjava.zerodep.ZerodepDockerHttpClient;
import io.github.nullptr.tools.builder.IBuilder;
import io.github.nullptr.tools.docker.container.DockerContainerManager;
import io.github.nullptr.tools.docker.container.ContainerManager;
import io.github.nullptr.tools.docker.image.DockerImageManager;
import io.github.nullptr.tools.docker.infos.DockerInfoManager;
import io.github.nullptr.tools.docker.network.DockerNetworkManager;
Expand Down Expand Up @@ -50,7 +50,7 @@ public class DockerManager {
/**
* The container manager.
*/
private final DockerContainerManager containerManager;
private final ContainerManager containerManager;

/**
* The Docker manager constructor, used to manage all the docker operations through the API.
Expand All @@ -70,7 +70,7 @@ public class DockerManager {
this.swarmManager = new DockerSwarmManager(this);
this.volumeManager = new DockerVolumeManager(this);
this.networkManager = new DockerNetworkManager(this);
this.containerManager = new DockerContainerManager(this);
this.containerManager = new ContainerManager(this);
}

/**
Expand Down Expand Up @@ -125,7 +125,7 @@ public DockerNetworkManager getNetworkManager() {
* Get the container manager.
* @return The container manager.
*/
public DockerContainerManager getContainerManager() {
public ContainerManager getContainerManager() {
return this.containerManager;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
/**
* The manager for docker containers.
*/
public class DockerContainerManager {
public class ContainerManager {

/**
* The logger.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(DockerContainerManager.class);
private static final Logger LOGGER = LoggerFactory.getLogger(ContainerManager.class);

/**
* The docker manager.
Expand All @@ -32,7 +32,7 @@ public class DockerContainerManager {
* The docker container manager constructor.
* @param manager The manager, to get Docker client instance.
*/
public DockerContainerManager(DockerManager manager) {
public ContainerManager(DockerManager manager) {
this.manager = manager;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.github.nullptr.tools.docker.utils;

import io.github.nullptr.tools.platform.PlatformHelper;
import io.github.nullptr.tools.platform.PlatformOS;
import org.slf4j.LoggerFactory;

/**
Expand Down Expand Up @@ -38,8 +40,8 @@ public enum DockerHost {
* @return The host.
*/
public String getHost() {
if (System.getProperty("os.name").toLowerCase().contains("win") && this.host.startsWith("unix://")) {
LoggerFactory.getLogger(DockerHost.class).warn("Windows does not support unix sockets. Using tcp instead.");
if (PlatformHelper.isOn(PlatformOS.WINDOWS) && this.host.startsWith("unix://")) {
LoggerFactory.getLogger(DockerHost.class).warn("Windows does not support unix sockets. Use tcp instead.");
}

return this.host;
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 0 additions & 4 deletions redis/build.gradle

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5abcc74

Please sign in to comment.