File tree 4 files changed +38
-23
lines changed
4 files changed +38
-23
lines changed Original file line number Diff line number Diff line change 29
29
-n | --service-name Name of service to deploy
30
30
-i | --image Name of Docker image to run, ex: repo/image:latest
31
31
Format: [domain][:port][/repo][/][image][:tag]
32
- Examples: mariadb, mariadb:latest, silintl/mariadb,
33
- silintl/mariadb:latest, private.registry.com:8000/repo/image:tag
32
+ Examples: mariadb, mariadb:latest, private.registry.com:8000/repo/image:tag
34
33
35
34
Optional arguments:
36
35
-a | --aws-assume-role ARN for AWS Role to assume for ecs-deploy operations.
@@ -261,4 +260,4 @@ deploy_to_ecs:
261
260
service_name: 'aws-service-name'
262
261
timeout_cmd: '--timeout'
263
262
timeout: '360'
264
- ```
263
+ ```
Original file line number Diff line number Diff line change 1
- ecsdeploy :
2
- build : .
3
- env_file :
4
- - local.env
5
- volumes :
6
- - ./ecs-deploy:/ecs-deploy
1
+ services :
2
+ ecsdeploy :
3
+ build : .
4
+ env_file :
5
+ - local.env
6
+ volumes :
7
+ - ./ecs-deploy:/ecs-deploy
7
8
8
- test :
9
- build : .
10
- env_file :
11
- - local.env
12
- entrypoint : ["bash"]
13
- command : ["/run-tests.sh"]
14
- volumes :
15
- - ./ecs-deploy:/ecs-deploy
16
- - ./run-tests.sh:/run-tests.sh
17
- - ./test.bats:/test.bats
9
+ test :
10
+ build : .
11
+ env_file :
12
+ - local.env
13
+ entrypoint : ["bash"]
14
+ command : ["/run-tests.sh"]
15
+ volumes :
16
+ - ./ecs-deploy:/ecs-deploy
17
+ - ./run-tests.sh:/run-tests.sh
18
+ - ./test.bats:/test.bats
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
# Setup default values for variables
4
- VERSION=" 3.10.15 "
4
+ VERSION=" 3.10.16 "
5
5
CLUSTER=false
6
6
SERVICE=false
7
7
TASK_DEFINITION=false
@@ -47,8 +47,7 @@ Required arguments:
47
47
-c | --cluster Name of ECS cluster
48
48
-i | --image Name of Docker image to run, ex: repo/image:latest
49
49
Format: [domain][:port][/repo][/][image][:tag]
50
- Examples: mariadb, mariadb:latest, silintl/mariadb,
51
- silintl/mariadb:latest, private.registry.com:8000/repo/image:tag
50
+ Examples: mariadb, mariadb:latest, private.registry.com:8000/repo/image:tag
52
51
--aws-instance-profile Use the IAM role associated with this instance
53
52
54
53
Optional arguments:
@@ -252,7 +251,7 @@ function parseImageName() {
252
251
fi
253
252
else
254
253
# check if using root level repo with format like mariadb or mariadb:latest
255
- rootRepoRegex=" ^([a-zA-Z0-9\-]+):?([a-zA-Z0-9\.\-]+)?$"
254
+ rootRepoRegex=" ^([a-zA-Z0-9\-]+):?([a-zA-Z0-9\.\-_ ]+)?$"
256
255
if [[ $IMAGE =~ $rootRepoRegex ]]; then
257
256
img=${BASH_REMATCH[1]}
258
257
if [[ " x$img " == " x" ]]; then
Original file line number Diff line number Diff line change 670
670
[ ! -z $status ]
671
671
[ " $( echo " $output " | jq .) " == " $( echo " $expected " | jq .) " ]
672
672
}
673
+
674
+ @test " test parseImageName using image starting with underscore" {
675
+ IMAGE=" _something:tag123"
676
+ TAGVAR=false
677
+ run parseImageName
678
+ [ $status -eq 13 ]
679
+ }
680
+
681
+ @test " test parseImageName using image containing an underscore in tag name" {
682
+ IMAGE=" something:tag_123"
683
+ TAGVAR=false
684
+ run parseImageName
685
+ [ ! -z $status ]
686
+ [ " $output " == " something:tag_123" ]
687
+ echo " output = $output " 1>&2
688
+ }
You can’t perform that action at this time.
0 commit comments