Skip to content

Commit

Permalink
Merge pull request #185 from scality/bugfix/RELENG-6452-indexing-post…
Browse files Browse the repository at this point in the history
…-failure

RELENG-6452 indexing post failure
  • Loading branch information
tcarmet authored Sep 7, 2022
2 parents 1304007 + a1df552 commit bdb0f02
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ export async function setDefaultIndex(inputs: InputsArtifacts): Promise<void> {
[refType]: github.context.ref,
sha,
event_name: github.context.eventName,
actor: github.context.actor,
actor: github.context.actor.replace('[bot]', ''),
run_number: github.context.runNumber
}
core.debug(JSON.stringify(metadata))
core.debug(JSON.stringify(actionsMetadata))
core.info('Uploading default index...')
await setIndex(client, inputs.url, metadata)
await setIndex(client, inputs.url, actionsMetadata)
Expand Down Expand Up @@ -186,7 +188,7 @@ export async function setIndex(
}
const response: AxiosResponse = await client.get(metadataUrl, requestConfig)
if (!response.data.endsWith('PASSED\n')) {
throw Error(`Indexing failed`)
throw Error(response.data)
}

return response
Expand Down

0 comments on commit bdb0f02

Please sign in to comment.