Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Generate JAR file and send it to AWS S3?

Alvaro Cardoso
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 25, 2021

Is it possible to generate a JAR file from my Java project (from Bitbucket Cloud) and send it to AWS S3?

I managed to generate something and send to S3, but not a JAR file. Here is my pipeline:

pipelines:
default:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml
- mvn install
artifacts:
- target/**
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.2.0
- step:
name: Deploy to S3
script:
- pipe: atlassian/aws-s3-deploy:0.4.5
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_REGION
S3_BUCKET: $AWS_S3_BUCKET
LOCAL_PATH: 'target' 

 This is the error message:

✖ target directory doesn't exist.

 I have tried to use the path created while building it:

/opt/atlassian/pipelines/agent/build/target/

The problem will be the same.

1 answer

0 votes
Rahul Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 26, 2022

Hi @Alvaro Cardoso ,

I am also facing same issue. Did you solve this issue?

Alvaro Cardoso
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2022

Unfortunately I never found a solution for it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events