Skip to content

Commit

Permalink
Version 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Einar Egilsson committed Apr 27, 2020
1 parent 7be4804 commit d66653a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion beanstalk-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit d66653a

Please sign in to comment.