When running my build and deploy pipeline, my build step creates an application.zip artifact, which appears to be created as expected, shows up on the Artifacts tab after the build completes, i can download it, and it is as expected. I am then trying to deploy that zip file to AWS Elastic Beanstalk but when I run the deploy step (setup as manual) it tells me "The user-provided path application.zip does not exist".
Here is my bitbucket-pipelines.yml:
image: mcr.microsoft.com/dotnet/core/sdk:3.1
pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- dotnetcore
script:
- apt-get update
- apt-get install -y zip
- echo "Building project"
- dotnet restore
- dotnet build --no-restore --configuration Release
- dotnet publish -o application --configuration Release
- zip -r -X application.zip application
artifacts:
- application.zip
- step:
name: Deploy to staging
deployment: staging
trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to staging environment"
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.6.7
variables:
AWS_ACCESS_KEY_ID: '$aws_access_key_id' # Optional if already defined in the context.
AWS_SECRET_ACCESS_KEY: '$aws_secret_access_key' # Optional if already defined in the context.
AWS_DEFAULT_REGION: '$aws_default_region' # Optional if already defined in the context.
APPLICATION_NAME: '$application_name'
ENVIRONMENT_NAME: '$env_name'
ZIP_FILE: 'application.zip'