Skip to content

Commit c01fad3

Browse files
Cr 9366 (#478)
* Update template * update step version Co-authored-by: Bohdan Pysarenko <bohdan.pisarenko@codefresh.io>
1 parent 5c9eef1 commit c01fad3

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

incubating/ecs-deploy/step.yaml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '1.0'
33
metadata:
44
name: ecs-deploy
55
title: Deploy to ECS
6-
version: 0.0.7
6+
version: 0.0.8
77
isPublic: true
88
description: Deploy your app to AWS Elastic Container Service.
99
sources:
@@ -23,7 +23,7 @@ metadata:
2323
url: >-
2424
https://cdn.jsdelivr.net/gh/codefresh-io/steps/incubating/ecs-deploy/icon.jpg
2525
examples:
26-
- description: example-1
26+
- description: example without image tag
2727
workflow:
2828
deploy to ecs:
2929
type: ecs-deploy
@@ -33,6 +33,17 @@ metadata:
3333
aws-region: us-east-2
3434
cluster_name: MY_ECS_CLUSTER
3535
service_name: MY_ECS_SERVICE
36+
- description: example with image tag
37+
workflow:
38+
deploy to ecs:
39+
type: ecs-deploy
40+
arguments:
41+
AWS_ACCESS_KEY_ID: ${{AWS_ACCESS_KEY_ID}}
42+
AWS_SECRET_ACCESS_KEY: ${{AWS_SECRET_ACCESS_KEY}}
43+
aws-region: us-east-2
44+
cluster_name: MY_ECS_CLUSTER
45+
service_name: MY_ECS_SERVICE
46+
image_tag: 0.0.1
3647
spec:
3748
arguments: |-
3849
{
@@ -68,18 +79,28 @@ spec:
6879
"service_name": {
6980
"type": "string",
7081
"description": "ecs service name"
82+
},
83+
"image_tag": {
84+
"type": "string",
85+
"description": "app image tag"
7186
}
7287
}
7388
}
74-
steps:
89+
stepsTemplate: |-
7590
main:
7691
name: ecs-deploy
7792
image: codefresh/cf-deploy-ecs
78-
commands:
79-
- cfecs-update ${{aws-region}} ${{cluster_name}} ${{service_name}}
8093
environment:
81-
- 'AWS_ACCESS_KEY_ID=${{AWS_ACCESS_KEY_ID}}'
82-
- 'AWS_SECRET_ACCESS_KEY=${{AWS_SECRET_ACCESS_KEY}}'
83-
- 'aws-region=${{aws-region}}'
84-
- 'cluster_name=${{cluster_name}}'
85-
- 'service_name=${{service_name}}'
94+
- 'AWS_ACCESS_KEY_ID=[[.Arguments.AWS_ACCESS_KEY_ID]]'
95+
- 'AWS_SECRET_ACCESS_KEY=[[.Arguments.AWS_SECRET_ACCESS_KEY]]'
96+
- 'AWS_REGION=[[index .Arguments "aws-region"]]'
97+
- 'AWS_CLUSTER_NAME=[[.Arguments.cluster_name]]'
98+
- 'AWS_SERVICE_NAME=[[.Arguments.service_name]]'
99+
commands:
100+
- cfecs-update ${AWS_REGION} ${AWS_CLUSTER_NAME} ${AWS_SERVICE_NAME}
101+
[[- if .Arguments.image_tag ]]
102+
--image-tag [[.Arguments.image_tag]]
103+
[[- end ]]
104+
delimiters:
105+
left: '[['
106+
right: ']]'

0 commit comments

Comments
 (0)