Setup releasing
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Ryan Harg 2024-11-28 10:58:12 +01:00
parent caa7e7a5dc
commit f6415a90d7
2 changed files with 80 additions and 1 deletions

View file

@ -0,0 +1,30 @@
when:
- event: tag
steps:
- name: push-image
image: eclipse-temurin:21-jdk-alpine
environment:
REGISTRY_USERNAME:
from_secret: registry_username
REGISTRY_PASSWORD:
from_secret: registry_password
commands:
- ./mvnw compile jib-maven-plugin:build -Ddocker.repo.username=$${REGISTRY_USERNAME} -Ddocker.repo.password=$${REGISTRY_PASSWORD}
- name: notify
image: deblan/woodpecker-email
settings:
debug: true
dsn:
from_secret: smtp_url
from:
address:
from_secret: email_sender
name: "Woodpecker CI"
recipients_only: true
recipients:
from_secret: email_recipient
when:
status:
- failure

49
pom.xml
View file

@ -19,8 +19,19 @@
<mockito.version>5.14.1</mockito.version>
<assertj.version>3.26.3</assertj.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-release-plugin.version>3.1.1</maven-release-plugin.version>
</properties>
<scm>
<connection>scm:git:ssh://git@git.azw27.de:ryan_harg/ddns-client.git</connection>
<developerConnection>scm:git:ssh://git@git.azw27.de:ryan_harg/ddns-client.git</developerConnection>
<url>https://git.azw27.de/ryan_harg/ddns-client</url>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
@ -149,6 +160,44 @@
</systemPropertyVariables>
</configuration>
</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>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>${maven-scm-plugin.version}</version>
<configuration>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<dryRun>true</dryRun>
</configuration>
</plugin>
</plugins>
</build>