V16 QA Publish Console Error Logs (#19417)

* Updated configuration

* Updated pipeline

* Updated nightly pipeline

* Bumped version

* updated if statement
This commit is contained in:
Andreas Zerbst
2025-06-05 13:43:00 +02:00
committed by GitHub
parent 3f57da5579
commit c7dcbfec60
4 changed files with 86 additions and 34 deletions

View File

@@ -2,45 +2,48 @@ const prompt = require('prompt');
const fs = require('fs');
const properties = [
{
description: 'Enter your Umbraco superadmin username/email',
name: 'username',
required: true
},
{
description: 'Enter your Umbraco superadmin password',
name: 'password',
hidden: true,
required: true
},
{
description: 'Enter CMS URL, or leave empty for default(https://localhost:44339)',
name: 'baseUrl'
}
{
description: 'Enter your Umbraco superadmin username/email',
name: 'username',
required: true
},
{
description: 'Enter your Umbraco superadmin password',
name: 'password',
hidden: true,
required: true
},
{
description: 'Enter CMS URL, or leave empty for default(https://localhost:44339)',
name: 'baseUrl'
}
];
const configPath = './.env';
const configPath = './.env'
console.log("Configure your Umbraco test environment")
console.log("Configure your Umbraco test environment");
prompt.start();
prompt.get(properties, function (error, result) {
if (error) { return onError(error); }
if (error) {
return onError(error);
}
var fileContent = `UMBRACO_USER_LOGIN=${result.username}
const fileContent = `UMBRACO_USER_LOGIN=${result.username}
UMBRACO_USER_PASSWORD=${result.password}
URL=${result.baseUrl || "https://localhost:44339"}
STORAGE_STAGE_PATH=${__dirname.replace(/\\/g,'/')}/playwright/.auth/user.json`;
STORAGE_STAGE_PATH=${__dirname.replace(/\\/g, '/')}/playwright/.auth/user.json
CONSOLE_ERRORS_PATH=${__dirname.replace(/\\/g, '/')}/console-errors.json`;
fs.writeFile(configPath, fileContent, function (error) {
if (error) return console.error(error);
console.log('Configuration saved');
});
fs.writeFile(configPath, fileContent, function (error) {
if (error) return console.error(error);
console.log('Configuration saved');
});
});
function onError(error) {
console.error(error);
return true;
console.error(error);
return true;
}

View File

@@ -1,14 +1,27 @@
const fs = require('fs');
const configPath = './.env';
const consoleErrorsPath = './console-errors.json';
try {
if (fs.existsSync(configPath)) {
//file exists
// file exists
console.log("Skips configuration as file already exists, run 'npm run config' to change your configuration.");
} else {
require('./config.js');
}
} catch(err) {
console.error(err)
} catch (err) {
console.error(err);
}
try {
if (!fs.existsSync(consoleErrorsPath)) {
const consoleErrorsFileContent = `{
"consoleErrors": []
}`;
fs.writeFileSync(consoleErrorsPath, consoleErrorsFileContent);
}
} catch (err) {
console.error(err);
}