@@ -22,9 +22,10 @@ function runBuild() {
22
22
23
23
const inputs = githubInputs ( ) ;
24
24
25
- const config = ( ( { updateInterval, updateBackOff } ) => ( {
25
+ const config = ( ( { updateInterval, updateBackOff, hideCloudwatchLogs } ) => ( {
26
26
updateInterval,
27
27
updateBackOff,
28
+ hideCloudwatchLogs,
28
29
} ) ) ( inputs ) ;
29
30
30
31
// Get input options for startBuild
@@ -44,7 +45,7 @@ async function build(sdk, params, config) {
44
45
async function waitForBuildEndTime (
45
46
sdk ,
46
47
{ id, logs } ,
47
- { updateInterval, updateBackOff } ,
48
+ { updateInterval, updateBackOff, hideCloudwatchLogs } ,
48
49
seqEmptyLogs ,
49
50
totalEvents ,
50
51
throttleCount ,
@@ -62,13 +63,12 @@ async function waitForBuildEndTime(
62
63
const { logGroupName, logStreamName } = logName ( cloudWatchLogsArn ) ;
63
64
64
65
let errObject = false ;
65
-
66
66
// Check the state
67
67
const [ batch , cloudWatch = { } ] = await Promise . all ( [
68
68
codeBuild . batchGetBuilds ( { ids : [ id ] } ) . promise ( ) ,
69
- // The CloudWatchLog _may_ not be set up, only make the call if we have a logGroupName
70
- logGroupName &&
71
- cloudWatchLogs
69
+ ! hideCloudwatchLogs &&
70
+ logGroupName &&
71
+ cloudWatchLogs // only make the call if hideCloudwatchLogs is not enabled and a logGroupName exists
72
72
. getLogEvents ( {
73
73
logGroupName,
74
74
logStreamName,
@@ -155,7 +155,7 @@ async function waitForBuildEndTime(
155
155
return waitForBuildEndTime (
156
156
sdk ,
157
157
current ,
158
- { updateInterval, updateBackOff } ,
158
+ { updateInterval, updateBackOff, hideCloudwatchLogs } ,
159
159
seqEmptyLogs ,
160
160
totalEvents ,
161
161
throttleCount ,
@@ -210,6 +210,9 @@ function githubInputs() {
210
210
10
211
211
) * 1000 ;
212
212
213
+ const hideCloudwatchLogs =
214
+ core . getInput ( "hide-cloudwatch-logs" , { required : false } ) || undefined ;
215
+
213
216
return {
214
217
projectName,
215
218
owner,
@@ -223,6 +226,7 @@ function githubInputs() {
223
226
updateInterval,
224
227
updateBackOff,
225
228
disableSourceOverride,
229
+ hideCloudwatchLogs,
226
230
} ;
227
231
}
228
232
0 commit comments