Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,157
Community Members
 
Community Events
176
Community Groups

pipelines with aws codedeploy

Edited

Hi folks,

I am trying to deploy an app using bb pipelines and aws codedeploy but for some reason I get an error, not sure if I doing it right. I have attached the bitbucket-pipelines.yml

pipelines:
default:
- step:
name: Build and Test
image: ubuntu:latest
caches:
- maven
script: # Modify the commands below to build your repository.
- apt-get update && apt install python-pip default-jre maven -y
- pip install --upgrade python
- pip install --upgrade awscli
- eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
- mvn clean install dockerfile:build dockerfile:tag dockerfile:push
services:
- docker
- step:
name: Deploy
script:
- pipe: atlassian/aws-code-deploy:0.2.2
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
COMMAND: 'deploy'
APPLICATION_NAME: $APPLICATION_NAME
DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP
WAIT: 'true'
options:
docker: true

 

 

and I get the below error:

An error occurred (RevisionDoesNotExistException) when calling the GetApplicationRevision operation: No application revision found for revision.

✖ Failed to fetch revision. 

3 comments

Deleted user Apr 13, 2019

I have other issues, but I think I got past this one.  At least, I don't get this error any more.

From the deploy target instance, I ran the following before running the pipeline:

aws deploy register-application-revision \

--application-name [code deploy application name] \

--description "Description" \

--s3-location bucket=[bucket name],key=[VERSION_LABEL set in bitbucket-pipelines.yml],bundleType=[tar,gzip or zip]

Hope this helps...

how did you solve the revision issue?

Same problem here, I'm new with codeDeploy and the pipelines, so I followed those steps: https://levelup.gitconnected.com/set-up-a-continuous-delivery-pipeline-from-bitbucket-to-aws-ec2-using-aws-code-deploy-a9777a3cbcad

But getting the same error in my pipeline now..

I was able to solve this. Your script is missing the upload step to S3, so there is no package to be deployed.

Add this step between your build en deploy step:

step:
nameUpload to S3          
services:            
docker          
script:
   # Test upload            
pipeatlassian/aws-code-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}                
COMMAND'upload'                
APPLICATION_NAME${APPLICATION_NAME}                
ZIP_FILE'myapp.zip'                
S3_BUCKET$S3_BUCKET

Note the 'command' parameter.

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events