jdk21-builder/.woodpecker/publish.yaml

37 lines
880 B
YAML
Raw Normal View History

2025-08-09 13:30:30 +02:00
when:
2025-08-10 18:24:19 +02:00
- event: tag
2025-08-10 11:11:56 +02:00
2025-08-10 17:39:32 +02:00
clone:
- name: git
image: woodpeckerci/plugin-git
settings:
partial: false
2025-08-10 17:43:57 +02:00
tags: true
2025-08-10 18:02:35 +02:00
depth: 0
2025-08-10 17:39:32 +02:00
2025-08-09 13:30:30 +02:00
steps:
2025-08-10 11:11:56 +02:00
- name: publish
2025-08-09 17:32:47 +02:00
image: quay.io/podman/stable
2025-08-10 12:14:42 +02:00
environment:
REGISTRY: registry.mnl.de
REGISTRY_USER: mnl
REGISTRY_TOKEN:
from_secret: REGISTRY_TOKEN
2025-08-09 13:30:30 +02:00
commands:
2025-08-10 18:24:19 +02:00
# Because we run this as user 1000 to make podman work:
2025-08-10 18:14:12 +02:00
- git config --global --add safe.directory $(pwd)
2025-08-10 12:42:46 +02:00
- export IMAGE_TAG=$(git describe --tags)
2025-08-10 18:09:16 +02:00
- echo $IMAGE_TAG
2025-08-10 12:42:46 +02:00
- export IMAGE_REF="$REGISTRY/$REGISTRY_USER/jdk21-builder:$IMAGE_TAG"
2025-08-10 12:14:42 +02:00
- echo $REGISTRY_TOKEN | podman login -u $REGISTRY_USER --password-stdin $REGISTRY
2025-08-10 12:42:46 +02:00
- echo Building image $IMAGE_REF
2025-08-10 18:24:19 +02:00
- podman build -t $IMAGE_REF .
- podman push $IMAGE_REF
2025-08-09 17:32:47 +02:00
backend_options:
kubernetes:
securityContext:
privileged: true
2025-08-09 22:23:18 +02:00
runAsUser: 1000
runAsGroup: 1000