Artifacts created from pipeline build step coming up as not found when running deploy to aws

stephenhalpin January 9, 2021

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'


1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2021

Hi @stephenhalpin ,

I believe the reason for the error is that the two steps in your yml file are defined as parallel.

Parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set.

Is there any reason why you need those to be parallel? I see that the deployment step is triggered manually, and it would require the completion of the previous step for the artifact to be generated.

Could you try removing the definition for parallel and let me know if this works?

If there are still issues or if you have any questions, please feel free to let me know.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events