2020-02-10 13:09:49 +00:00
|
|
|
include: "gitlab/ci_template.yml"
|
|
|
|
|
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"
|
2019-06-12 05:38:14 +00:00
|
|
|
- "pre-build"
|
2018-11-09 18:57:45 +00:00
|
|
|
- "build"
|
2018-11-23 16:45:31 +00:00
|
|
|
- "test"
|
2019-06-12 05:38:14 +00:00
|
|
|
# use the binaries in some way
|
|
|
|
- "integrate"
|
2018-10-25 10:33:14 +00:00
|
|
|
|
|
|
|
test manifest:
|
2018-11-09 18:57:45 +00:00
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: fetch
|
2020-03-04 22:30:06 +00:00
|
|
|
rules:
|
|
|
|
- when: 'always'
|
2019-10-24 12:13:03 +00:00
|
|
|
image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/test-manifest:2019-10-23-793476'
|
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"
|
|
|
|
|
|
|
|
.base:
|
2020-06-10 11:39:32 +00:00
|
|
|
image: 'registry.fedoraproject.org/fedora:32'
|
2020-03-04 22:30:06 +00:00
|
|
|
extends:
|
|
|
|
- '.global_ci_policy'
|
2020-04-15 16:54:15 +00:00
|
|
|
tags: ['gstreamer']
|
2020-03-04 22:30:06 +00:00
|
|
|
rules:
|
|
|
|
- when: 'manual'
|
|
|
|
allow_failure: true
|
2018-11-05 18:52:37 +00:00
|
|
|
variables:
|
2019-03-26 18:40:35 +00:00
|
|
|
STORAGE_DRIVER: 'vfs'
|
|
|
|
BUILDAH_FORMAT: 'docker'
|
2020-06-10 11:39:32 +00:00
|
|
|
BUILDAH_ISOLATION: 'chroot'
|
2018-11-09 18:57:45 +00:00
|
|
|
GIT_STRATEGY: fetch
|
2018-11-05 18:52:37 +00:00
|
|
|
script:
|
2019-03-26 12:00:31 +00:00
|
|
|
- export DATE=$(date +"%Y-%m-%d")
|
2020-06-10 11:39:32 +00:00
|
|
|
- export IMAGE="$CI_REGISTRY_IMAGE/${ARCH:=amd64}/$TAG"
|
|
|
|
- export _UID="$IMAGE:$DATE-$GST_UPSTREAM_BRANCH"
|
|
|
|
- export LATEST="$IMAGE:latest"
|
2018-11-05 18:52:37 +00:00
|
|
|
|
2019-03-26 18:40:35 +00:00
|
|
|
- dnf install -y buildah runc
|
|
|
|
# Newer versions of podman/buildah try to set overlayfs mount options when
|
|
|
|
# using the vfs driver, and this causes errors.
|
|
|
|
- sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
|
|
|
|
|
2020-06-10 11:39:32 +00:00
|
|
|
- echo "Building image $_UID"
|
|
|
|
|
|
|
|
- >
|
|
|
|
buildah bud
|
|
|
|
--build-arg DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH
|
|
|
|
--arch=${ARCH:=amd64}
|
|
|
|
--label ci.job_id=$CI_JOB_ID
|
|
|
|
--label pipeline.url=$CI_PIPELINE_URL
|
|
|
|
--label git.ref_name=$CI_COMMIT_REF_NAME
|
|
|
|
--label git.sha=$CI_COMMIT_SHA
|
|
|
|
--label gitlab.project_path=$CI_PROJECT_PATH
|
|
|
|
--label gitlab.project_url=$CI_PROJECT_URL
|
|
|
|
-f $DOCKERFILE
|
|
|
|
-t $IMAGE
|
|
|
|
$CONTEXT_DIR
|
|
|
|
|
|
|
|
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
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
|
2020-06-10 11:39:32 +00:00
|
|
|
# Tag the image with the git ref
|
|
|
|
buildah tag $_UID $LATEST
|
|
|
|
# Only push the :latest so with each push the previous
|
|
|
|
# image in the forked registry gets overrwritten
|
|
|
|
# to avoid bloating the registry and making
|
|
|
|
# pruning easier for the gitlab admins
|
|
|
|
buildah push $LATEST
|
2018-11-12 13:22:18 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Push the images to the upstream registry
|
|
|
|
- |
|
2020-01-07 07:28:21 +00:00
|
|
|
if [ "$CI_PROJECT_NAMESPACE" = "gstreamer" ]; then
|
2020-06-10 11:39:32 +00:00
|
|
|
buildah push $_UID
|
2018-11-05 18:52:37 +00:00
|
|
|
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:
|
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-05 18:52:37 +00:00
|
|
|
|
2018-11-30 18:43:39 +00:00
|
|
|
test manifest amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
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
|
|
|
|
|
2018-11-30 17:57:13 +00:00
|
|
|
gst-indent amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
TAG: "gst-indent"
|
|
|
|
CONTEXT_DIR: "docker/indent/"
|
|
|
|
DOCKERFILE: "docker/indent/Dockerfile"
|
|
|
|
extends: .base
|
|
|
|
|
2018-11-25 00:03:29 +00:00
|
|
|
fedora amd64 docker:
|
|
|
|
stage: "build docker"
|
2018-11-05 18:52:37 +00:00
|
|
|
variables:
|
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-14 01:13:13 +00:00
|
|
|
cerbero fedora amd64 docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
TAG: "cerbero-fedora"
|
|
|
|
CONTEXT_DIR: "docker/cerbero/"
|
|
|
|
DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
|
|
|
|
extends: .base
|
|
|
|
|
2019-03-24 10:41:31 +00:00
|
|
|
android docker:
|
|
|
|
stage: "build docker"
|
|
|
|
variables:
|
|
|
|
TAG: "android"
|
|
|
|
CONTEXT_DIR: "docker/android/"
|
|
|
|
DOCKERFILE: "docker/android/Dockerfile"
|
|
|
|
extends: .base
|
|
|
|
|
2020-03-04 22:30:06 +00:00
|
|
|
.local_rules: &local_rules
|
2020-03-04 14:58:38 +00:00
|
|
|
rules:
|
|
|
|
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "gstreamer/gst-ci"'
|
|
|
|
when: 'never'
|
|
|
|
- when: 'manual'
|
2020-03-04 22:30:06 +00:00
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
.local_template: &local_template
|
|
|
|
<<: *local_rules
|
2019-08-27 11:26:28 +00:00
|
|
|
needs:
|
|
|
|
- 'manifest'
|
2018-12-10 15:35:57 +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:
|
2020-03-04 22:30:06 +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"
|
2019-09-11 13:50:27 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: '5 days'
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- "manifest.xml"
|
|
|
|
- "gst-build/"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_template
|
2018-11-22 18:24:26 +00:00
|
|
|
|
2018-11-16 02:47:34 +00:00
|
|
|
build cerbero fedora x86_64 local:
|
2020-06-09 19:40:45 +00:00
|
|
|
extends: 'build cerbero fedora x86_64'
|
2018-11-16 02:47:34 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_template
|
2018-11-21 15:24:00 +00:00
|
|
|
|
2019-09-11 07:45:21 +00:00
|
|
|
build cerbero cross-android universal local:
|
2020-06-09 19:40:45 +00:00
|
|
|
extends: 'build cerbero cross-android universal'
|
2018-12-18 02:58:39 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_template
|
2018-12-18 02:58:39 +00:00
|
|
|
|
2018-12-18 02:58:39 +00:00
|
|
|
build cerbero cross win32 local:
|
2020-06-09 19:40:45 +00:00
|
|
|
extends: 'build cerbero cross win32'
|
2018-12-18 02:58:39 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_template
|
2018-12-18 02:58:39 +00:00
|
|
|
|
|
|
|
build cerbero cross win64 local:
|
2020-06-09 19:40:45 +00:00
|
|
|
extends: 'build cerbero cross win64'
|
2018-12-18 02:58:39 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_template
|
2018-12-18 02:58:39 +00:00
|
|
|
|
2020-03-04 22:30:06 +00:00
|
|
|
# Note: dependencies: will be deprecated in the future, but current manual
|
|
|
|
# jobs with needs: (even if they are allowed to fail) will leave the pipeline
|
|
|
|
# pending.
|
2018-11-21 15:24:00 +00:00
|
|
|
.test fedora x86_64 local:
|
|
|
|
image: '${CI_REGISTRY_IMAGE}/amd64/fedora:latest'
|
|
|
|
extends: '.test'
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_rules
|
2018-11-21 15:24:00 +00:00
|
|
|
|
|
|
|
check fedora local:
|
|
|
|
extends: '.test fedora x86_64 local'
|
|
|
|
variables:
|
|
|
|
TEST_SUITE: 'check.gst*'
|
2019-03-24 06:56:01 +00:00
|
|
|
|
2019-09-11 07:45:21 +00:00
|
|
|
cross-android universal examples local:
|
|
|
|
extends: '.cross-android universal examples'
|
2019-03-24 06:56:01 +00:00
|
|
|
image: "${CI_REGISTRY_IMAGE}/amd64/android:latest"
|
2020-03-04 22:30:06 +00:00
|
|
|
<<: *local_rules
|
2019-03-24 06:56:01 +00:00
|
|
|
dependencies:
|
2020-03-04 22:30:06 +00:00
|
|
|
- 'build cerbero cross-android universal local'
|
2019-03-27 19:44:36 +00:00
|
|
|
|
|
|
|
integration testsuites fedora local:
|
|
|
|
extends: '.test fedora x86_64 local'
|
|
|
|
before_script:
|
|
|
|
- rm -f gst-build/build/subprojects/gstreamer-vaapi/gst/vaapi/libgstvaapi.so
|
|
|
|
variables:
|
|
|
|
EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures"
|
|
|
|
TEST_SUITE: "validate ges"
|