Hi there!
I have a BB Pipeline that runs okay, but I want to cache some files from the build.
I've added docker caches and services to yml file.
When I check the logs of Build teardown it shows:
The docker cache will consist of all unique layers from the following images:
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
"docker image save" requires at least 1 argument.
See 'docker image save --help'.
Usage: docker image save [OPTIONS] IMAGE [IMAGE...]
Save one or more images to a tar archive (streamed to STDOUT by default)
chmod: cannot access '/opt/atlassian/pipelines/agent/cache/docker/docker.tar': No such file or directory
Docker images saved to cache
Cache "docker: docker.tar": Skipping upload for empty cache
So I think something is wrong…
Am I able to configure commands executed on teardown? Or should I add some configuration to fix above errors?
The error message suggests you've got a filesystem permissions problem:
chmod: cannot access '/opt/atlassian/pipelines/agent/cache/docker/docker.tar': No such file or directory
The user tearing down the build container almost certainly doesn't have access to one of the directories along that path. If you can fix the file permissions on the system, or add the user to a group that has permission, it should work.
Can I control the teardown process from BB pipeline?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Beniamin and welcome to the community!
The "Build teardown" is not configurable.
The error indicates that there is no docker.tar file for the cache to save. Are you building a Docker image during this step? The Docker cache is meant to cache layers from a Docker image you build during the step. If you are not building any Docker image, there will be no cache to save.
Are you perhaps trying to cache different dependencies? If so, you can check our documentation below:
You can see in this documentation that Pipelines provides pre-defined cache locations for commonly used language tools and also that it is possible to define a custom cache.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.