-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
54 lines (47 loc) · 1.24 KB
/
.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
54
image: golang:1.14.2
services:
- docker:dind
stages:
- build
- test
- lint
#- deploy
variables:
KUBECONFIG: /etc/deploy/config
REPOSITORY: and07/boilerplate-go
NAMESPACE: boilerplate-go
TAG: ${CI_BUILD_REF_NAME}_${CI_BUILD_REF}
CONTAINER_IMAGE: docker.io/${REPOSITORY}:${CI_BUILD_REF_NAME}_${CI_BUILD_REF}
CONTAINER_IMAGE_LATEST: docker.io/${REPOSITORY}:latest
build:
stage: build
script:
#- docker login -u $DOCKER_USER -p $DOCKER_PASS docker.io
- make build
test:
stage: test
script:
- make test
lint:
stage: lint
script:
- make lint-full
# deploy:
# stage: deploy
# image: lwolf/helm-kubectl-docker:v193_281
# before_script:
# - mkdir -p /etc/deploy
# - echo ${kube_config} | base64 -d > ${KUBECONFIG}
# - helm init --client-only
# script:
# - cd deployments/kubernetes/boilerplate-go-chart
# - export DEPLOYS=$(helm ls | grep $NAMESPACE | wc -l)
# - >
# if [ ${DEPLOYS} -eq 0 ]; then
# helm install --name=${NAMESPACE} . --namespace=${NAMESPACE} \
# --set replicaCount=${REPLICA_COUNT};
# else
# helm upgrade ${NAMESPACE} . --namespace=${NAMESPACE} \
# --set image.tag=${TAG} \
# --set replicaCount=${REPLICA_COUNT};
# fi