-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
50 lines (40 loc) · 919 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
default:
tags:
- dev
- developers
variables:
DOCKER_IMAGE: "code.usgs.gov:5001/devops/images/usgs/docker:20"
# Do not run for merge requests
workflow:
rules:
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
stages:
- end-to-end
.docker_login:
before_script:
- |
test -n "${CI_REGISTRY_USER}" -a -n "${CI_REGISTRY_PASSWORD}" \
&& echo "${CI_REGISTRY_PASSWORD}" | \
docker login \
--username "${CI_REGISTRY_USER}" \
--password-stdin \
"${CI_REGISTRY}";
cache:
paths:
- .trivy/
services:
- alias: docker
name: "${DOCKER_IMAGE}-dind"
End To End Test:
extends:
- .docker_login
image: "${DOCKER_IMAGE}"
script:
- LOCAL_IMAGE="wasp"
- docker build --build-arg CI_REGISTRY="True" -t "${LOCAL_IMAGE}" .
- docker run wasp
stage: end-to-end
variables:
DOCKER_DRIVER: overlay2