I am trying to create a workspace that I want to share between the build and test jobs.
build:
docker:
- image: circleci/node:7.10
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- run: mkdir -p /tmp/workspace
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: mv * /tmp/workspace
- persist_to_workspace:
root: /tmp
paths:
- workspace
test:
docker:
- image: ubuntu:bionic-20180710
steps:
- attach_workspace:
at: /tmp/workspace
- run: cd workspace
- run: ./build.sh -t
On the test job, it fails.
Downloading workspace layers
Error downloading workspace layer for job …: RequestError: send request failed caused by: Get …: x509: failed to load system roots and no roots provided
This is interesting - out of curiousity, could you try using a different (but similar in version) CircleCI node image and seeing if the behaviour is the same?
I’m experiencing the same problem with a python:3-alpine image. The “Attaching Workspace” step fails with the following output:
Downloading workspace layers
Error downloading workspace layer for job 0a224d46-b3f4-4ac5-a09d-11a2ab8a99cf: RequestError: send request failed
caused by: Get https://circle-production-customer-artifacts.s3.amazonaws.com/?list-type=2&prefix=picard%!F(MISSING)589c853cc9e77c00019cc45f%!F(MISSING)workflows%!F(MISSING)workspaces%!F(MISSING)c4485fee-d7af-4214-8fd6-3b7e1da466a4%!F(MISSING)0%!F(MISSING)0a224d46-b3f4-4ac5-a09d-11a2ab8a99cf: x509: failed to load system roots and no roots provided
I tried changing the Docker image used from python:3-alpine to python:3.7.0-alpine3.7 to no avail.
@coder I see now – I believe your issue is being caused by using a custom docker image when trying to attach the workspace – I believe you’ll have to use a CircleCI image in your test step in order to use this feature.
@ngriffiths Is it a CircleCI image? Could you post all images you’re using?
@Cormac I tried both python:3-alpine and python:3.7.0-alpine3.7, neither of which are CircleCI images. Sorry, I now realise this might have nothing to do with CircleCI. Please let me know if that’s the case.
@ngriffiths Yes, this could be correct – the error is a failure to find necessary certificates to connect and download the workspace files.
We can only guarantee workspace persistence will work with CircleCI images, but you could use the link above to find an image appropriate for your needs.
Just to sum up for anyone coming on this thread later, this is a certificate issue caused by using custom images, and should never be encountered with CircleCI images – if it is, please report it with a support ticket.
@coder@ngriffiths As a follow-up to this, did your custom docker images have the ca-certificates package installed? I think this may have related just to a failure to make an SSL connection.