Forums

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

Bitbucket pipeline for multi-module Maven/java build and deploy to AWS elasticbeanstalk

David Hoffer
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!
March 8, 2025

I am trying to configure a Bitbucket pipeline for multi-module Maven/Java build and deploy to AWS elasticbeanstalk but having lots of trouble.  

How do I specify the ZIP_FILE value?  My jar is in one of the sub-modules of the maven build.  It always reports ' FileNotFoundError: [Errno 2] No such file or directory:"

Is there a full spec of the options for Maven builds and deployments to elasticbeanstalk?

Are there more complex examples of the above available?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 11, 2025

Hi David and welcome to the community!

Are you using the pipe atlassian/aws-elasticbeanstalk-deploy:1.4.1 in order to deploy? If so, this is the pipe's repository:

If you scroll down, you will see the pipe's README with more details and examples.

Based on the error you shared, I believe one of the two is the most likely reasons:

  • The jar file may not be generated inside the clone directory. Are you generating the file in a subdirectory of the directory where the build is running?

  • The jar file may be generated in a different step than the step where the pipe runs. If this is the case, you will need to define the .jar file as an artifact in the step that generates it, so that it becomes available to next steps. There is an example of how to define a file of a previous step as an artifact in the pipe's README, I am also copy-pasting it here:

    - step:
        name: Build docker-multicontainer-v2 App
        script:
          - zip -r docker-multicontainer-v2.zip cron.yaml Dockerrun.aws.json .ebextensions php-app proxy
        artifacts:
          - docker-multicontainer-v2.zip
    - step:
        name: Deploy to AWS EBS
        caches:
          - pip
        script:
          - pipe: atlassian/aws-elasticbeanstalk-deploy:1.4.1
            variables:
              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
              AWS_DEFAULT_REGION: 'us-east-1'
              APPLICATION_NAME: 'test-ebs-multi-docker'
              ENVIRONMENT_NAME: 'TestEbsMultiDocker-env'
              ZIP_FILE: 'docker-multicontainer-v2.zip'
              WAIT: 'true'


If you still experience issues, it would be useful to have the following info, so I can better help you:

  • the content of your bitbucket-pipelines.yml file (please make sure you sanitize private/sensitive data, before sharing it)
  • which command gives you this error, and the full output of the command

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events