Hi all,
I've been struggling with this all day.
This is my pipeline:
pipelines:
custom:
Build & Deploy to staging:
- step:
name: Build yarn
image: node:14.16.0
caches:
- node
script:
# Go to theme directory
- cd "wp-content/themes/$THEMENAME"
# Install npm dependencies
- yarn
# Compile assets for production
- yarn build:production
artifacts: # only accepts relative paths to $BITBUCKET_CLONE_DIR
- /dist/**
- step:
name: Install Composer dependencies
image: thesoul/php-composer-phpunit:8.0
caches:
- composer
script:
# Go to theme directory
- cd "wp-content/themes/$THEMENAME"
- composer install --ignore-platform-reqs
artifacts: # only accepts relative paths to $BITBUCKET_CLONE_DIR
- /vendor/**
- step:
name: Deploy
deployment: Staging
image: instrumentisto/rsync-ssh
script:
- pipe: atlassian/rsync-deploy:0.4.4
variables:
USER: '$STAG_USER'
SERVER: '$STAG_SERV'
REMOTE_PATH: '$STAG_REM_PATH'
LOCAL_PATH: '${BITBUCKET_CLONE_DIR}/'
EXTRA_ARGS: '-zrSlhic --stats --files-from=deployment-include-list.txt --exclude-from=deployment-exclude-list.txt'
# SSH_KEY: '<string>' # Optional.
# SSH_PORT: '<string>' # Optional.
# EXTRA_ARGS: '<string>' # Optional.
# DEBUG: '<boolean>' # Optional.
# DELETE_FLAG: '<boolean>' # Optional.
# https://explainshell.com/explain?cmd=rsync+-zrSlh+--exclude-from=deployment-exclude-list.txt+./.+{{+$remote+}}
What it's supposed to do:
Go to the theme folder, build yarn and save the artifacts for the next steps
Then run composer, and save the artifacts for the next step
Then take the artifacts plus the rest of the repo and rsync this to our server.
I can't get the artifacts to pass on, nor even get the vendor directory uploaded.