Skip to content
Snippets Groups Projects
Verified Commit 20e8f4ec authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

Rework build process for SI-GitLab

Update base image, add `.gitlab-ci.yml`, integrate build process with
SI-GitLab features. All in all, getting a first image build ready to
use.
parent a07d4ae4
No related branches found
No related tags found
No related merge requests found
Pipeline #1926 passed
image: quay.io/sheogorath/build-ah-engine
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
stages:
- analyse
- build
- test
- tag
- deploy
build:
stage: build
script:
- podman build --pull --build-arg "VCS_REF=$CI_COMMIT_SHA" --build-arg "BUILD_DATE=$(date --rfc-3339 ns)" -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- podman push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
tagging-master:
stage: tag
script:
- podman pull "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
- si-tagging -l "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" "$CI_REGISTRY_IMAGE" "$(grep -e 'FROM docker.io/library/haproxy:' Dockerfile | sed -e 's/.*://' -e 's/-alpine$//')"
- podman images --format "{{.Repository}}:{{.Tag}}" "$CI_REGISTRY_IMAGE" | grep "$CI_REGISTRY_IMAGE" | xargs -L 1 podman push
only:
- master
ARG REPO=library
FROM ${REPO}/haproxy:1.9-alpine
FROM docker.io/library/haproxy:1.9.15-alpine
EXPOSE 2375
ENV ALLOW_RESTARTS=0 \
......@@ -37,4 +36,4 @@ LABEL org.label-schema.schema-version="1.0" \
org.label-schema.license=Apache-2.0 \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.vcs-url="https://github.com/Tecnativa/docker-socket-proxy"
org.label-schema.vcs-url="https://git.shivering-isles.com/container-library/docker-socket-proxy"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment