@@ -36,6 +36,7 @@ function usage {
36
36
echo " -a Used to specify an artifact output directory."
37
37
echo " Options:"
38
38
echo " -l IMAGE Used to override the default local agent image."
39
+ echo " -r Used to specify a report output directory."
39
40
echo " -s Used to specify source information. Defaults to the current working directory for primary source."
40
41
echo " * First (-s) is for primary source"
41
42
echo " * Use additional (-s) in <sourceIdentifier>:<sourceLocation> format for secondary source"
@@ -61,10 +62,11 @@ awsconfig_flag=false
61
62
mount_src_dir_flag=false
62
63
docker_privileged_mode_flag=false
63
64
64
- while getopts " cmdi:a:s:b:e:l:p:h" opt; do
65
+ while getopts " cmdi:a:r: s:b:e:l:p:h" opt; do
65
66
case $opt in
66
67
i ) image_flag=true; image_name=$OPTARG ;;
67
68
a ) artifact_flag=true; artifact_dir=$OPTARG ;;
69
+ r ) report_dir=$OPTARG ;;
68
70
b ) buildspec=$OPTARG ;;
69
71
c ) awsconfig_flag=true;;
70
72
m ) mount_src_dir_flag=true;;
106
108
docker_command+=" \" IMAGE_NAME=$image_name \" -e \
107
109
\" ARTIFACTS=$( allOSRealPath " $artifact_dir " ) \" "
108
110
111
+ if [ -n " $report_dir " ]
112
+ then
113
+ docker_command+=" -e \" REPORTS=$( allOSRealPath " $report_dir " ) \" "
114
+ fi
115
+
109
116
if [ -z " $source_dirs " ]
110
117
then
111
118
docker_command+=" -e \" SOURCE=$( allOSRealPath " $PWD " ) \" "
@@ -136,11 +143,6 @@ then
136
143
docker_command+=" -v \" $environment_variable_file_dir :/LocalBuild/envFile/\" -e \" ENV_VAR_FILE=$environment_variable_file_basename \" "
137
144
fi
138
145
139
- if [ -n " $local_agent_image " ]
140
- then
141
- docker_command+=" -e \" LOCAL_AGENT_IMAGE_NAME=$local_agent_image \" "
142
- fi
143
-
144
146
if $awsconfig_flag
145
147
then
146
148
if [ -d " $HOME /.aws" ]
@@ -176,7 +178,12 @@ else
176
178
docker_command+=" -e \" INITIATOR=$USER \" "
177
179
fi
178
180
179
- docker_command+=" amazon/aws-codebuild-local:latest"
181
+ if [ -n " $local_agent_image " ]
182
+ then
183
+ docker_command+=" $local_agent_image "
184
+ else
185
+ docker_command+=" public.ecr.aws/codebuild/local-builds:latest"
186
+ fi
180
187
181
188
# Note we do not expose the AWS_SECRET_ACCESS_KEY or the AWS_SESSION_TOKEN
182
189
exposed_command=$docker_command
@@ -191,4 +198,4 @@ echo ""
191
198
echo $exposed_command
192
199
echo " "
193
200
194
- eval $docker_command
201
+ eval $docker_command
0 commit comments