From d66653a4a603390c33635fbb4ffcfb46f941ebe4 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Mon, 27 Apr 2020 13:54:10 +0000 Subject: [PATCH] Version 10 --- README.md | 13 ++++++++----- beanstalk-deploy.js | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 846b694..a5a4a49 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ jobs: run: zip deploy.zip *.js *.json *.html *.css - name: Deploy to EB - uses: einaregilsson/beanstalk-deploy@v9 + uses: einaregilsson/beanstalk-deploy@v10 with: aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -48,7 +48,7 @@ attempt to deploy that. In the example below the action would attempt do deploy ```yaml - name: Deploy to EB - uses: einaregilsson/beanstalk-deploy@v9 + uses: einaregilsson/beanstalk-deploy@v10 with: aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -77,6 +77,12 @@ is finished. By default we wait 30 seconds after deployment before determining w increase this timeout by putting here the number of seconds to wait. Especially smaller environments with less resources might take a while to return to normal. Thanks to GitHub user [mantaroh](https://github.com/mantaroh) for this one. +`version_description`: Description for the version you're creating. Can be useful for instance to set it to the commit that +triggered the build, `version_description: ${{github.SHA}}`. + +`environment_name`: In version 10 this parameter becomes optional. If you don't pass an environment in the action will simply create +the version but not deploy it anywhere. + ### Failure modes If you're uploading a new version the action will fail if that file already exists in S3, if the application version exists in Beanstalk and of course if the deployment fails. The action will wait until Beanstalk reports that the @@ -108,6 +114,3 @@ few megabytes in size, if your files are much larger than that it may cause prob 2. The script does not roll back if a deploy fails. 3. There is no integration with Git, like there is in the official EB cli. This script only takes a readymade zip file and deploys it. - -Finally, if you also want a nice GitHub Action to generate sequential build numbers, check out -https://github.com/einaregilsson/build-number diff --git a/beanstalk-deploy.js b/beanstalk-deploy.js index 7797d44..d2978c7 100755 --- a/beanstalk-deploy.js +++ b/beanstalk-deploy.js @@ -156,7 +156,7 @@ function deployNewVersion(application, environmentName, versionLabel, versionDes expect(200, result); console.log(`Created new application version ${versionLabel} in Beanstalk.`); if (!environmentName) { - console.log('No environment name given, so exiting now without deploying the new version ${versionLabel} anywhere.'); + console.log(`No environment name given, so exiting now without deploying the new version ${versionLabel} anywhere.`); process.exit(0); } deployStart = new Date(); diff --git a/package.json b/package.json index 15514fa..c177d5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "beanstalk-deploy", - "version": "9.0.0", + "version": "10.0.0", "description": "GitHub Action + command line tool to deploy to AWS Elastic Beanstalk.", "main": "beanstalk-deploy.js", "scripts": {