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:
<span>+ tar -xf dist/package-${BITBUCKET_BUILD_NUMBER}.tar.gz -C upload</span>
<span>tar: can't open 'dist/package-4.tar.gz': No such file or directory</span>
<span>pipeline.yml</span>
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