Skip to content

Commit dca749e

Browse files
authored
ci: Fixing cross build part2. (thanos-io#525)
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
1 parent 6bbf9e2 commit dca749e

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.circleci/config.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ jobs:
3636
3737
make test
3838
39+
# Cross build is needed for publish_release but needs to be done outside of docker.
40+
cross_build:
41+
machine: true
42+
working_directory: /home/circleci/.go_workspace/src/github.com/improbable-eng/thanos
43+
steps:
44+
- checkout
45+
- run: make crossbuild
46+
- persist_to_workspace:
47+
root: .
48+
paths:
49+
- .build
50+
3951
publish_master:
4052
docker:
4153
# Available from https://hub.docker.com/r/circleci/golang/
@@ -67,7 +79,6 @@ jobs:
6779
- run: echo 'export PATH=${HOME}/bin:${PATH}' >> ${BASH_ENV}
6880
- attach_workspace:
6981
at: .
70-
- run: make crossbuild
7182
- run: make tarballs-release
7283
- store_artifacts:
7384
path: .tarballs
@@ -92,9 +103,18 @@ workflows:
92103
filters:
93104
branches:
94105
only: master
106+
- cross_build:
107+
requires:
108+
- test
109+
filters:
110+
tags:
111+
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
112+
branches:
113+
ignore: /.*/
95114
- publish_release:
96115
requires:
97116
- test
117+
- cross_build
98118
filters:
99119
tags:
100120
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/

0 commit comments

Comments
 (0)