diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 9eaa80f..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -image: quay.io/podman/stable - -stages: - - build - - push - -variables: - IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG - -before_script: - - echo -n $CI_REGISTRY_PASSWORD | podman login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY - -build: - stage: build - script: - - podman build -t $IMAGE_TAG . - - podman push $IMAGE_TAG - when: manual diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml new file mode 100644 index 0000000..4a50072 --- /dev/null +++ b/.woodpecker/publish.yaml @@ -0,0 +1,35 @@ +when: +- event: tag + +clone: +- name: git + image: woodpeckerci/plugin-git + settings: + partial: false + tags: true + depth: 0 + +steps: +- name: publish + image: quay.io/podman/stable + environment: + REGISTRY: registry.mnl.de + REGISTRY_USER: mnl + REGISTRY_TOKEN: + from_secret: REGISTRY_TOKEN + commands: + # Because we run this as user 1000 to make podman work: + - git config --global --add safe.directory $(pwd) + - export IMAGE_TAG=$(git describe --tags) + - echo $IMAGE_TAG + - export IMAGE_REF="$REGISTRY/$REGISTRY_USER/jdk21-builder:$IMAGE_TAG" + - echo $REGISTRY_TOKEN | podman login -u $REGISTRY_USER --password-stdin $REGISTRY + - echo Building image $IMAGE_REF + - podman build -t $IMAGE_REF . + - podman push $IMAGE_REF + backend_options: + kubernetes: + securityContext: + privileged: true + runAsUser: 1000 + runAsGroup: 1000 diff --git a/Containerfile b/Containerfile index 77f4561..4a2e1e4 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,8 @@ -FROM docker.io/fedora:40 +# Podman for running in container pre-installed +# See https://www.redhat.com/en/blog/podman-inside-container +FROM quay.io/podman/stable -RUN dnf install -y java-21-openjdk-headless nodejs python gcc gcc-c++ git podman +RUN dnf install -y java-21-openjdk-headless nodejs python \ + gcc gcc-c++ git graphviz ruby CMD ["/bin/bash"]