-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
89 lines (81 loc) · 1.73 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
image: public.ecr.aws/r3m4q3r9/qovery-ci:engine-2024-03-29T11-14-26
services:
- docker:dind
variables:
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
DOCKER_BUILDKIT: 1
DOCKER_TLS_CERTDIR: ""
DOCKER_IMAGE_NAME: $AWS_PROD_ECR_PUBLIC_REGISTRY/iam-eks-user-mapper-rs
IMAGE_TAG_NAME: $CI_COMMIT_SHORT_SHA
IMAGE_COMMIT_SHA: $CI_COMMIT_SHA
IMAGE_STORE: $CI_PROJECT_DIR/docker_image
stages:
- scheduled
- prechecks
- build
- release
audit:
stage: prechecks
script:
- cargo audit
interruptible: true
allow_failure: true
tags:
- vm-1cpu-2gmem-0g
only:
- main
format:
stage: prechecks
script:
- cargo fmt -- --check
interruptible: true
tags:
- vm-1cpu-2gmem-0g
only:
- main
coverage:
stage: build
script:
- cargo tarpaulin --out Xml
coverage: '/^\d+.\d+% coverage/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: cobertura.xml
interruptible: true
tags:
- vm-3cpu-4gmem-0g
only:
- main
lint-test:
stage: build
script:
- cargo clippy --all --all-features -- -D warnings
- cargo test
interruptible: true
tags:
- vm-3cpu-4gmem-0g
only:
- main
build-image:
stage: release
before_script:
- ci_helper init_buildkit_builder "${CI_JOB_NAME}" 4 7
- ci_helper docker_login_public_prod_ecr
after_script:
- ci_helper teardown_buildkit_builder "${CI_JOB_NAME}"
script:
- |-
eval $(ci_helper print_aws_ctx 'CI_BUILDER')
docker buildx build --platform=linux/amd64,linux/arm64 \
-t $DOCKER_IMAGE_NAME:$IMAGE_TAG_NAME \
--push .
interruptible: true
when: manual
tags:
- vm-250mcpu-1gmem-0g
only:
- main