5 # Test just one basic build, if succeds procced to test the rest
8 # Run multiple builds and tests, multi-distro, multi-arch
18 - dnf install -y python3-pytest python3-pytest-cov python3-requests
20 - pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
21 coverage: '/TOTAL.*\s+(\d+%)$/'
28 - 'gitlab/build_manifest.py'
31 image: "docker:stable"
35 # When using dind, it's wise to use the overlayfs driver for
36 # improved performance.
37 DOCKER_DRIVER: "overlay2"
40 - export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
41 - export REF="${IMAGE}:${CI_COMMIT_SHA}"
42 - export LATEST="${IMAGE}:latest"
44 - docker build --pull -f ${DOCKERFILE} -t ${LATEST} ${CONTEXT_DIR}
46 # If we are in a fork, push the image to the reigstry regardless the branch
48 if [ "$CI_PROJECT_NAMESPACE" != "gstreamer" ]; then
49 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
53 # Push the images to the upstream registry
55 if [ "$CI_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
56 # Tag the image with the git ref
57 docker image tag ${LATEST} ${REF}
59 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
64 alpine amd64 manifest builder docker:
65 stage: "build runtime"
68 TAG: "alpine-manifest-build"
69 CONTEXT_DIR: "docker/runtime-images/"
70 DOCKERFILE: "docker/runtime-images/Dockerfile-manifest-builder"
74 - 'docker/runtime-images/Dockerfile-manifest-builder'
75 - 'gitlab/build_manifest.py'
77 fedora amd64 run docker:
78 stage: "build runtime"
82 CONTEXT_DIR: "docker/runtime-images/"
83 DOCKERFILE: "docker/runtime-images/Dockerfile-fedora"
87 - 'docker/runtime-images/Dockerfile-fedora'
89 fedora amd64 build docker:
94 CONTEXT_DIR: "docker/build-base-images/"
95 DOCKERFILE: "docker/build-base-images/Dockerfile-fedora"
99 - 'docker/build-base-images/Dockerfile-fedora'
101 ubuntu amd64 run docker:
102 stage: "build runtime"
105 TAG: "ubuntu-runtime"
106 CONTEXT_DIR: "docker/runtime-images/"
107 DOCKERFILE: "docker/runtime-images/Dockerfile-ubuntu"
111 - 'docker/runtime-images/Dockerfile-ubuntu'
113 ubuntu amd64 build docker:
118 CONTEXT_DIR: "docker/build-base-images/"
119 DOCKERFILE: "docker/build-base-images/Dockerfile-ubuntu"
123 - 'docker/build-base-images/Dockerfile-ubuntu'
125 include: "gitlab/ci_template.yml"
127 # Test the build job against the latest build image tag and the local manifest
128 build fedora x86_64 local:
131 image: "${CI_REGISTRY_IMAGE}/amd64/fedora-build:latest"
133 build ubuntu x86_64 local:
136 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dlibav=disabled"
137 image: "${CI_REGISTRY_IMAGE}/amd64/ubuntu-build:latest"