2018-10-25 10:33:14 +00:00
|
|
|
stages:
|
2018-11-25 00:03:29 +00:00
|
|
|
- "build docker"
|
2018-11-23 16:45:31 +00:00
|
|
|
- "preparation"
|
|
|
|
# Test just one basic build, if succeds procced to test the rest
|
2018-11-09 18:57:45 +00:00
|
|
|
- "build"
|
2018-11-23 16:45:31 +00:00
|
|
|
- "test"
|
|
|
|
# Run multiple builds and tests, multi-distro, multi-arch
|
|
|
|
- "full builds"
|
|
|
|
- "full tests"
|
2018-10-25 10:33:14 +00:00
|
|
|
|
|
|
|
test manifest:
|
2018-11-09 18:57:45 +00:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: fetch
|
2018-12-06 13:30:42 +00:00
|
|
|
image: "registry.freedesktop.org/gstreamer/gst-ci/amd64/test-manifest:5856b05f3010136cebcaa9a90058572e008ae3f6"
|
2018-11-23 16:45:31 +00:00
|
|
|
stage: "preparation"
|
2018-10-25 10:33:14 +00:00
|
|
|
script:
|
|
|
|
- pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
|
|
|
|
coverage: '/TOTAL.*\s+(\d+%)$/'
|
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
junit:
|
2018-11-05 18:52:37 +00:00
|
|
|
- "junit.xml"
|
2018-11-11 12:22:42 +00:00
|
|
|
only:
|
|
|
|
changes:
|
2018-11-22 11:03:23 +00:00
|
|
|
- 'gitlab/build_manifest.py'
|
2018-12-06 03:03:25 +00:00
|
|
|
- 'docker/test_manifest/*'
|
2018-11-05 18:52:37 +00:00
|
|
|
|
|
|
|
.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"
|
2018-11-09 18:57:45 +00:00
|
|
|
GIT_STRATEGY: fetch
|
2018-11-05 18:52:37 +00:00
|
|
|
script:
|
|
|
|
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
|
|
|
|
- export REF="${IMAGE}:${CI_COMMIT_SHA}"
|
|
|
|
- export LATEST="${IMAGE}:latest"
|
|
|
|
|
2018-11-24 22:48:50 +00:00
|
|
|
- docker build --pull -f ${DOCKERFILE} -t ${LATEST} ${CONTEXT_DIR}
|
2018-11-05 18:52:37 +00:00
|
|
|
|
2018-11-12 13:22:18 +00:00
|
|
|
# If we are in a fork, push the image to the reigstry regardless the branch
|
2018-11-05 18:52:37 +00:00
|
|
|
- |
|
2018-11-12 13:22:18 +00:00
|
|
|
if [ "$CI_PROJECT_NAMESPACE" != "gstreamer" ]; then
|
|
|
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
docker push ${LATEST}
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Push the images to the upstream registry
|
|
|
|
- |
|
2018-11-12 16:01:00 +00:00
|
|
|
if [ "$CI_COMMIT_REF_NAME" = "master" -a "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
|
2018-11-24 22:48:50 +00:00
|
|
|
# Tag the image with the git ref
|
|
|
|
docker image tag ${LATEST} ${REF}
|
|
|
|
# Push the tags
|
2018-11-05 18:52:37 +00:00
|
|
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
|
|
docker push ${REF}
|
|
|
|
docker push ${LATEST}
|
|
|
|
fi
|
|
|
|
|
2018-11-11 02:49:57 +00:00
|
|
|
alpine amd64 manifest builder docker:
|
2018-11-26 13:43:59 +00:00
|
|
|
stage: "build docker"
|
2018-11-11 02:49:57 +00:00
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
2018-11-26 13:43:59 +00:00
|
|
|
TAG: "build-manifest"
|
|
|
|
CONTEXT_DIR: "docker/build_manifest/"
|
|
|
|
DOCKERFILE: "docker/build_manifest/Dockerfile"
|
2018-11-11 02:49:57 +00:00
|
|
|
extends: .base
|
2018-11-22 11:01:48 +00:00
|
|
|
only:
|
|
|
|
changes:
|
2018-11-26 13:43:59 +00:00
|
|
|
- 'docker/build_manifest/*'
|
2018-11-22 11:01:48 +00:00
|
|
|
- 'gitlab/build_manifest.py'
|
2018-11-05 18:52:37 +00:00
|
|
|
|
2018-11-30 18:43:39 +00:00
|
|
|
test manifest amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
2018-12-01 11:17:46 +00:00
|
|
|
TAG: "test-manifest"
|
2018-11-30 18:43:39 +00:00
|
|
|
CONTEXT_DIR: "docker/test_manifest/"
|
|
|
|
DOCKERFILE: "docker/test_manifest/Dockerfile"
|
|
|
|
extends: .base
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- 'docker/test_manifest/*'
|
|
|
|
|
2018-11-30 17:57:13 +00:00
|
|
|
gst-indent amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
|
|
|
TAG: "gst-indent"
|
|
|
|
CONTEXT_DIR: "docker/indent/"
|
|
|
|
DOCKERFILE: "docker/indent/Dockerfile"
|
|
|
|
extends: .base
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- 'docker/indent/*'
|
|
|
|
|
2018-11-25 00:03:29 +00:00
|
|
|
fedora amd64 docker:
|
|
|
|
stage: "build docker"
|
2018-11-05 18:52:37 +00:00
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
2018-11-25 00:03:29 +00:00
|
|
|
TAG: "fedora"
|
|
|
|
CONTEXT_DIR: "docker/fedora/"
|
|
|
|
DOCKERFILE: "docker/fedora/Dockerfile"
|
2018-11-05 18:52:37 +00:00
|
|
|
extends: .base
|
2018-11-22 11:01:48 +00:00
|
|
|
only:
|
|
|
|
changes:
|
2018-11-25 00:03:29 +00:00
|
|
|
- 'docker/fedora/*'
|
2018-11-05 18:52:37 +00:00
|
|
|
|
2018-11-26 14:23:58 +00:00
|
|
|
# Cross compile image
|
|
|
|
android 28 amd64 docker:
|
|
|
|
stage: "build docker"
|
2018-11-22 18:24:26 +00:00
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
2018-11-26 14:23:58 +00:00
|
|
|
TAG: "android_28"
|
|
|
|
CONTEXT_DIR: "docker/android/"
|
|
|
|
DOCKERFILE: "docker/android/Dockerfile"
|
2018-11-22 18:24:26 +00:00
|
|
|
extends: .base
|
|
|
|
only:
|
|
|
|
changes:
|
2018-11-26 14:23:58 +00:00
|
|
|
- 'docker/android/*'
|
2018-11-22 18:24:26 +00:00
|
|
|
|
2018-11-14 01:13:13 +00:00
|
|
|
cerbero fedora amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
ARCH: "amd64"
|
|
|
|
TAG: "cerbero-fedora"
|
|
|
|
CONTEXT_DIR: "docker/cerbero/"
|
|
|
|
DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
|
|
|
|
extends: .base
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- 'docker/cerbero/Dockerfile-fedora'
|
|
|
|
|
2018-11-09 18:57:45 +00:00
|
|
|
include: "gitlab/ci_template.yml"
|
2018-11-12 12:37:16 +00:00
|
|
|
|
2018-11-21 14:55:02 +00:00
|
|
|
# Test the build job against the latest build image tag and the local manifest
|
|
|
|
build fedora x86_64 local:
|
2018-11-23 16:48:11 +00:00
|
|
|
extends: '.build'
|
2018-11-23 16:45:31 +00:00
|
|
|
stage: 'build'
|
2018-11-25 00:03:29 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
|
2018-12-04 22:06:00 +00:00
|
|
|
except:
|
|
|
|
refs:
|
|
|
|
- "master@gstreamer/gst-ci"
|
2018-11-22 18:24:26 +00:00
|
|
|
|
2018-11-26 14:23:58 +00:00
|
|
|
build android 28 local:
|
2018-11-23 16:48:11 +00:00
|
|
|
extends: '.build'
|
|
|
|
variables:
|
2018-11-26 14:23:58 +00:00
|
|
|
MESON_ARGS: >
|
|
|
|
-Dbad=enabled
|
|
|
|
-Dbad:androidmedia=enabled
|
|
|
|
--cross-file /android_arm64_28.txt
|
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/android_28:latest"
|
2018-12-04 22:06:00 +00:00
|
|
|
except:
|
|
|
|
refs:
|
|
|
|
- "master@gstreamer/gst-ci"
|