-
Notifications
You must be signed in to change notification settings - Fork 173
/
config.yml
71 lines (66 loc) · 1.86 KB
/
config.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
version: 2
jobs:
build:
docker:
- image: docker:25.0.5-git
steps:
- checkout
- setup_remote_docker:
version: default
- run:
name: build docker image
command: |
docker pull praqma/helmsman:latest
docker build --cache-from=praqma/helmsman:latest -t helmsman .
release:
docker:
- image: goreleaser/goreleaser
entrypoint: /bin/bash
working_directory: "/go/src/github.com/Praqma/helmsman"
steps:
- run:
name: install git
command: apk update && apk add --no-cache git openssh-client
- checkout
- run:
name: release
command: |
goreleaser release --release-notes release-notes.md
docker-release:
working_directory: "/tmp/go/src/helmsman"
machine: true
steps:
- checkout
- run:
name: build docker images and push them to dockerhub
command: |
helm_versions=( "v3.15.0" "v3.14.4" "v3.13.3" )
TAG=$(git describe --abbrev=0 --tags)
docker login -u $DOCKER_USER -p $DOCKER_PASS
for HELM_VERSION in "${helm_versions[@]}"
do
docker build -t praqma/helmsman:$TAG-helm-$HELM_VERSION --build-arg GLOBAL_HELM_VERSION=$HELM_VERSION . --no-cache
docker push praqma/helmsman:$TAG-helm-$HELM_VERSION
done
workflows:
version: 2
build-test-push-release:
jobs:
- build:
filters:
tags:
only: /.*/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
- docker-release:
requires:
- release
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/