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. |
npm i -D @eclass/semantic-release-ecs-deploy
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"
}
]
}
]
]
}
Variable | Description |
---|---|
AWS_ACCESS_KEY_ID |
aws access key id |
AWS_SECRET_ACCESS_KEY |
aws secret access key |
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 |
{
"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