Skip to content

Commit

Permalink
Fix undefined jobURL
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay Sharma <akshay.sharma@fresha.com>
  • Loading branch information
akshaysharma096 committed Oct 21, 2024
1 parent d16741f commit 3b104eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async function waitJenkinsJob(jobName, queueItemUrl, timestamp) {
`>>> Job '${jobName}' started executing. BuildUrl=${buildUrl}`
);
jenkinsBuildUrl =
typeof jenkinsBuildUrl == "undefined" ? undefined : buildUrl;
typeof jenkinsBuildUrl == "undefined" ? buildUrl : buildUrl;

if (jenkinsBuildUrl) {
core.setOutput("jenkinsBuildUrl", jenkinsBuildUrl);
Expand All @@ -168,7 +168,9 @@ async function waitJenkinsJob(jobName, queueItemUrl, timestamp) {
}

if (buildData.result == "SUCCESS") {
core.info(`Received 'SUCCESS' response from JenkinsAPI, successCount: ${successCount}`)
core.info(
`Received 'SUCCESS' response from JenkinsAPI, successCount: ${successCount}`
);
if (successCount >= SUCCESS_THRESHOLD) {
core.info(
`>>> Job '${buildData.fullDisplayName}' - ${jenkinsBuildUrl}, completed successfully!`
Expand Down

0 comments on commit 3b104eb

Please sign in to comment.