-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
31 lines (21 loc) · 755 Bytes
/
.gitlab-ci.yml
File metadata and controls
31 lines (21 loc) · 755 Bytes
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
image: docker:git
services:
- docker:19.03.0-dind
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_TLS_CERTDIR: "" # TODO This is a temp fix
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- git submodule sync --recursive
- git submodule update --init --recursive --remote
stages:
- build
build_job1:
stage: build
script:
- docker pull $CI_REGISTRY/$CONTAINER_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY/$CONTAINER_IMAGE:latest --tag $CI_REGISTRY/$CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY/$CONTAINER_IMAGE:latest .
- docker push $CI_REGISTRY/$CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY/$CONTAINER_IMAGE:latest
only:
- master