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
|
||||
|
||||
depends_on:
|
||||
- java
|
||||
- nodejs
|
||||
- oci-image-cache-build
|
||||
|
||||
steps:
|
||||
build-only:
|
||||
|
@ -32,6 +31,8 @@ steps:
|
|||
pull_image: false
|
||||
platforms: ${PLATFORM}
|
||||
dry-run: true
|
||||
build_args:
|
||||
- SETUP_IMAGE=rg.fr-par.scw.cloud/hamburghammer/dchat/setup-image:${CI_PIPELINE_NUMBER}
|
||||
when:
|
||||
- event: [push, manual]
|
||||
branch:
|
||||
|
@ -52,5 +53,7 @@ steps:
|
|||
pull_image: false
|
||||
platforms: ${PLATFORM}
|
||||
auto_tag: true
|
||||
build_args:
|
||||
- SETUP_IMAGE=rg.fr-par.scw.cloud/hamburghammer/dchat/setup-image:${CI_PIPELINE_NUMBER}
|
||||
when:
|
||||
- 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
|
||||
|
||||
ARG MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress -Dmaven.test.skip"
|
||||
ARG SETUP_IMAGE=setup-image
|
||||
|
||||
# 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
|
||||
COPY . .
|
||||
RUN --mount=type=cache,target=/root/.m2/ \
|
||||
mvn ${MAVEN_CLI_OPTS} package
|
||||
|
||||
FROM ${SETUP_IMAGE} as setup
|
||||
|
||||
# Create final monolith
|
||||
FROM docker.io/eclipse-temurin:21-jdk-jammy AS monolith
|
||||
WORKDIR /app
|
||||
|
|
Loading…
Reference in a new issue