Verified Commit d9604ca8 authored by Jordan Petridіs's avatar Jordan Petridіs 🌱
Browse files

Build the docker images and push them to the gitalb registry

parent 2c1531ab
stages:
- test
- "build runtime"
- "build base"
test manifest:
image: "fedora"
......@@ -12,4 +14,53 @@ test manifest:
artifacts:
reports:
junit:
- "junit.xml"
\ No newline at end of file
- "junit.xml"
.base:
image: "docker:stable"
services:
- docker:dind
variables:
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: "overlay2"
script:
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
- export REF="${IMAGE}:${CI_COMMIT_SHA}"
- export LATEST="${IMAGE}:latest"
- docker build --pull -f ${DOCKERFILE} -t ${REF} ${CONTEXT_DIR}
- docker image tag ${REF} ${LATEST}
# Push the images
- |
if [ "$CI_COMMIT_REF_NAME" = "master" ]; then
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
docker push ${REF}
docker push ${LATEST}
fi
only:
changes:
- ".gitlab-ci.yml"
- "docker/**"
- "docker/*/**"
fedora amd64 run:
stage: "build runtime"
variables:
ARCH: "amd64"
TAG: "fedora-runtime"
CONTEXT_DIR: "docker/runtime-images/"
DOCKERFILE: "docker/runtime-images/Dockerfile-fedora"
extends: .base
fedora amd64 build:
stage: "build base"
variables:
ARCH: "amd64"
TAG: "fedora-build"
CONTEXT_DIR: "docker/build-base-images/"
DOCKERFILE: "docker/build-base-images/Dockerfile-fedora"
extends: .base
FROM registry.freedesktop.org/thiblahute/gst-ci/fedora-runtime
FROM registry.freedesktop.org/thiblahute/gst-ci/amd64/fedora-runtime
# Add rpmfusion repositories and install all build dependencies of GStreamer
RUN dnf builddep -y \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment