1 include: "gitlab/ci_template.yml"
9 # use the binaries in some way
17 image: 'registry.freedesktop.org/gstreamer/gst-ci/amd64/test-manifest:2019-10-23-793476'
20 - pytest-3 --junitxml=junit.xml --cov=build_manifest gitlab/build_manifest.py
21 coverage: '/TOTAL.*\s+(\d+%)$/'
27 # have a special definition for the test if the image already exists
28 .check_image: &check_image_exists |
32 if [[ -z "$GST_FORCE_REBUILD" ]]
34 # disable exit on failure
37 # check if our image is already in the current registry
38 # we store the sha of the digest and the layers
39 skopeo inspect docker://$LOCAL_IMAGE | jq '[.Digest, .Layers]' > local_sha
41 # check if our image is already in the upstream registry
42 if [[ -z "$GST_UPSTREAM_REPO" ]]
44 echo "WARNING! Variable \$GST_UPSTREAM_REPO is undefined, cannot check for images"
46 skopeo inspect docker://$GST_UPSTREAM_IMAGE | jq '[.Digest, .Layers]' > upstream_sha
49 # reenable exit on failure
52 # if the upstream repo has an image, ensure we use the same
53 if [ -s upstream_sha ]
56 # ensure we use the same image from upstream
57 diff upstream_sha local_sha && exit 0 || true
59 # copy the original image into the current project registry namespace
60 # we do 2 attempts with skopeo copy at most
61 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
62 docker://$GST_UPSTREAM_IMAGE \
63 docker://$LOCAL_IMAGE || \
64 skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD \
65 docker://$GST_UPSTREAM_IMAGE \
71 # if we have a local image but none in the upstream repo, use our
81 image: 'registry.fedoraproject.org/fedora:32'
90 BUILDAH_FORMAT: 'docker'
91 BUILDAH_ISOLATION: 'chroot'
93 # FIXME: Probably needs to be changed to none and clone gst-ci repo each time, sigh
94 # as these jobs *could* run potentially in a fork of smth like -bad
95 # though given our current setup, its only possible to tweak the CI from a gst-ci
96 # fork so it might be fine
102 - export LOCAL_IMAGE="$CI_REGISTRY_IMAGE/$REPO_SUFFIX:$TAG"
103 - export GST_UPSTREAM_IMAGE="$GST_UPSTREAM_REPO/$REPO_SUFFIX:$TAG"
106 - echo $GST_UPSTREAM_IMAGE
108 # FIXME: make an image since there will be multiple jobs running every pipeline
109 - dnf install -y buildah skopeo jq runc
111 # Newer versions of podman/buildah try to set overlayfs mount options when
112 # using the vfs driver, and this causes errors.
113 - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
115 - *check_image_exists
117 - echo "Building image $LOCAL_IMAGE"
121 --build-arg DEFAULT_BRANCH=$GST_UPSTREAM_BRANCH
122 --arch=${ARCH:=amd64}
123 --label ci.job_id=$CI_JOB_ID
124 --label pipeline.url=$CI_PIPELINE_URL
125 --label git.ref_name=$CI_COMMIT_REF_NAME
126 --label git.sha=$CI_COMMIT_SHA
127 --label gitlab.project_path=$CI_PROJECT_PATH
128 --label gitlab.project_url=$CI_PROJECT_URL
129 --label fdo.upstream-repo=$GST_UPSTREAM_REPO
130 --label fdo.expires-after="3w"
135 - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
140 if [ "$CI_PROJECT_PATH" = "gstreamer/gst-ci" ]; then
141 if [ "$LOCAL_IMAGE" != "$GST_UPSTREAM_IMAGE" ]; then
142 echo "ERROR!!! AAAAA! THE IMAGE URI DOES NOT MATCH THE EXPECTED UPSTREAM ONE"
144 echo $GST_UPSTRAM_IMAGE
149 - buildah push $LOCAL_IMAGE
151 alpine amd64 manifest builder docker:
152 stage: "build docker"
154 TAG: "build-manifest"
155 CONTEXT_DIR: "docker/build_manifest/"
156 DOCKERFILE: "docker/build_manifest/Dockerfile"
159 test manifest amd64 docker:
160 stage: "build docker"
163 CONTEXT_DIR: "docker/test_manifest/"
164 DOCKERFILE: "docker/test_manifest/Dockerfile"
167 gst-indent amd64 docker:
168 stage: "build docker"
171 CONTEXT_DIR: "docker/indent/"
172 DOCKERFILE: "docker/indent/Dockerfile"
176 stage: "build docker"
178 REPO_SUFFIX: "amd64/fedora"
179 TAG: "2020-06-18.0-$GST_UPSTREAM_BRANCH"
181 CONTEXT_DIR: "docker/fedora/"
182 DOCKERFILE: "docker/fedora/Dockerfile"
185 cerbero fedora amd64 docker:
186 stage: "build docker"
188 TAG: "cerbero-fedora"
189 CONTEXT_DIR: "docker/cerbero/"
190 DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
194 stage: "build docker"
197 CONTEXT_DIR: "docker/android/"
198 DOCKERFILE: "docker/android/Dockerfile"
201 .local_rules: &local_rules
203 - if: '$CI_COMMIT_REF_NAME == "master" && $CI_PROJECT_PATH == "gstreamer/gst-ci"'
208 .local_template: &local_template
213 # Test the build job against the latest build image tag and the local manifest
214 build fedora x86_64 local:
217 image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
226 build cerbero fedora x86_64 local:
227 extends: 'build cerbero fedora x86_64'
228 image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
231 build cerbero cross-android universal local:
232 extends: 'build cerbero cross-android universal'
233 image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
236 build cerbero cross win32 local:
237 extends: 'build cerbero cross win32'
238 image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
241 build cerbero cross win64 local:
242 extends: 'build cerbero cross win64'
243 image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
246 # Note: dependencies: will be deprecated in the future, but current manual
247 # jobs with needs: (even if they are allowed to fail) will leave the pipeline
249 .test fedora x86_64 local:
250 image: '${CI_REGISTRY_IMAGE}/amd64/fedora:latest'
255 extends: '.test fedora x86_64 local'
257 TEST_SUITE: 'check.gst*'
259 cross-android universal examples local:
260 extends: '.cross-android universal examples'
261 image: "${CI_REGISTRY_IMAGE}/amd64/android:latest"
264 - 'build cerbero cross-android universal local'
266 integration testsuites fedora local:
267 extends: '.test fedora x86_64 local'
269 - rm -f gst-build/build/subprojects/gstreamer-vaapi/gst/vaapi/libgstvaapi.so
271 EXTRA_VALIDATE_ARGS: "--timeout-factor=2 --retry-on-failures"
272 TEST_SUITE: "validate ges"