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!
Before running the pipe, try checking the files that exist in your build environment.
ls -R $BITBUCKET_CLONE_DIR | xargs realpath
ls -R $BITBUCKET_CLONE_DIR | xargs realpath | grep hosticawebapp
You may also need to install realpath with apt-get, if realpath cannot be found.
Hi Phillip,
Thank you for your suggestions. I added those two lines and see that there are no .zip or .jar files present!
To me it looks like the docker image gets completely rebuilt with each step? I'm not sure how it works, but I combined everything into a single step. This time running the ls command will show the jar file at
/opt/atlassian/pipelines/agent/build/hosticawebapp-0.0.1-SNAPSHOT.jar
However, listing this path in my bitbucket-pipelines.yml file as the value for ZIP_FILE still gives me the same error as before. :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @mikeyjay39 ,
The question was already replied here: https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Java-deployment-with-Pipes-failing-because-user-provided-path/qaq-p/1023689
Regards,
Raul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.