-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LINBEE-10041 - Handle cases where downloading artifacts fails and imp…
…rove code safety (#114) * LINBEE-10041 - fix case when download artifact fails * fix format * fix format * fix var name * debug * use env.CACHE_DOWNLOAD_FAILED * convert setFailed to warning * remove debugs * core debug * fix condition * revert debug core --------- Co-authored-by: Yeela Lifshitz <[email protected]>
- Loading branch information
Showing
3 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
|
||
module.exports = core => { | ||
try { | ||
const { ARTIFACT_OUTCOME_ARG } = process.env | ||
core.info(`Setting cache download status to: ${ARTIFACT_OUTCOME_ARG}`) | ||
|
||
if (ARTIFACT_OUTCOME_ARG === 'failure') { | ||
core.exportVariable('CACHE_DOWNLOAD_FAILED', 'true') | ||
} else { | ||
core.exportVariable('CACHE_DOWNLOAD_FAILED', 'false') | ||
} | ||
} catch (error) { | ||
core.warn(`Failed to set cache download status: ${error.message}`) | ||
core.exportVariable('CACHE_DOWNLOAD_FAILED', 'true') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters