@docupace/pipeline 1.0.1-2.ervins.1 → 1.0.1-2.ervins.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/auth0/configure.js +3 -0
- package/src/next/apache.js +10 -6
package/package.json
CHANGED
package/src/auth0/configure.js
CHANGED
|
@@ -278,6 +278,7 @@ async function getAuth0AuthToken(auth0Domain, clientId, clientSecret) {
|
|
|
278
278
|
|
|
279
279
|
async function configureUI(siteHost, coreURL, docupaceHost, site, env, useNewDomain, auth0Domain, auth0ClientId, auth0ClientSecret, auth0Token, vaultSiteSecretsPath, imageTag, repoPath) {
|
|
280
280
|
console.log(`Configuring UI for site: ${site} Host: ${siteHost} in env: ${env}`);
|
|
281
|
+
siteHost = siteHost.replace('https://', '');
|
|
281
282
|
|
|
282
283
|
try {
|
|
283
284
|
const auth0Response = await axios.get(`https://${auth0Domain}/api/v2/clients`, {
|
|
@@ -406,6 +407,8 @@ externalConnectService:
|
|
|
406
407
|
|
|
407
408
|
async function configureGraphQLServer(siteHost, coreURL, docupaceHost, site, env, auth0Domain, auth0ClientId, auth0ClientSecret, auth0Token, vaultSiteSecretsPath, imageTag, standardConfigRemoteBranch, repoPath, commonSecrets) {
|
|
408
409
|
console.log(`Configuring GraphQL Server for site: ${site} Host: ${siteHost} in env: ${env}`);
|
|
410
|
+
siteHost = siteHost.replace('https://', '');
|
|
411
|
+
|
|
409
412
|
|
|
410
413
|
try {
|
|
411
414
|
const auth0Response = await axios.get(`https://${auth0Domain}/api/v2/clients`, {
|
package/src/next/apache.js
CHANGED
|
@@ -19,18 +19,22 @@ export async function addApacheSite() {
|
|
|
19
19
|
log('Error: HAPROXY_PRIVATE_KEY not set.');
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
await fs.writeFile('private.key', haproxyPrivateKey);
|
|
22
|
+
|
|
23
|
+
await fs.writeFile('private.key', Buffer.from(haproxyPrivateKey, 'base64'));
|
|
24
24
|
await fs.chmod('private.key', 0o600);
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
console.log("Running command");
|
|
28
|
-
const sshCmd = (script) =>
|
|
28
|
+
const sshCmd = (server,script) =>
|
|
29
29
|
$`ssh -i private.key -o StrictHostKeyChecking=no root@${server} ${script}`;
|
|
30
30
|
|
|
31
|
+
let server = `${process.env.ENVIRONMENT}-apalb01a.corp.docupace.com`;
|
|
31
32
|
// The script is run twice in the Bash version
|
|
32
|
-
await sshCmd(`/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
33
|
-
|
|
33
|
+
await sshCmd(server, `/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
34
|
+
|
|
35
|
+
server = `${process.env.ENVIRONMENT}-apalb01b.corp.docupace.com`;
|
|
36
|
+
|
|
37
|
+
await sshCmd(server,`/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
|