mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 15:02:40 +00:00
Build the docker images and push them to the gitalb registry
This commit is contained in:
parent
2c1531ab57
commit
d9604ca8d2
2 changed files with 53 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- "build runtime"
|
||||||
|
- "build base"
|
||||||
|
|
||||||
test manifest:
|
test manifest:
|
||||||
image: "fedora"
|
image: "fedora"
|
||||||
|
@ -12,4 +14,53 @@ test manifest:
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
junit:
|
junit:
|
||||||
- "junit.xml"
|
- "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
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
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
|
# Add rpmfusion repositories and install all build dependencies of GStreamer
|
||||||
RUN dnf builddep -y \
|
RUN dnf builddep -y \
|
||||||
|
|
Loading…
Reference in a new issue