-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (41 loc) · 1.16 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
---
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ''
DOCKER_DRIVER: overlay2
.docker:
image: docker:27.5.0
services:
- name: docker:27.5.0-rc.1-dind
command:
- --tls=false
before_script:
- docker info
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
- apk update && apk upgrade
- apk add --no-cache git go
- export PATH=$PATH:$HOME/go/bin/
- go env -w GOPRIVATE=github.com/SlinkyProject/*
test:
extends: .docker
script:
- apk update && apk upgrade
- apk add --no-cache make bash shellcheck shfmt pre-commit
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- go install golang.org/x/vuln/cmd/govulncheck@latest
- pre-commit run --verbose --all-files --show-diff-on-failure
coverage: /total:\s+\(statements\)\s+\d+.\d+%/
artifacts:
expire_in: 7 days
paths:
- cover.html
- govulnreport.txt
include:
- template: Jobs/Secret-Detection.gitlab-ci.yml
secret_detection:
allow_failure: false
artifacts:
when: on_failure
expire_in: 7 days
paths:
- gl-secret-detection-report.json