Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to cache `apt-get install -y zip` in bitbucket-pipelines?

john_mccabe
Contributor
August 10, 2017

Hello Atlassian Community,

I have a quick question about caching resources in bitbucket-pipelines.

We're able to cache our pip based resources just fine (thanks btw!) but now we're looking to cache the resources gathered with `apt-get install` as well.

Does anyone know if this is possible? Specifically, we would like to cache `apt-get install -y zip`

Or, if caching `apt-get install`s is not possible, is there a better way to prepare a zip file during a pipeline.

Thanks,

John

3 answers

3 votes
Mark Faulkner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2017

Same question here...

 

I've added a cache for /var/cache/apt/archives, but it doesn't appear to be working.

1 vote
Chase Han
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2022

It depends on the base image I guess.

I just cached zip command in node:16 image.

Here is what I did

bash into the docker image locally and run `which zip` to find the zip location. My one is in /usr/bin/zip. Then set up "bitbucet-pipelines.yml" file

 

image: node:16
definitions:
    services:
        docker:
    caches:
        # Cache zip cli
        zip: /usr/bin
    steps:
        - step:
              name: 'install zip'
              caches:
                  - zip
              script:
                  - apt-get install -y zip
          
         - step:
              name: 'zip file'
              caches:
                  - zip
              script:
                  - zip -j file.zip file.js
0 votes
Ben Bonnet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 10, 2017

Same here; tests requires ffmpeg, they obviously get a nice speedup if a clear way to cache apt-installs was provided! hope to find out soon

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events