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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,464,103
Community Members
 
Community Events
176
Community Groups

Pipeline artifacts not deployed

Edited

Hi there, I have a bitbucket-pipeline.yml file setup as below:

definitions:
caches:
node: wp-content/themes/$THEME_NAME/node_modules
steps:
- step: &npm
name: Build frontend
image: node:16
caches:
- node
script:
- cd wp-content/themes/$THEME_NAME
- npm ci
- npm run build
artifacts:
- wp-content/themes/$THEME_NAME/dist/**
- step: &deploy
name: Deploy to staging
deployment: staging
script:
- pipe: atlassian/rsync-deploy:0.7.1
variables:
USER: $FTP_USER
SERVER: $FTP_STAGE_ADDRESS
REMOTE_PATH: $FTP_STAGE_PATH
LOCAL_PATH: $BITBUCKET_CLONE_DIR
EXTRA_ARGS: "-rvz --exclude=.vscode --exclude=.htaccess --exclude=.gitignore --exclude=wp-config.php --exclude=wp-includes/ --exclude=wp-admin/ --exclude=wp-content/uploads/ --exclude=wp-content/languages/ --exclude=node_modules/ --exclude=wp-content/themes/*/node_modules/ --exclude=.git/ --exclude=wp-content/themes/*/src/ --exclude=wp-activate.php --exclude=wp-blog-header.php --exclude=wp-comments-post.php --exclude=wp-config-sample.php --exclude=wp-cron.php --exclude=wp-links-opml.php --exclude=wp-load.php --exclude=wp-login.php --exclude=wp-mail.php --exclude=wp-settings.php --exclude=wp-signup.php --exclude=wp-trackback.php --exclude=xmlrpc.php --exclude=*.scss --chown=www-data:www-data"

pipelines:
branches:
develop:
- step: *npm
- step: *deploy
The pipeline runs successfully, but the compiled artifacts defined in the npm step aren't deployed with the rest of the required files. 
Just wondering why this might be happening? The artifacts file path is relative to the $BITBUCKET_CLONE_DIR.
Cheers.
JL
UPDATE:

To update, I have also tried using this:

artifacts:
- dist/**
still no artifacts are generated... but if I run 
script:
- cd wp-content/themes/$THEME_NAME
- npm ci
- npm run build
- ls -l dist
it prints out the contents of the dist directory.. confusing

1 answer

1 accepted

1 vote
Answer accepted

Hi Jacob and welcome to the community.

I think the issue is that the file path in the artifacts block cannot render variable names.

We have a bug report about this in our issue tracker:

Until this is this fixed, you can either replace $THEME_NAME in the artifacts path with the actual value of the variable or use a path like the following:

artifacts:
- wp-content/themes/**/dist/**

The latter one will work well if there is only one directory in wp-content/themes (the $THEME_NAME directory) with a subdirectory named dist. If there are more directories in wp-content/themes with a subdirectory dist, then they would all be uploaded as artifacts, so you may want to use the value of the variable instead.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events