summaryrefslogtreecommitdiffstats
path: root/scripts/ci/gitlab/docker.yml
diff options
context:
space:
mode:
authorLaurent Bonnans <laurent.bonnans@here.com>2019-07-05 17:45:39 +0200
committerMykhaylo Sul <ext-mykhaylo.sul@here.com>2019-07-17 16:06:42 +0300
commitf7cfd440884fc76c8b898aa5bdf9f39ebdb8e8f5 (patch)
treead615659dd2317eaf2e0e97dab44e4181075cca1 /scripts/ci/gitlab/docker.yml
parent0f9c821ff0d55b29984b129f648ff7718aebc82f (diff)
downloadmeta-updater-Backport/thud/secondaries.tar.gz
Reusable meta-updater pipeline suiteBackport/thud/secondaries
Squashed: * Oe-selftest GitLab pipeline stage * Use credentials for CI's oe-selftest * Setup kvm trick for docker on CI The gid of the kvm group needs to match the one from the host * Run ci scripts from Docker images * Template out jobs and split .gitlab-ci.yml To be easily reused in other branches and projects Rely on this gitlab feature: https://docs.gitlab.com/ee/ci/yaml/#extends * More flexible checkout script for CI - can work without $CURRENT_PROJECT (checks out everything) - can take a list of pinned versions * Add optional CI jobs ptest and other oe-selftests * Publish bitbaked images as artifacts Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
Diffstat (limited to 'scripts/ci/gitlab/docker.yml')
-rw-r--r--scripts/ci/gitlab/docker.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/ci/gitlab/docker.yml b/scripts/ci/gitlab/docker.yml
new file mode 100644
index 0000000..827bb47
--- /dev/null
+++ b/scripts/ci/gitlab/docker.yml
@@ -0,0 +1,37 @@
1.bb_docker_local:
2 # intended to be run on meta-updater's master branch which contains the
3 # reference docker files
4 # parameters:
5 # - BITBAKE_IMAGE
6 # - BITBAKE_CHECKOUT_IMAGE
7 # - BITBKAE_IMAGE_MASTER
8 # - BITBAKE_CHECKOUT_IMAGE_MASTER
9 image: docker:stable
10 stage: docker
11 services:
12 - docker:dind
13 before_script:
14 - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
15 script:
16 - docker pull "$BITBAKE_IMAGE" || docker pull "$BITBKAE_IMAGE_MASTER" || true
17 - docker build --pull --cache-from "$BITBKAE_IMAGE_MASTER" --cache-from "$BITBAKE_IMAGE" -f ./scripts/ci/Dockerfile.bitbake -t "$BITBAKE_IMAGE" ./scripts/ci
18 - docker push "$BITBAKE_IMAGE"
19
20 - docker pull "$BITBAKE_CHECKOUT_IMAGE" || docker pull "$BITBAKE_CHECKOUT_IMAGE_MASTER" || true
21 - docker build --pull --cache-from "$BITBAKE_CHECKOUT_IMAGE_MASTER" --cache-from "$BITBAKE_CHECKOUT_IMAGE" -f ./scripts/ci/Dockerfile.checkout -t "$BITBAKE_CHECKOUT_IMAGE" ./scripts/ci
22 - docker push "$BITBAKE_CHECKOUT_IMAGE"
23
24.bb_docker_remote:
25 # intended to be run on other branches and repos: just pulls the last master image
26 # parameters:
27 # - BITBAKE_IMAGE
28 # - BITBAKE_CHECKOUT_IMAGE
29 image: docker:stable
30 stage: docker
31 services:
32 - docker:dind
33 before_script:
34 - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
35 script:
36 - docker pull "$BITBAKE_IMAGE"
37 - docker pull "$BITBAKE_CHECKOUT_IMAGE"