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"
name: Build and Test
- ./gradlew build
- ./gradlew war
- apt-get update -y
- apt-get install tree -y
- cp build-0.0.1.war ../../admin.war
- cd ../..
- ls -al
name: Deploy to test
- pipe: atlassian/bitbucket-upload-file:0.3.2
│ ├── classes
│ ├── libs
│ │ ├── build-0.0.1.war
│ │ └── exploded
│ │ └── admin-0.0.1.war
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
Status: Downloaded newer image for bitbucket$BITBUCKET_USERNAME/bitbucket-upload-file:0.3.2
INFO: Executing the pipe...
✖ File admin.war doesn't exist.
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.
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...
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