Updated artifact URL construction in appupdate.js to ensure proper formatting of relative paths, enhancing reliability in artifact retrieval.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit is contained in:
parent
759aa1017f
commit
e23ac3f6a3
@ -28,13 +28,11 @@ const getBranchBuildApiUrl = (branchUrl, buildType = 'lastSuccessfulBuild') =>
|
||||
`${normalizeProjectUrl(branchUrl)}/${buildType}/api/json?tree=number,url,result,displayName,timestamp,artifacts[fileName,relativePath],changeSets[items[author[fullName],timestamp,msg]]`;
|
||||
|
||||
const mapArtifacts = (build, requestedBranch) => {
|
||||
const buildUrl = normalizeProjectUrl(build?.url);
|
||||
const artifacts = Array.isArray(build?.artifacts) ? build.artifacts : [];
|
||||
console.log(artifacts);
|
||||
return artifacts.map((artifact) => ({
|
||||
fileName: artifact.fileName,
|
||||
relativePath: artifact.relativePath,
|
||||
url: `${config.app.appUpdateStorage}/${requestedBranch}/${build.number}/artifacts/${artifact.relativePath}`,
|
||||
url: `${config.app.appUpdateStorage}/${requestedBranch}/${build.number}/artifacts/${String(artifact.relativePath || '').replaceAll('\\', '/')}`,
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user