Hi folks, I'm struggling with making a pipeline to AWS Beanstalk using Spring Boot.
I'm using Gradle for build the artifact, and it works well in my local system.
Here's my pipeline yaml script.
branches:
master:
- step:
name: Build
script:
- bash ./gradlew clean build
- ls -lR *
- step:
name: Deploy to Production
deployment: Production
trigger: manual
script:
- pipe: atlassian/aws-elasticbeanstalk-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: 'AKIA'
AWS_SECRET_ACCESS_KEY: '7d+'
AWS_DEFAULT_REGION: 'ap-northeast-2'
APPLICATION_NAME: 'goodcare-sample-005'
ENVIRONMENT_NAME: 'goodcare-sample-005-env'
ZIP_FILE: './build/libs/*.jar'
The step named "build" is always fully successful, but for the "Deploy to Production" step, I got an error like this.
<span>INFO: Uploading to s3 bucket: goodcare-sample-005-elasticbeanstalk-deployment and key goodcare-sample-005/goodcare-sample-005-16-b686f5be.jar</span>
<span>Traceback (most recent call last):</span><span>File "/pipe.py", line 275, in <module></span><span>File "/pipe.py", line 257, in run</span><span>self.upload()</span><span>File "/pipe.py", line 141, in upload</span><span>s3.upload_file(zip_file, s3_bucket, source_bundle_key)</span><span>File "/usr/local/lib/python3.10/site-packages/boto3/s3/inject.py", line 143, in upload_file</span><span>return transfer.upload_file(</span><span>File "/usr/local/lib/python3.10/site-packages/boto3/s3/transfer.py", line 292, in upload_file</span><span>future.result()</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/futures.py", line 103, in result</span><span>return self._coordinator.result()</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/futures.py", line 266, in result</span><span>raise self._exception</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/tasks.py", line 269, in _main</span><span>self._submit(transfer_future=transfer_future, **kwargs)</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/upload.py", line 585, in _submit</span><span>upload_input_manager.provide_transfer_size(transfer_future)</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/upload.py", line 244, in provide_transfer_size</span><span>self._osutil.get_file_size(transfer_future.meta.call_args.fileobj)</span><span>File "/usr/local/lib/python3.10/site-packages/s3transfer/utils.py", line 247, in get_file_size</span><span>return os.path.getsize(filename)</span><span>File "/usr/local/lib/python3.10/genericpath.py", line 50, in getsize</span><span>return os.stat(filename).st_size</span><span>FileNotFoundError: [Errno 2] No such file or directory: './build/libs/*.jar'</span>
121
In this situation, what should I check for and what could be the solution to tackle this problem?
I wasted my whole day and I really need your help.
Thank you in advance.