Initial Commit

This commit is contained in:
BloxerHD 2026-02-12 11:56:29 +00:00
commit c09b00ff35
30 changed files with 1930 additions and 0 deletions

43
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,43 @@
default:
image: quay.io/podman/stable
stages:
- test
- build
- retag
test:
stage: test
image: rust:alpine3.22
script:
- cargo test
build-and-push-image:
stage: build
script:
- apk add --no-cache musl-dev openssl-dev openssl-libs-static protobuf-dev lld
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- podman build -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" .
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
push-retagged-branch:
stage: retag
script:
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA"
- podman tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA" "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: on_success
push-retagged-latest:
stage: retag
script:
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- podman tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$CI_REGISTRY_IMAGE:latest"
- podman push "$CI_REGISTRY_IMAGE:latest"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"
when: on_success