-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (43 loc) · 1.5 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
image: docker:27
variables:
# using "docker" as the host is only possible if you alias the service below
DOCKER_HOST: tcp://docker:2375
# could be wrong here but although Docker defaults to overlay2,
# Docker-in-Docker (DIND) does not according to the following GitLab doc:
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-overlayfs-driver
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
services:
- name: docker:27-dind
alias: docker
# in our experience although you'd assume this would be sufficient, this did
# nothing to prevent connection errors without `DOCKER_TLS_CERTDIR` being set
# to an empty string, and I would call that beyond mildly infuriating.
command: ["--tls=false", "--mtu=1450"]
before_script:
- apk add --no-cache bash
- apk add --no-cache openssh-client
- apk add --no-cache git
- apk add --no-cache python3
- apk add --no-cache py3-pip
- apk add --no-cache py3-yaml
- apk add --no-cache py3-dotenv
- eval $(ssh-agent -s)
- echo "$GITHUB_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- git submodule init
- git submodule update
- ./build/submodule_branch.sh $CI_COMMIT_BRANCH
- echo $CI_REGISTRY_PASSWORD | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
stages:
- build
build-all-job:
stage: build
only:
- master
- dev
script:
- /bin/bash -c "python3 scripts/buildall.py"
interruptible: true