mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* Change strategy with process cloud e2e and fixes * Change strategy with process cloud e2e and fixes * Fix path and host * improve the config and run the replace for cloud * Use the same name of other scripts * Fix lint * Run the replace in case of cloud * typo * Export variables if needed Fix the check env passing the oauth
27 lines
1.1 KiB
JavaScript
Executable File
27 lines
1.1 KiB
JavaScript
Executable File
// Protractor configuration file, see link for more information
|
|
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
|
|
require('dotenv').config( { path: './e2e/.env.cloud' });
|
|
const fs = require('fs');
|
|
|
|
const BPM_HOST = process.env.URL_HOST_BPM_ADF || "bpm";
|
|
const OAUTH_HOST = process.env.URL_HOST_SSO_ADF || "keycloak";
|
|
const IDENTITY_HOST = process.env.URL_HOST_IDENTITY || "identity";
|
|
const OAUTH_CLIENDID = process.env.OAUTH_CLIENDID || "activiti";
|
|
const AUTH_TYPE = process.env.AUTH_TYPE || "OAUTH";
|
|
const PROVIDERS = process.env.PROVIDERS || "BPM";
|
|
|
|
fs.readFile('./demo-shell/dist/app.config.json', (err, appConfigString) => {
|
|
if (err) throw err;
|
|
let appConfig = JSON.parse(appConfigString);
|
|
appConfig.bpmHost = BPM_HOST;
|
|
appConfig.authType = AUTH_TYPE;
|
|
appConfig.providers = PROVIDERS;
|
|
appConfig.identityHost = IDENTITY_HOST;
|
|
appConfig.oauth2.host = OAUTH_HOST;
|
|
appConfig.oauth2.clientId = OAUTH_CLIENDID;
|
|
|
|
let appConfigReplacedJson = JSON.stringify(appConfig);
|
|
fs.writeFileSync('./demo-shell/dist/app.config.json', appConfigReplacedJson);
|
|
});
|