CI: Make the docker build and local jobs manual

While they are very useful, each time we create a branch,
gitlab tries to build all the images which is very resource
intesinve. Thus make all the local images and everything that
depends upon them a manual job and only trigger them before
merging an MR.
This commit is contained in:
Jordan Petridis 2018-12-10 17:35:57 +02:00 committed by Jordan Petridis
parent 1c68f94c68
commit c8c9cad685

View file

@ -20,15 +20,12 @@ test manifest:
reports: reports:
junit: junit:
- "junit.xml" - "junit.xml"
only:
changes:
- 'gitlab/build_manifest.py'
- 'docker/test_manifest/*'
.base: .base:
image: "docker:stable" image: "docker:stable"
services: services:
- docker:dind - docker:dind
when: 'manual'
variables: variables:
# When using dind, it's wise to use the overlayfs driver for # When using dind, it's wise to use the overlayfs driver for
# improved performance. # improved performance.
@ -67,10 +64,6 @@ alpine amd64 manifest builder docker:
CONTEXT_DIR: "docker/build_manifest/" CONTEXT_DIR: "docker/build_manifest/"
DOCKERFILE: "docker/build_manifest/Dockerfile" DOCKERFILE: "docker/build_manifest/Dockerfile"
extends: .base extends: .base
only:
changes:
- 'docker/build_manifest/*'
- 'gitlab/build_manifest.py'
test manifest amd64 docker: test manifest amd64 docker:
stage: "build docker" stage: "build docker"
@ -80,9 +73,6 @@ test manifest amd64 docker:
CONTEXT_DIR: "docker/test_manifest/" CONTEXT_DIR: "docker/test_manifest/"
DOCKERFILE: "docker/test_manifest/Dockerfile" DOCKERFILE: "docker/test_manifest/Dockerfile"
extends: .base extends: .base
only:
changes:
- 'docker/test_manifest/*'
gst-indent amd64 docker: gst-indent amd64 docker:
stage: "build docker" stage: "build docker"
@ -92,9 +82,6 @@ gst-indent amd64 docker:
CONTEXT_DIR: "docker/indent/" CONTEXT_DIR: "docker/indent/"
DOCKERFILE: "docker/indent/Dockerfile" DOCKERFILE: "docker/indent/Dockerfile"
extends: .base extends: .base
only:
changes:
- 'docker/indent/*'
fedora amd64 docker: fedora amd64 docker:
stage: "build docker" stage: "build docker"
@ -104,9 +91,6 @@ fedora amd64 docker:
CONTEXT_DIR: "docker/fedora/" CONTEXT_DIR: "docker/fedora/"
DOCKERFILE: "docker/fedora/Dockerfile" DOCKERFILE: "docker/fedora/Dockerfile"
extends: .base extends: .base
only:
changes:
- 'docker/fedora/*'
# Cross compile image # Cross compile image
android 28 amd64 docker: android 28 amd64 docker:
@ -117,9 +101,6 @@ android 28 amd64 docker:
CONTEXT_DIR: "docker/android/" CONTEXT_DIR: "docker/android/"
DOCKERFILE: "docker/android/Dockerfile" DOCKERFILE: "docker/android/Dockerfile"
extends: .base extends: .base
only:
changes:
- 'docker/android/*'
cerbero fedora amd64 docker: cerbero fedora amd64 docker:
stage: "build docker" stage: "build docker"
@ -129,15 +110,16 @@ cerbero fedora amd64 docker:
CONTEXT_DIR: "docker/cerbero/" CONTEXT_DIR: "docker/cerbero/"
DOCKERFILE: "docker/cerbero/Dockerfile-fedora" DOCKERFILE: "docker/cerbero/Dockerfile-fedora"
extends: .base extends: .base
only:
changes:
- 'docker/cerbero/Dockerfile-fedora'
include: "gitlab/ci_template.yml" include: "gitlab/ci_template.yml"
.build local:
extends: '.build'
when: 'manual'
# Test the build job against the latest build image tag and the local manifest # Test the build job against the latest build image tag and the local manifest
build fedora x86_64 local: build fedora x86_64 local:
extends: '.build' extends: '.build local'
stage: 'build' stage: 'build'
image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest" image: "${CI_REGISTRY_IMAGE}/amd64/fedora:latest"
except: except:
@ -145,7 +127,7 @@ build fedora x86_64 local:
- "master@gstreamer/gst-ci" - "master@gstreamer/gst-ci"
build android 28 local: build android 28 local:
extends: '.build' extends: '.build local'
variables: variables:
MESON_ARGS: > MESON_ARGS: >
-Dbad=enabled -Dbad=enabled
@ -159,6 +141,7 @@ build android 28 local:
build cerbero fedora x86_64 local: build cerbero fedora x86_64 local:
extends: '.build cerbero fedora x86_64' extends: '.build cerbero fedora x86_64'
image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest" image: "${CI_REGISTRY_IMAGE}/amd64/cerbero-fedora:latest"
when: 'manual'
except: except:
refs: refs:
- "master@gstreamer/gst-ci" - "master@gstreamer/gst-ci"
@ -168,6 +151,7 @@ build cerbero fedora x86_64 local:
extends: '.test' extends: '.test'
dependencies: dependencies:
- build fedora x86_64 local - build fedora x86_64 local
when: 'manual'
except: except:
refs: refs:
- "master@gstreamer/gst-ci" - "master@gstreamer/gst-ci"