-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
26 lines (25 loc) · 950 Bytes
/
.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
stages:
- build
build-image:
stage: build
allow_failure: false
image: oklischat/armbox-build:latest
script:
- git clone http://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/armbox-myconfig.git
- 'echo "using config repo commit: $(git -C armbox-myconfig log --format=format:%H -1)"'
- (cd armbox-myconfig/; git ls-files | xargs -i cp --parents {} ..)
- rm -rf armbox-myconfig
# ugly hack to determine where the $pwd is located on the host
- containerid=$(docker ps | grep $(hostname) | awk '{print $1}')
- hostpath=$(docker container inspect $containerid | jq '.[0].Mounts[] | select(.Destination=="/builds") | .Source' -r)
- export DOCKER_HOST_SRC="$hostpath/$(echo $PWD | sed 's!^/builds/!!')"
- export DOCKER_RUN_NOTTY=1
# run actual build
- make build-docker
cache:
paths:
- output/debs/
when: always
artifacts:
paths:
- output/images/