Tim Pilgrim
06/06/2024, 5:09 AMsuitecloud account:setup
rather than using the arrow keys to select the saved authentication id is it possible to pass the saved aithentication id via the commandline call
suitecloud account:setup -authid=account-SB1-Dev
looking to running it through an automated process to run into a selenium grid
Thanks in advancedSelcuk Dogru
06/06/2024, 9:15 AMMarcos Lopez
06/07/2024, 9:48 PMsuitecloud account:savetoken --account $ACCOUNT_ID --authid AUTH_NAME --tokenid $TOKEN_ID --tokensecret $TOKEN_SECRET
suitecloud account:manageauth --list
michoel
06/11/2024, 2:12 AMproject.json
file with the authid. I do this in my CI/CD setup. There are a number of SDF projects that may need to be deployed, so I save the token once and create a project.json
for each project.michoel
06/11/2024, 2:12 AM/**
* Save the token for SDF. To improve performance, instead of running this for each project we are
* validating, we will use the legacy project here and manually generate a project.json for each
* project.
*/
async function saveSDFToken() {
const { NS_ACCOUNT_ID, NS_TOKEN_ID, NS_TOKEN_SECRET } = process.env;
const cwd = `./src/${LEGACY_PROJECT_NAME}`;
await exec.exec(
`npx suitecloud account:savetoken --account ${NS_ACCOUNT_ID} --authid ${NS_ACCOUNT_ID} --tokenid ${NS_TOKEN_ID} --tokensecret ${NS_TOKEN_SECRET}`,
[],
{ cwd }
);
}
/**
* Generate a project.json for the project
*
* @param {string} projectName
* @returns {Promise<void>} Promise that resolves when project.json has been generated
*/
async function generateProjectJson(projectName) {
const { NS_ACCOUNT_ID } = process.env;
const cwd = `./src/${projectName}`;
const content = { defaultAuthId: NS_ACCOUNT_ID };
return fs.promises.writeFile(`${cwd}/project.json`, JSON.stringify(content));
}
Tim Pilgrim
06/11/2024, 2:12 AMmichoel
06/11/2024, 2:13 AM