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,456,899
Community Members
 
Community Events
176
Community Groups

Artifacts not uploaded

Hi ,

 

We are trying to build simple maven project pipeline where we are trying to expect below actions to be happen.

Pipeline triggered and the artifacts to be uploaded in the target folder of current bitbucket repository path.

In the below example post pipeline trigger we are able to see results file  site/serenity/index.html  is generated at location during build but that file we would like to upload as artifacts in the target folder.

Even moving the file or directory not worked

 

image: radut/openjdk-15-maven

pipelines:
default:
- parallel:
- step:
name: Triggering Test Automation
script:
- mkdir –p $BITBUCKET_CLONE_DIR/target
- mvn clean install -f sps-api-automation/pom.xml -U
- cd /opt/atlassian/pipelines/agent/build/sps-api-automation/target
- cat site/serenity/index.html
- mv /opt/atlassian/pipelines/agent/build/sps-api-automation/target/site/serenity/index.html /opt/atlassian/pipelines/agent/build/sps-api-automation/target
artifacts:
- target/**

1 answer

0 votes
Ben Atlassian Team Aug 11, 2022

Hey Abhinay,

Artifacts are always relevant to the actual clone path ($BITBUCKET_CLONE_DIR) and therefore the cd/mv lines are not needed.

By default, you will always start within the clone directory. Therefore when making the target directory, if you simply run the following line - this will make a "target" directory within the clone directory:


mkdir target

When calling the directory later on in the artifacts line, you have the correct config (as this will point to $BITBUCKET_CLONE_DIR\target):

artifacts:

target/**

Try this configuration and then click on the "Artifacts" tab in the build itself to verify if the downloaded artifact is what you are expecting to see.

NOTE: This method preserves the artifact for 14 days and does not actually upload the file into your Bitbucket source directory, it is simply to preserve artifacts in between builds.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events