From 524193e4542be97b6e0dfd2066dc5cd5321b8aed Mon Sep 17 00:00:00 2001 From: Vegar Sechmann Molvig Date: Sun, 28 Oct 2018 18:49:53 +0100 Subject: [PATCH 1/2] Use explicit location for workspace --- .circleci/config.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 524b75b..d0a016f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,8 +27,8 @@ jobs: prefix: libs - persist_to_workspace: - root: ./build/libs/ - paths: . + root: ./ws/ + paths: ./build/libs/ - save_cache: paths: @@ -48,13 +48,13 @@ jobs: - checkout - attach_workspace: - at: ./build/ + at: ./ws/ - run: name: "Publish Release on GitHub" command: | VERSION=$(git describe --tags) - ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./build/libs + ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${VERSION} ./ws/build/libs publish-to-docker-hub: docker: @@ -64,7 +64,7 @@ jobs: - checkout - attach_workspace: - at: ./build/libs + at: ./ws/ - setup_remote_docker: docker_layer_caching: true @@ -73,6 +73,7 @@ jobs: name: Build and push docker image command: | VERSION=$(git describe --tags) + cp -r ./ws/build ./build docker build --tag desp/glickorater:${VERSION} . echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker push desp/glickorater:${VERSION} From 0a82b7d6c6aa86d687a42cb7010fd1593d2420ab Mon Sep 17 00:00:00 2001 From: Vegar Sechmann Molvig Date: Sun, 28 Oct 2018 19:14:40 +0100 Subject: [PATCH 2/2] Copy build libs to ws --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0a016f..c6785be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,10 @@ jobs: path: ./build/libs/ prefix: libs + - run: + name: Copy libs to workspace + command: mkdir -p ./ws && cp -r ./build ./ws + - persist_to_workspace: root: ./ws/ paths: ./build/libs/