-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy path.gitlab-ci.yml
53 lines (48 loc) · 948 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
51
52
53
stages:
- verify
- build
- release
- publish
services:
- docker:19.03.12-dind
image: usvc/ci-docker:ea51c3b2
before_script:
- apk add --no-cache git make
lint:
stage: verify
script:
- make lint
except: ["tags"]
build:
stage: build
cache:
key: ${CI_JOB_NAME}
paths:
- ./images
artifacts:
expire_in: 1 week
paths:
- ./images
- ./trivy.json
except: ["tags"]
script:
- make package
- make export
- make test
- make scan
# ref https://gitlab.com/usvc/images/ci/recipes#version-bump-gitlab-configurations
version bump:
stage: release
only: ["master"]
image: usvc/ci:version-bump-gitlab
script: ["entrypoint"]
publish:
stage: publish
dependencies: [build]
only: ["tags"]
script:
- make import
- docker login ${DOCKER_REGISTRY_URL} -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASSWORD}
- make publish
after_script:
- docker logout