You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
I can not cache ssh-run, what do I do wrong?
Thanks !
image: mcr.microsoft.com/dotnet/sdk:6.0pipelines:branches:master:.
.
.- step:name: Cache-testingcaches:- ssh-runartifacts:download: falsescript:- pipe: atlassian/ssh-run:0.4.0variables:SSH_USER: "test-admin"SERVER: "00.00.0.00"MODE: "command"COMMAND: 'echo "it should be cached now???"'definitions:caches:ssh-run: ssh-run/
Hi @serhatakbak and welcome to the community!
You can define a cache for the Docker image of the pipe atlassian/ssh-run. In order to do this, you need to define a docker service for the step and also caches: docker.
I have modified your step below to show how it should be defined:
- step:
name: Cache-testing
services:
- docker
caches:
- docker
artifacts:
download: false
script:
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: 'test-admin'
SERVER: '00.00.0.00'
MODE: 'command'
COMMAND: 'some command?'
The cache will be saved after the first successful build and will be used in any subsequent builds up until a week. Any cache which is older than 1 week will be cleared automatically and repopulated during the next successful build.
Please feel free to let me know if this works for you and if you have any questions.
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 are very welcome, please feel free to reach out if you ever need anything else!
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.
Hello again,
How can I do the same caching for atlassian default-image ?
Best!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @serhatakbak,
Are you using atlassian/default-image as a build container for your steps?
If so, we are caching public Docker images, including atlassian/default-image, so a cache is used when a public Docker image is used as a build container. No configuration needs to be made by end-users for that purpose.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I correctly understand `caches` then I think they are only useable when the image can have dependencies not being included in the current files, as with nodejs (npm install) and dotnet (dotnet restore).
So ssh-run is dependency free therefore no caches.
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.