-
Notifications
You must be signed in to change notification settings - Fork 20
/
.gitlab-ci.yml
82 lines (77 loc) · 2.23 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
image: ntc-registry.githost.io/nextthingco/buildroot-development-container:testing
stages:
- build
- howitzer
- upload
variables:
GADGET_CONTAINER: ${CI_REGISTRY}/nextthingco/buildroot-development-container:testing
HOWITZER_CONTAINER: ${CI_REGISTRY}/gadget/howitzer-container:master
NAND_TYPE: Toshiba_512M_SLC
UPLOAD_CONTAINER: ${CI_REGISTRY}/nextthingco/ci-tools:${GHVAR_UPLOAD_CONTAINER_BRANCH}
ARTIFACT_0: output/images/rootfs.ubi.sparse
ARTIFACT_1: output/images/spl-40000-1000-100.bin
ARTIFACT_2: output/images/uboot-40000.bin
ARTIFACT_3: output/images/uboot.script
ARTIFACT_4: output/images/${CI_BUILD_REF_SLUG}-chip-pro-${CI_PROJECT_NAME}-b${CI_PIPELINE_ID}-${NAND_TYPE}.chp
GHVAR_SLACK_CHANNEL: ${GHVAR_SLACK_CHANNEL}
GHVAR_SLACK_HOOK: ${GHVAR_SLACK_HOOK}
SSH_KEY_DIR: /root/.ssh/
no_docker: "something"
build:
stage: build
tags: [aws-auto-runner]
script:
- mkdir ${SSH_KEY_DIR}/
- ssh-keyscan ntc.githost.io > ${SSH_KEY_DIR}/known_hosts
- echo "${SSH_KEY_SECRET}" > ${SSH_KEY_DIR}/id_rsa
- echo "${SSH_CONFIG}" > ${SSH_KEY_DIR}/ssh_config
- chmod 0600 ${SSH_KEY_DIR}/*
- scripts/build-gadget make -s chippro_defconfig
- scripts/build-gadget make -s
- ls /opt/output/images
- mkdir -p output
- mv /opt/output/images output/images
artifacts:
expire_in: 2 days
when: always
paths:
- output/images/*
howitzer:
image: ntc-registry.githost.io/gadget/howitzer-container:master
stage: howitzer
tags: [aws-auto-runner]
dependencies:
- build
script:
- ls output/images
- /bin/bash -x scripts/flash-gadget
- howitzer nand ${NAND_TYPE} chp fel.chp chp fastboot.chp -f ${ARTIFACT_4}
artifacts:
expire_in: 2 days
when: always
paths:
- output/images/*
upload:
image: ntc-registry.githost.io/nextthingco/ci-tools:unstable
stage: upload
tags: [aws-auto-runner]
dependencies:
- build
- howitzer
script:
- ls -al
- mkdir -p /upload
- mv output /upload/output
- cd /upload
- ls -al /upload/output/images
- ci-s3-upload
${ARTIFACT_0}
${ARTIFACT_1}
${ARTIFACT_2}
${ARTIFACT_3}
${ARTIFACT_4}
artifacts:
expire_in: 2 days
when: always
paths:
- /upload/*