Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Java deployment with Pipes failing because user-provided path not found. Edited

Here is my current bitbucket-pipelines.yml file:

 

# This is a sample build configuration for Java (Maven).
# Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: maven:3.3.9

pipelines:
branches:
master:
- step:
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B verify # -B batch mode makes Maven less verbose
- step:
name: Deploy to staging
deployment: staging # can be test, staging or production.
# trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to staging environment"
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.3
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: 'Hostica Web App'
ENVIRONMENT_NAME: 'HosticaWebApp-staging'
ZIP_FILE: '/opt/atlassian/pipelines/agent/build/target/hosticawebapp-0.0.1-SNAPSHOT.jar'



DEBUG: 'true' # Optional.


I get this error in the pipelines console:


The user-provided path /opt/atlassian/pipelines/agent/build/target/hosticawebapp-0.0.1-SNAPSHOT.jar does not exist.


I'm guessing the issue is what value should I be passing for ZIP_FILE?

I've tried just "hosticawebapp-0.0.1-SNAPSHOT.jar" instead of the full path, as well as "application.zip" as shown in the examples. All give me an error that the path does not exist.

Thank you for any help that can be provided!

2 answers

1 accepted

2 votes
Answer accepted
Graham Gatus Atlassian Team Mar 06, 2019

@mikeyjay39 you need to pass the artifact that was built in the first step on to the second step. To do this, you can define an artifact on your first step:

    - step:
caches:
- maven
script: # Modify the commands below to build your repository.
- mvn -B verify # -B batch mode makes Maven less verbose
artifacts:
- target/hosticawebapp-0.0.1-SNAPSHOT.jar 

You can also find an example using the aws-elasticbeanstalk-deploy pipe along with artifacts at https://confluence.atlassian.com/bitbucket/deploy-to-amazon-aws-875304040.html.  

2 votes
mwatson Atlassian Team Mar 06, 2019

The path to the ZIP_FILE should be relative to where the checkout of your repository is - in this case I imagine it is in the target directory, so you'd need to specify target/hosticawebapp-0.0.1-SNAPSHOT.jar as the ZIP_FILE value.

In the same scenario i was able to upload the war file but i encountered following error

An error occured InvalidParameterCombination when calling the CreateApplicationVersion operation  : Invalid s3 location bucket  bucket name -key appname.war

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

242 views 2 1
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