4 # Eventually will replace both of the above stages
7 # Test just one basic build, if succeds procced to test the rest
10 # Run multiple builds and tests, multi-distro, multi-arch
20 - dnf install -y python3-pytest python3-pytest-cov python3-requests
22 - pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
23 coverage: '/TOTAL.*\s+(\d+%)$/'
30 - 'gitlab/build_manifest.py'
33 image: "docker:stable"
37 # When using dind, it's wise to use the overlayfs driver for
38 # improved performance.
39 DOCKER_DRIVER: "overlay2"
42 - export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
43 - export REF="${IMAGE}:${CI_COMMIT_SHA}"
44 - export LATEST="${IMAGE}:latest"
46 - docker build --pull -f ${DOCKERFILE} -t ${LATEST} ${CONTEXT_DIR}
48 # If we are in a fork, push the image to the reigstry regardless the branch
50 if [ "$CI_PROJECT_NAMESPACE" != "gstreamer" ]; then
51 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
55 # Push the images to the upstream registry
57 if [ "$CI_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
58 # Tag the image with the git ref
59 docker image tag ${LATEST} ${REF}
61 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
66 alpine amd64 manifest builder docker:
67 stage: "build runtime"
70 TAG: "alpine-manifest-build"
71 CONTEXT_DIR: "docker/runtime-images/"
72 DOCKERFILE: "docker/runtime-images/Dockerfile-manifest-builder"
76 - 'docker/runtime-images/Dockerfile-manifest-builder'
77 - 'gitlab/build_manifest.py'
84 CONTEXT_DIR: "docker/fedora/"
85 DOCKERFILE: "docker/fedora/Dockerfile"
91 ubuntu amd64 run docker:
92 stage: "build runtime"
96 CONTEXT_DIR: "docker/runtime-images/"
97 DOCKERFILE: "docker/runtime-images/Dockerfile-ubuntu"
101 - 'docker/runtime-images/Dockerfile-ubuntu'
103 ubuntu amd64 build docker:
108 CONTEXT_DIR: "docker/build-base-images/"
109 DOCKERFILE: "docker/build-base-images/Dockerfile-ubuntu"
113 - 'docker/build-base-images/Dockerfile-ubuntu'
115 include: "gitlab/ci_template.yml"
117 # Test the build job against the latest build image tag and the local manifest
118 build fedora x86_64 local:
121 image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
123 build ubuntu x86_64 local:
126 MESON_ARGS: "${DEFAULT_MESON_ARGS} -Dlibav=disabled"
127 image: "${CI_REGISTRY_IMAGE}/amd64/ubuntu-build:latest"