Compare commits
3 commits
56a68bc867
...
92db958781
Author | SHA1 | Date | |
---|---|---|---|
92db958781 | |||
c1af92e895 | |||
1b07762974 |
3 changed files with 38 additions and 3 deletions
|
@ -13,8 +13,7 @@ labels:
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- java
|
- oci-image-cache-build
|
||||||
- nodejs
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-only:
|
build-only:
|
||||||
|
@ -32,6 +31,8 @@ steps:
|
||||||
pull_image: false
|
pull_image: false
|
||||||
platforms: ${PLATFORM}
|
platforms: ${PLATFORM}
|
||||||
dry-run: true
|
dry-run: true
|
||||||
|
build_args:
|
||||||
|
- SETUP_IMAGE=rg.fr-par.scw.cloud/hamburghammer/dchat/setup-image:${CI_PIPELINE_NUMBER}
|
||||||
when:
|
when:
|
||||||
- event: [push, manual]
|
- event: [push, manual]
|
||||||
branch:
|
branch:
|
||||||
|
@ -52,5 +53,7 @@ steps:
|
||||||
pull_image: false
|
pull_image: false
|
||||||
platforms: ${PLATFORM}
|
platforms: ${PLATFORM}
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
|
build_args:
|
||||||
|
- SETUP_IMAGE=rg.fr-par.scw.cloud/hamburghammer/dchat/setup-image:${CI_PIPELINE_NUMBER}
|
||||||
when:
|
when:
|
||||||
- branch: main
|
- branch: main
|
||||||
|
|
29
.woodpecker/oci-image-cache-build.yml
Normal file
29
.woodpecker/oci-image-cache-build.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
matrix:
|
||||||
|
PLATFORM:
|
||||||
|
# - linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
|
labels:
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- java
|
||||||
|
- nodejs
|
||||||
|
|
||||||
|
steps:
|
||||||
|
build:
|
||||||
|
image: woodpeckerci/plugin-docker-buildx:2.3.0
|
||||||
|
group: build
|
||||||
|
settings:
|
||||||
|
registry: rg.fr-par.scw.cloud/hamburghammer
|
||||||
|
username: nologin
|
||||||
|
password:
|
||||||
|
from_secret: docker_token
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: setup-image
|
||||||
|
repo: rg.fr-par.scw.cloud/hamburghammer/dchat/setup-image
|
||||||
|
tag: ${CI_PIPELINE_NUMBER}
|
||||||
|
pull_image: false
|
||||||
|
platforms: ${PLATFORM}
|
||||||
|
when:
|
||||||
|
- branch: main
|
|
@ -1,14 +1,17 @@
|
||||||
# syntax=docker/dockerfile:1.4.0
|
# syntax=docker/dockerfile:1.4.0
|
||||||
|
|
||||||
ARG MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress -Dmaven.test.skip"
|
ARG MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress -Dmaven.test.skip"
|
||||||
|
ARG SETUP_IMAGE=setup-image
|
||||||
|
|
||||||
# Copy all project files
|
# Copy all project files
|
||||||
FROM docker.io/maven:3.9-eclipse-temurin-21 AS setup
|
FROM docker.io/maven:3.9-eclipse-temurin-21 AS setup-image
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN --mount=type=cache,target=/root/.m2/ \
|
RUN --mount=type=cache,target=/root/.m2/ \
|
||||||
mvn ${MAVEN_CLI_OPTS} package
|
mvn ${MAVEN_CLI_OPTS} package
|
||||||
|
|
||||||
|
FROM ${SETUP_IMAGE} as setup
|
||||||
|
|
||||||
# Create final monolith
|
# Create final monolith
|
||||||
FROM docker.io/eclipse-temurin:21-jdk-jammy AS monolith
|
FROM docker.io/eclipse-temurin:21-jdk-jammy AS monolith
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
Loading…
Reference in a new issue