forked from ssvlabs/eth2-key-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
43 lines (38 loc) · 1.07 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
stages:
- lint
- gosec
- test
variables:
#GLOBAL
IMAGE_NAME: eth2-key-manager
#STAGE
ACCOUNT_ID_INFRA_STAGE: 121827225315
AWS_REGION_INFRA_STAGE: "us-west-2"
DOCKER_REPO_INFRA_STAGE: $ACCOUNT_ID_INFRA_STAGE.dkr.ecr.$AWS_REGION_INFRA_STAGE.amazonaws.com/$IMAGE_NAME
APP_REPLICAS_INFRA_STAGE: "1"
ECRLOGIN_INFRA_STAGE: "aws ecr get-login --registry-ids $ACCOUNT_ID_INFRA_STAGE --region $AWS_REGION_INFRA_STAGE --no-include-email"
STAGE_GO_IMAGE: golang:1.18-bullseye
Run linter:
stage: lint
image: $STAGE_GO_IMAGE
tags:
- blox-infra-stage
script:
- go install golang.org/x/lint/golint@latest
- go install golang.org/x/tools/cmd/goimports@latest
- ./scripts/lint.sh .
Security check:
stage: gosec
image: $STAGE_GO_IMAGE
tags:
- blox-infra-stage
script:
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s v2.13.1
- ./bin/gosec -exclude G104 ./...
Test stage Docker image:
stage: test
image: $STAGE_GO_IMAGE
tags:
- blox-infra-stage
script:
- go test -v -cover -race -p 1 ./...