mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-24 11:36:18 +08:00
Include build scan link in failure notice
This commit is contained in:
parent
947a893558
commit
39db90e99b
2
dist/main/index.js
vendored
2
dist/main/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
15
src/main.ts
15
src/main.ts
@ -28,13 +28,20 @@ export async function run(): Promise<void> {
|
||||
|
||||
if (result.buildScanUrl) {
|
||||
core.setOutput('build-scan-url', result.buildScanUrl)
|
||||
// TODO Include context about the invocation (eg step name) in this message
|
||||
// Unfortunately it doesn't seem possible to access the current step name here
|
||||
core.notice(`Gradle build scan: ${result.buildScanUrl}`)
|
||||
}
|
||||
|
||||
if (result.status !== 0) {
|
||||
core.setFailed(`Gradle process exited with status ${result.status}`)
|
||||
if (result.buildScanUrl) {
|
||||
core.setFailed(`Gradle build failed: ${result.buildScanUrl}`)
|
||||
} else {
|
||||
core.setFailed(
|
||||
`Gradle build failed: process exited with status ${result.status}`
|
||||
)
|
||||
}
|
||||
} else {
|
||||
if (result.buildScanUrl) {
|
||||
core.notice(`Gradle build succeeded: ${result.buildScanUrl}`)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(String(error))
|
||||
|
Loading…
x
Reference in New Issue
Block a user