@@ -39,6 +39,7 @@ function usage {
39
39
echo " -c Use the AWS configuration and credentials from your local host. This includes ~/.aws and any AWS_* environment variables."
40
40
echo " -b Used to specify a buildspec override file. Defaults to buildspec.yml in the source directory."
41
41
echo " -e Used to specify a file containing environment variables."
42
+ echo " -m Used to mount the source directory to the customer build container directly."
42
43
echo " Environment variable file format:"
43
44
echo " * Expects each line to be in VAR=VAL format"
44
45
echo " * Lines beginning with # are processed as comments and ignored"
@@ -51,13 +52,15 @@ function usage {
51
52
image_flag=false
52
53
artifact_flag=false
53
54
awsconfig_flag=false
55
+ mount_src_dir_flag=false
54
56
55
- while getopts " ci :a:s:b:e:l:h" opt; do
57
+ while getopts " cmi :a:s:b:e:l:h" opt; do
56
58
case $opt in
57
59
i ) image_flag=true; image_name=$OPTARG ;;
58
60
a ) artifact_flag=true; artifact_dir=$OPTARG ;;
59
61
b ) buildspec=$OPTARG ;;
60
62
c ) awsconfig_flag=true;;
63
+ m ) mount_src_dir_flag=true;;
61
64
s ) source_dir=$OPTARG ;;
62
65
e ) environment_variable_file=$OPTARG ;;
63
66
l ) local_agent_image=$OPTARG ;;
120
123
docker_command+=" -e \" LOCAL_AGENT_IMAGE_NAME=$local_agent_image \" "
121
124
fi
122
125
123
- if $awsconfig_flag
126
+ if $awsconfig_flag
124
127
then
125
128
if [ -d " $HOME /.aws" ]
126
129
then
@@ -132,6 +135,11 @@ then
132
135
docker_command+=" $( env | grep ^AWS_ | while read -r line; do echo " -e \" $line \" " ; done ) "
133
136
fi
134
137
138
+ if $mount_src_dir_flag
139
+ then
140
+ docker_command+=" -e \" MOUNT_SOURCE_DIRECTORY=TRUE\" "
141
+ fi
142
+
135
143
if isOSWindows
136
144
then
137
145
docker_command+=" -e \" INITIATOR=$USERNAME \" "
0 commit comments