From dca749e767110a0488561dea569af960757b7d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20P=C5=82otka?= Date: Tue, 18 Sep 2018 17:43:09 +0100 Subject: [PATCH] ci: Fixing cross build part2. (#525) Signed-off-by: Bartek Plotka --- .circleci/config.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a6d4b9006b..cea065f4d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,6 +36,18 @@ jobs: make test + # Cross build is needed for publish_release but needs to be done outside of docker. + cross_build: + machine: true + working_directory: /home/circleci/.go_workspace/src/github.com/improbable-eng/thanos + steps: + - checkout + - run: make crossbuild + - persist_to_workspace: + root: . + paths: + - .build + publish_master: docker: # Available from https://hub.docker.com/r/circleci/golang/ @@ -67,7 +79,6 @@ jobs: - run: echo 'export PATH=${HOME}/bin:${PATH}' >> ${BASH_ENV} - attach_workspace: at: . - - run: make crossbuild - run: make tarballs-release - store_artifacts: path: .tarballs @@ -92,9 +103,18 @@ workflows: filters: branches: only: master + - cross_build: + requires: + - test + filters: + tags: + only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ + branches: + ignore: /.*/ - publish_release: requires: - test + - cross_build filters: tags: only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/