Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Artifacts not found in Subsequent steps

stevew_cc November 11, 2021

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2021

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

stevew_cc November 15, 2021

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
AUG Leaders

Atlassian Community Events