forked from superna9999/meta-meson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
53 lines (47 loc) · 1.53 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
variables:
IMAGE_TAG: "2021-09-28-1"
YOCTO_IMAGE: "amlogic-image-headless-initrd"
MACHINE_NAME: "amlogic-s9xxx"
IMAGE_NAME: "uImage"
IMAGE_TYPE: "uimage"
RAMDISK_COMP: "xz"
stages:
- docker
- initrd
build:docker:
stage: docker
tags:
- yocto
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
image: docker:stable
services:
- docker:dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:$IMAGE_TAG && exit 0 || true
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$IMAGE_TAG --tag $CI_REGISTRY_IMAGE:latest scripts/
- docker push $CI_REGISTRY_IMAGE:$IMAGE_TAG
- docker push $CI_REGISTRY_IMAGE:latest
build:initrd:
tags:
- yocto
stage: initrd
image: $CI_REGISTRY_IMAGE:$IMAGE_TAG
before_script:
- mkdir -p results
- rm -rf /tmp/build_env
- git clone https://github.com/openembedded/openembedded-core --branch=dunfell --depth=1 /tmp/build_env
- git clone https://github.com/openembedded/bitbake --branch=1.46 --depth=1 /tmp/build_env/bitbake
- git clone $(pwd) /tmp/build_env/$(basename $(pwd))
script:
- bash scripts/prepare.sh /tmp/build_env
- bash scripts/build.sh /tmp/build_env $MACHINE_NAME $YOCTO_IMAGE
- cp -ar /tmp/build_env/build/tmp*/deploy/images/$MACHINE_NAME/* $CI_PROJECT_DIR/results/
artifacts:
when: always
paths:
- results/