|
@@ -352,10 +352,10 @@ const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
|
|
|
const branch = build.branch || 'unknown';
|
|
const branch = build.branch || 'unknown';
|
|
|
const buildNumber = getBuildNumber();
|
|
const buildNumber = getBuildNumber();
|
|
|
const root = `dev/${pluginMeta.id}`;
|
|
const root = `dev/${pluginMeta.id}`;
|
|
|
- const dirKey = pr ? `${root}/pr/${pr}` : `${root}/branch/${branch}/${buildNumber}`;
|
|
|
|
|
|
|
+ const dirKey = pr ? `${root}/pr/${pr}/${buildNumber}` : `${root}/branch/${branch}/${buildNumber}`;
|
|
|
|
|
|
|
|
const jobKey = `${dirKey}/index.json`;
|
|
const jobKey = `${dirKey}/index.json`;
|
|
|
- if (await s3.exits(jobKey)) {
|
|
|
|
|
|
|
+ if (await s3.exists(jobKey)) {
|
|
|
throw new Error('Job already registered: ' + jobKey);
|
|
throw new Error('Job already registered: ' + jobKey);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -378,20 +378,21 @@ const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
|
|
|
version,
|
|
version,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ let base = `${root}/branch/${branch}/`;
|
|
|
|
|
+ latest.build.number = buildNumber;
|
|
|
if (pr) {
|
|
if (pr) {
|
|
|
latest.build.pr = pr;
|
|
latest.build.pr = pr;
|
|
|
- } else {
|
|
|
|
|
- latest.build.number = buildNumber;
|
|
|
|
|
- const base = `${root}/branch/${branch}/`;
|
|
|
|
|
- const historyKey = base + `history.json`;
|
|
|
|
|
- console.log('Read', historyKey);
|
|
|
|
|
- const history: PluginHistory = await s3.readJSON(historyKey, defaultPluginHistory);
|
|
|
|
|
- appendPluginHistory(report, latest, history);
|
|
|
|
|
-
|
|
|
|
|
- await s3.writeJSON(historyKey, history);
|
|
|
|
|
- console.log('wrote history');
|
|
|
|
|
|
|
+ base = `${root}/pr/${pr}/`;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const historyKey = base + `history.json`;
|
|
|
|
|
+ console.log('Read', historyKey);
|
|
|
|
|
+ const history: PluginHistory = await s3.readJSON(historyKey, defaultPluginHistory);
|
|
|
|
|
+ appendPluginHistory(report, latest, history);
|
|
|
|
|
+
|
|
|
|
|
+ await s3.writeJSON(historyKey, history);
|
|
|
|
|
+ console.log('wrote history');
|
|
|
|
|
+
|
|
|
// Private things may want to upload
|
|
// Private things may want to upload
|
|
|
if (upload) {
|
|
if (upload) {
|
|
|
s3.uploadPackages(packageInfo, {
|
|
s3.uploadPackages(packageInfo, {
|