diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..9eaa80f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +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 deleted file mode 100644 index 4a50072..0000000 --- a/.woodpecker/publish.yaml +++ /dev/null @@ -1,35 +0,0 @@ -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 4a2e1e4..77f4561 100644 --- a/Containerfile +++ b/Containerfile @@ -1,8 +1,5 @@ -# Podman for running in container pre-installed -# See https://www.redhat.com/en/blog/podman-inside-container -FROM quay.io/podman/stable +FROM docker.io/fedora:40 -RUN dnf install -y java-21-openjdk-headless nodejs python \ - gcc gcc-c++ git graphviz ruby +RUN dnf install -y java-21-openjdk-headless nodejs python gcc gcc-c++ git podman CMD ["/bin/bash"]