Configure image build and push
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Ryan Harg 2024-11-28 14:03:15 +01:00
parent be18cb44d5
commit 62c30c7e50
2 changed files with 10 additions and 30 deletions

View file

@ -10,7 +10,7 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: registry_password from_secret: registry_password
commands: commands:
- ./mvnw compile jib-maven-plugin:build -Ddocker.repo.username=$${REGISTRY_USERNAME} -Ddocker.repo.password=$${REGISTRY_PASSWORD} - ./mvnw clean install -Dquarkus.container-image.push=true -Dquarkus.container-image.image=$${REGISTRY_URL}/ddnsclient/ddnsclient -Dquarkus.container-image.additional-tags=v1.0.0 -Dquarkus.container-image.username=$${REGISTRY_USERNAME} -Dquarkus.container-image.password=$${REGISTRY_PASSWORD}
- name: notify - name: notify
image: deblan/woodpecker-email image: deblan/woodpecker-email

38
pom.xml
View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.rpr</groupId> <groupId>de.rpr</groupId>
<artifactId>ddnsclient</artifactId> <artifactId>ddnsclient</artifactId>
@ -18,9 +19,6 @@
<mockito.version>5.14.1</mockito.version> <mockito.version>5.14.1</mockito.version>
<assertj.version>3.26.3</assertj.version> <assertj.version>3.26.3</assertj.version>
<dnsjava.version>3.6.2</dnsjava.version> <dnsjava.version>3.6.2</dnsjava.version>
<jib.version>3.4.4</jib.version>
<docker.repo.username />
<docker.repo.password />
<maven-scm-plugin.version>2.1.0</maven-scm-plugin.version> <maven-scm-plugin.version>2.1.0</maven-scm-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version> <maven-release-plugin.version>3.1.1</maven-release-plugin.version>
<project.scm.id>git-azw27-de</project.scm.id> <project.scm.id>git-azw27-de</project.scm.id>
@ -29,8 +27,8 @@
<scm> <scm>
<connection>scm:git:https://git.azw27.de/ryan_harg/ddns-client.git</connection> <connection>scm:git:https://git.azw27.de/ryan_harg/ddns-client.git</connection>
<developerConnection>scm:git:https://git.azw27.de/ryan_harg/ddns-client.git</developerConnection> <developerConnection>scm:git:https://git.azw27.de/ryan_harg/ddns-client.git</developerConnection>
<tag>HEAD</tag> <tag>HEAD</tag>
</scm> </scm>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
@ -72,6 +70,10 @@
<artifactId>dnsjava</artifactId> <artifactId>dnsjava</artifactId>
<version>${dnsjava.version}</version> <version>${dnsjava.version}</version>
</dependency> </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-jib</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId> <artifactId>quarkus-junit5</artifactId>
@ -90,8 +92,8 @@
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId> <artifactId>assertj-core</artifactId>
<scope>test</scope>
<version>${assertj.version}</version> <version>${assertj.version}</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
@ -160,28 +162,6 @@
</systemPropertyVariables> </systemPropertyVariables>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<to>
<image>registry.azw27.de/ddnsclient/ddnsclient</image>
<tags>
<tag>v${project.version}</tag>
<tag>latest</tag>
</tags>
<auth>
<username>${docker.repo.username}</username>
<password>${docker.repo.password}</password>
</auth>
</to>
<container>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>