fastpastebin/.gitlab-ci.yml

39 lines
867 B
YAML
Raw Normal View History

2019-09-25 18:47:51 +05:00
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
2021-06-14 23:05:59 +05:00
DOCKER_TCP_PORT: 2375
2019-09-25 18:47:51 +05:00
DOCKER_TLS_CERTDIR: ""
2021-06-14 23:05:59 +05:00
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
2019-09-25 18:47:51 +05:00
services:
- name: ${DIND_IMAGE}
alias: docker
2019-09-25 18:47:51 +05:00
stages:
2021-06-14 23:05:59 +05:00
- test
2019-09-25 18:47:51 +05:00
- build
2021-06-14 23:05:59 +05:00
lint:
stage: test
image: ${GOLANGCILINT_IMAGE}
tags:
- docker
script:
- golangci-lint run ./...
2019-09-25 18:47:51 +05:00
build:
stage: build
2021-06-14 23:05:59 +05:00
image: $DIND_IMAGE
2019-09-25 18:47:51 +05:00
tags:
- docker
script:
2021-06-14 23:08:54 +05:00
#- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
2019-09-25 18:47:51 +05:00
- source docker/set_docker_tag.sh
- docker build -t $CONTAINER_NAME:$DOCKER_TAG .
- docker push $CONTAINER_NAME:$DOCKER_TAG
only:
- tags
2021-01-09 06:23:28 +05:00
- master