forked from blemmenes/radosgw_usage_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
31 lines (28 loc) · 961 Bytes
/
.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
stages:
- verify
- build
flake8:
image: python:3
stage: verify
before_script:
- pip install flake8
script:
- flake8 .
build_container:
image: rotterdam.selfnet.de/noc/container-build/container-build:latest
stage: build
before_script:
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- buildah bud -t $CI_REGISTRY_IMAGE/radosgw-exporter:latest .
- if [ "$CI_COMMIT_REF_NAME" == "main" ]; then buildah push $CI_REGISTRY_IMAGE/radosgw-exporter:latest; fi
release_build:
image: rotterdam.selfnet.de/noc/container-build/container-build:latest
stage: build
before_script:
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- buildah bud -t $CI_REGISTRY_IMAGE/radosgw-exporter:$CI_COMMIT_REF_NAME .
- buildah push $CI_REGISTRY_IMAGE/radosgw-exporter:$CI_COMMIT_REF_NAME
only:
- tags