-
Notifications
You must be signed in to change notification settings - Fork 78
/
Copy path.gitlab-ci.yml
78 lines (74 loc) · 2.68 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
# Usage tips:
# - working on something, and need that to be built first? Temporarily, insert
# a stage before the others.
# - to make gitlab skip jobs, prepend its name with . (a dot).
# - gitlab: don't forget to set the builds option to clone instead of git fetch
# see Project Settings -> Builds. Fixes issues new builds not being 100%
# clean builds.
# - In Project Settings you can also increase the max build time, default 60
# minutes, to, for example, 180 minutes.
stages:
- build
- deploy
build-scarthgap-full:
variables:
SSTATE: "build from cache"
script:
- make CONFIG=scarthgap reconf fetch-all build/conf/bblayers.conf
- if [ "$SSTATE" = "yes" ]; then
export BBPATH_EXTRA="$PWD/sites/ci-mirror:" && make mc-venus;
else
rm -rf /media/data/venus/sstate-cache-tmp;
export BBPATH_EXTRA="$PWD/sites/ci-master:" && make mc-venus;
fi
- if [ "$SSTATE" != "yes" ]; then
[ -e /media/data/venus/sstate-cache ] && mv -f /media/data/venus/sstate-cache /media/data/venus/sstate-cache-old;
mv /media/data/venus/sstate-cache-tmp /media/data/venus/sstate-cache;
[ -e /media/data/venus/sstate-cache-old ] && rm -rf /media/data/venus/sstate-cache-old;
fi
- ./ci-populate-artifacts.sh scarthgap
stage: build
tags:
- venus
- linux
artifacts:
expire_in: 1 week
paths:
- artifacts-scarthgap.tgz
only:
- master
except:
- tags
build-scarthgap:
script:
- make CONFIG=scarthgap reconf fetch-all build/conf/bblayers.conf
- export BBPATH_EXTRA="$PWD/sites/ci-mirror:" && make machines
- ./ci-populate-artifacts.sh scarthgap
- ./ci-upload-artifacts-to-build-feeds.sh $CI_COMMIT_REF_NAME
# trigger a pipeline on venus-tests repo; master branch; and pass our branch
# in the BRANCH variable
- "curl -X POST -F token=56bd8d45f917e9ff0ff396005a8c98 -F ref=master \
-F variables[BRANCH]=$CI_COMMIT_REF_NAME https://git.victronenergy.com/api/v4/projects/221/trigger/pipeline"
stage: build
tags:
- venus
- linux
except:
- tags
- master
deploy:
only:
- master
script:
- rm -rf artifacts; find . -maxdepth 1 -name "artifacts-*.tgz" -exec tar -xf {} \;
- ./ci-upload-artifacts-to-build-feeds.sh $CI_COMMIT_REF_NAME
- ./ci-upload-artifacts-to-www.sh
# trigger a pipeline on venus-tests repo; master branch; and pass our branch in the BRANCH variable
- "curl -X POST -F token=56bd8d45f917e9ff0ff396005a8c98 -F ref=master -F variables[BRANCH]=$CI_COMMIT_REF_NAME \
-F variables[PUSH_TO_TESTING]=yes https://git.victronenergy.com/api/v4/projects/221/trigger/pipeline"
stage: deploy
tags:
- venus
- linux
except:
- tags