-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
38 lines (34 loc) · 866 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
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TCP_PORT: 2375
DOCKER_TLS_CERTDIR: ""
CONTAINER_NAME: registry.gitlab.pztrn.name/fastpastebin/fastpastebin
DIND_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:dind
GOLANGCILINT_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.40.1-alpine
services:
- name: ${DIND_IMAGE}
alias: docker
stages:
- test
- build
lint:
stage: test
image: ${GOLANGCILINT_IMAGE}
tags:
- docker
script:
- golangci-lint run ./...
build:
stage: build
image: $DIND_IMAGE
tags:
- docker
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- source docker/set_docker_tag.sh
- docker build -t $CONTAINER_NAME:$DOCKER_TAG .
- docker push $CONTAINER_NAME:$DOCKER_TAG
only:
- tags
- master