4 # Test just one basic build, if succeds procced to test the rest
7 # Run multiple builds and tests, multi-distro, multi-arch
17 - dnf install -y python3-pytest python3-pytest-cov python3-requests
19 - pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
20 coverage: '/TOTAL.*\s+(\d+%)$/'
27 - 'gitlab/build_manifest.py'
30 image: "docker:stable"
34 # When using dind, it's wise to use the overlayfs driver for
35 # improved performance.
36 DOCKER_DRIVER: "overlay2"
39 - export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
40 - export REF="${IMAGE}:${CI_COMMIT_SHA}"
41 - export LATEST="${IMAGE}:latest"
43 - docker build --pull -f ${DOCKERFILE} -t ${LATEST} ${CONTEXT_DIR}
45 # If we are in a fork, push the image to the reigstry regardless the branch
47 if [ "$CI_PROJECT_NAMESPACE" != "gstreamer" ]; then
48 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
52 # Push the images to the upstream registry
54 if [ "$CI_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
55 # Tag the image with the git ref
56 docker image tag ${LATEST} ${REF}
58 docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
63 alpine amd64 manifest builder docker:
68 CONTEXT_DIR: "docker/build_manifest/"
69 DOCKERFILE: "docker/build_manifest/Dockerfile"
73 - 'docker/build_manifest/*'
74 - 'gitlab/build_manifest.py'
76 test manifest amd64 docker:
81 CONTEXT_DIR: "docker/test_manifest/"
82 DOCKERFILE: "docker/test_manifest/Dockerfile"
86 - 'docker/test_manifest/*'
88 gst-indent amd64 docker:
93 CONTEXT_DIR: "docker/indent/"
94 DOCKERFILE: "docker/indent/Dockerfile"
101 stage: "build docker"
105 CONTEXT_DIR: "docker/fedora/"
106 DOCKERFILE: "docker/fedora/Dockerfile"
112 # Cross compile image
113 android 28 amd64 docker:
114 stage: "build docker"
118 CONTEXT_DIR: "docker/android/"
119 DOCKERFILE: "docker/android/Dockerfile"
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:latest"
133 build android 28 local:
138 -Dbad:androidmedia=enabled
139 --cross-file /android_arm64_28.txt
140 image: "${CI_REGISTRY_IMAGE}/amd64/android_28:latest"