Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to avoid archiving a file uploaded to Artifacts?



I have been writing my bitbucket-pipelines.yml which includes artifacts in order to pass the generated war file during the building process for the next step(deployment)

However, the war is compressed as tar.gz.

Can I just upload admin.war to artifacts as it is?

The uploaded file is named as "artifact_2dfe02f9-78ba-4a44-9a33-b5bb96decd64.tar.gz"

My bitbucket-pipelines.yml is as follows.

image: gradle:6.6.0
- parallel:
- step:
name: Build and Test
- gradle
- ./gradlew build
- ./gradlew war
- apt-get update -y
- apt-get install tree -y
- tree
- cp build-0.0.1.war ../../admin.war
- cd ../..
- pwd
- ls -al
- admin.war
- step:
name: Deploy to test
deployment: test
trigger: manual
- pipe: atlassian/bitbucket-upload-file:0.3.2
FILENAME: 'admin.war'



├── admin.war
├── bitbucket-$BITBUCKET_USERNAME.yml

├── build
│   ├── classes
│   │  
│   ├── libs
│   │   ├── build-0.0.1.war
│   │   └── exploded
│   │   └── admin-0.0.1.war


ls -al

total 14664
drwxrwxrwx. 8 root root 4096 Oct 4 09:22 .
drwxr-xr-x. 8 root root 4096 Oct 4 09:21 ..
-rw-rw-rw-. 1 root root 14954308 Oct 4 09:22 admin.war
-rw-rw-rw-. 1 root root 1392 Oct 4 09:22 bitbucket-$BITBUCKET_USERNAME.yml
drwxrwxrwx. 6 root root 4096 Oct 4 09:22 build
-rw-rw-rw-. 1 root root 3844 Oct 4 09:22 build.gradle
drwxrwxrwx. 8 root root 4096 Oct 4 09:22 .git
-rw-rw-rw-. 1 root root 2619 Oct 4 09:22 .gitignore
drwxrwxrwx. 3 root root 4096 Oct 4 09:22 gradle
drwxrwxrwx. 6 root root 4096 Oct 4 09:22 .gradle
-rwxrwxrwx. 1 root root 5774 Oct 4 09:22 gradlew
-rw-rw-rw-. 1 root root 2763 Oct 4 09:22 gradlew.bat
-rw-rw-rw-. 1 root root 1849 Oct 4 09:22 pom.xml
drwxrwxrwx. 3 root root 4096 Oct 4 09:22 src
drwxrwxrwx. 7 root root 4096 Oct 4 09:22 WebContent


Deploy result

Status: Downloaded newer image for bitbucket$BITBUCKET_USERNAME/bitbucket-upload-file:0.3.2
INFO: Executing the pipe...
✖ File admin.war doesn't exist.


1 answer

1 accepted

0 votes
Answer accepted

Hi @JJ지우근,

I believe that the file name you mentioned, artifact_2dfe02f9-78ba-4a44-9a33-b5bb96decd64.tar.gz, is the name of the file when you download the artifact from the Artifacts tab of the Pipelines build log, is that correct?

This doesn't have anything to do with the error you are seeing in the deployment step:

File admin.war doesn't exist.

I think the culprit for this error may be the parallel keyword in your yaml file: parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set. If both of these steps belong to the same parallel set, then the 2nd one won't be able to use the artifacts generated by the first one.

Are these two steps the only ones in your yaml file? If so, can you remove the parallel keyword from the yaml file and run another build? The admin.war file should then be available for the second step, and the file should be uploaded in the Downloads section of the repo with the same name.

Kind regards,

After removing the parallel keyword, I have been able to upload the file to downloads.

Thanks for your support.

Like Theodora Boudale likes this

Thank you for the update and you are very welcome, I'm glad to have helped!

Like JJ지우근 likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

110 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you