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,637,836
Community Members
 
Community Events
196
Community Groups

Bitbucket pipelines artifacts not found

Edited

Hello team, 

I have been trying to run a build and have artifacts created. My pipelines creating the artifact as expected but artifacts are always empty. I have tried all the options from the community but still no luck. 

Here are the things I have tried. 

1.  artifacts: # defining the artifacts to be passed to each future step.
- build/xxx/target/*.jar

2. artifacts: # defining the artifacts to be passed to each future step.

- opt/atlassian/pipelines/agent/build/xxx/target/*.jar

3. artifacts: # defining the artifacts to be passed to each future step. 

- "opt/atlassian/pipelines/agent/build/xxx/target/*.jar"

4. artifacts: # defining the artifacts to be passed to each future step. 

-  "$BITBUCKET_CLONE_DIR/xxx/target/xxx*.jar"

etc and many more. 

 

 

Here is the complete step 

 

- step:
name: XXXX
image:
name: YYYY
username: $xxx
password: $yyy
caches:
- maven
script:
- mvn clean install --file $BITBUCKET_CLONE_DIR/xxxx/pom.xml
- ls -ltr $BITBUCKET_CLONE_DIR/xxxx/target

artifacts: # defining the artifacts to be passed to each future step.
- build/xxxx/target/*.jar

 

Please advise. 

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 05, 2021

Hi @Srikanth Mamidala

When you said artifacts are always empty, may I ask if it is empty while downloading from the Bitbucket Pipelines UI?

May I know the size of the artifacts being uploaded as well?

Regards,
Mark C

Hi @Mark C the artifacts tab in the UI is empty. And I tried uploading artifacts via SCP in next step and there were no artifacts in the desired destination because it didn’t hold artifacts to next step . 

they are not that big. I upload the exact size when I get on to my PC

hi @Mark C  artifact size is 5.5 MB. I still havent found any luck of getting artifacts in the artifacts tab. 

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 07, 2021

Hi @Srikanth Mamidala

In this case, would you be able to try to create a new folder inside
$BITBUCKET_CLONE_DIR then copy your desired artifacts in that new folder?

After that, use the new folder as your artifacts.

See sample step below:

    - step:
          name: XXXX
          image:
             name: YYYY
             username: $xxxy
             password: $yyyy
          script:
            - mvn clean install --file $BITBUCKET_CLONE_DIR/xxxx/pom.xml
            - mkdir –p $BITBUCKET_CLONE_DIR/dist
            - cp -R xxx/target/* $BITBUCKET_CLONE_DIR/dist
            - ls -lah $BITBUCKET_CLONE_DIR/dist
          artifacts:
              - dist/**

Let me know how it goes.

Regards,
Mark C

 

Like # people like this

This worked. Thank you @Mark C 

Like Mark C likes this
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 09, 2021

Great. Glad it helps.

Regards,
Mark C

Awesome its works Thank you @Mark C 

I tried a lot of options. Only this suggestion worked for me.


Regards,

Ashok

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events