Created
June 9, 2018 01:29
-
-
Save topera/39aa7b126dce67bf0f565cfb65bd82fd to your computer and use it in GitHub Desktop.
Gradle task to deploy to AWS Elastic Beanstalk using the aws cli command line tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task deployEb(type: AWS, group: group) { | |
description 'Deploys application in AWS Elastic Beanstalk' | |
doFirst { | |
run "aws configure set default.region $awsRegionName" | |
run "aws s3 cp $buildDir/$jarLocal s3://$awsBucketName/$awsJar" | |
run "aws elasticbeanstalk create-application-version --application-name=$awsAppName --version-label=$buildNumber --source-bundle S3Bucket=$awsBucketName,S3Key=$awsJar" | |
run "aws elasticbeanstalk update-environment --environment-name=$awsEnvName --version-label=$buildNumber" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment