mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
e2e cloud (#4767)
* 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
This commit is contained in:
committed by
Denys Vuika
parent
446efe4297
commit
abb76d956b
26
appConfigReplace.cloud.js
Executable file
26
appConfigReplace.cloud.js
Executable file
@@ -0,0 +1,26 @@
|
||||
// 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);
|
||||
});
|
Reference in New Issue
Block a user