Skip to content

DRGroveSoftwareLLC/semantic-release-ecs-deploy

 
 

Repository files navigation

@eclass/semantic-release-ecs-deploy

npm Node.js CI downloads dependencies devDependency Status Coverage Status Maintainability semantic-release

semantic-release plugin to deploy ecs services

Step Description
verifyConditions Verify the presence of the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variable.
publish Upgrade service in aws ecs.

Install

npm i -D @eclass/semantic-release-ecs-deploy

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@eclass/semantic-release-ecs-deploy",
      {
        "services": [
          {
            "cluster": "mycluster",
            "service": "myservice"
          }
        ]
      }
    ]
  ]
}

Configuration

Environment variables

Variable Description
AWS_ACCESS_KEY_ID aws access key id
AWS_SECRET_ACCESS_KEY aws secret access key

Options

Variable Description
services Array of object service. Required.
service.cluster Name of cluster in aws ecs. Required.
service.service Name of service in aws ecs. Required.
service.timeout Timeout in seconds to wait upgrade. Optional. Default 300
service.ignoreWarnings Flag to ignore warnings in upgrade. Optional. Default false

Examples

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    [
      "@eclass/semantic-release-ecs-deploy",
      {
        "services": [
          {
            "cluster": "mycluster",
            "service": "myservice",
            "timeout": -1,
            "ignoreWarnings": true
          }
        ]
      }
    ]
  ]
}
# .gitlab-ci.yml
release:
  image: node:alpine
  stage: release
  script:
    - npx semantic-release
  only:
    - master
# .travis.yml
language: node_js
cache:
  directories:
    - ~/.npm
node_js:
  - "12"
stages:
  - test
  - name: deploy
    if: branch = master
jobs:
  include:
    - stage: test
      script: npm t
    - stage: deploy
      script: npx semantic-release

License

MIT

About

semantic-release plugin to deploy ecs services

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%