Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,301,230
Community Members
 
Community Events
165
Community Groups

Artifacts not found in Subsequent steps

I have a pipeline that creates a Jeykll site but when I try and deploy this in a subsequent step it cannot find the artifact. Can anyone see what Im doing wrong.

I can see the artifact in the UI and download it from step 1, 

error: 

+ tar -xf dist/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C upload
tar: can't open 'dist/package-4.tar.gz': No such file or directory
pipeline.yml
image: ruby:2.7

pipelines:
default:
- parallel:
- step:
name: Generate the blog with Jekyll
caches:
- bundler
script:
- bundle install --path vendor/bundle
- bundle exec jekyll build --destination public
- mkdir dist
- tar -czvf dist/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C public .
artifacts:
- dist/**
- step:
name: Deploy to LeoXander
image: alpine
deployment: production
trigger: manual
script:
- tar -xf dist/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C upload
- apk update && apk add openssh rsync
- rsync -a -e "ssh -o StrictHostKeyChecking=no" --delete upload/ my-user@mt-host:/var/www/vhosts/leoblog-${BITBUCKET_BUILD_NUMBER}
- ssh -o StrictHostKeyChecking=no ilyoio@ilyo.io "rm -r /var/www/vhosts/ilyo.io/bookmarc.ilyo.io/leoblog"
- ssh -o StrictHostKeyChecking=no ilyoio@ilyo.io"mv '/var/www/vhosts/leoblog-${BITBUCKET_BUILD_NUMBER}' 'var/www/vhosts/leoblog'"
definitions:
caches:
bundler: vendor/bundle

1 answer

1 accepted

1 vote
Answer accepted

Hi @stevew_cc and welcome to the community!

I think the culprit is that the two steps in your yml file are parallel. Parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set (this is documented here).

My suggestion would be to remove the parallel keyword from your yaml file. Then the artifacts produced during the first step should be available in the next step.

Kind regards,
Theodora

Thanks for the reply... Yep I discovered this... I should have updated the post, but had not managed to get to it... :) 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,265 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you