1
0
Fork 0
This repository has been archived on 2025-01-13. You can view files and clone it, but cannot push or open issues or pull requests.
gitlab-hetzner-runner/.gitlab-ci.yml

35 lines
930 B
YAML
Raw Permalink Normal View History

image: quay.io/sheogorath/build-ah-engine
2019-05-04 14:04:44 +02:00
variables:
LANG: C.UTF-8
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
2019-05-04 14:04:44 +02:00
stages:
- analyse
2019-05-04 14:04:44 +02:00
- build
- test
2020-04-09 20:24:19 +02:00
- cleanup_test
- tag
2019-05-04 14:04:44 +02:00
- deploy
build:
2019-05-04 14:04:44 +02:00
stage: build
2022-08-13 16:00:14 +00:00
tags:
2022-08-13 16:45:29 +00:00
- privileged-ram-4gb
2019-05-04 14:04:44 +02:00
script:
- podman build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
2019-05-04 14:04:44 +02:00
tagging-master:
stage: tag
2022-08-13 16:00:14 +00:00
tags:
2022-08-13 16:45:29 +00:00
- privileged-ram-4gb
2019-05-04 14:04:44 +02:00
script:
- podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
2023-09-24 16:00:43 +02:00
- si-tagging -l "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$CI_REGISTRY_IMAGE" "$(grep -e 'FROM docker.io/gitlab/gitlab-runner:' Dockerfile | sed -e 's/.*:.*v//')"
- podman images --format "{{.Repository}}:{{.Tag}}" "$CI_REGISTRY_IMAGE" | grep "$CI_REGISTRY_IMAGE" | xargs -L 1 podman push
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'