@docupace/pipeline 1.0.66-alpha.0 → 1.0.66

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.66-alpha.0",
3
+ "version": "1.0.66",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
package/src/auth0/cli.js CHANGED
@@ -15,7 +15,7 @@ const program = new Command();
15
15
 
16
16
  program
17
17
  .command(
18
- 'configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3Ui> <deployCCUI> <useS3Gq> ',
18
+ 'configureFromSite <fromSite> <toSite> <fromEnv> <toEnv> <deployUI> <deployGraphQLServer> <useNewDomain> <useS3Ui> <deployCCUI> <useS3Gq> [auth0Tenant]',
19
19
  )
20
20
  .description('Configure the Auth0 tenants in env for the given site')
21
21
  .action(
@@ -30,6 +30,7 @@ program
30
30
  useS3Ui,
31
31
  deployCCUI,
32
32
  useS3Gq,
33
+ auth0Tenant = '',
33
34
  ) => {
34
35
  await configureFromSite(
35
36
  fromSite,
@@ -42,6 +43,7 @@ program
42
43
  useS3Ui === 'true' || useS3Ui === true,
43
44
  deployCCUI,
44
45
  useS3Gq === 'true' || useS3Gq === true,
46
+ auth0Tenant,
45
47
  );
46
48
  },
47
49
  );
@@ -674,6 +674,7 @@ export async function configureFromSite(
674
674
  useS3Ui,
675
675
  deployCCUI,
676
676
  useS3Gq,
677
+ auth0Tenant,
677
678
  ) {
678
679
  console.log(
679
680
  `Configuring Auth0 tenants and ArgoCD apps for site: ${toSite} in env: ${toEnv} from site: ${fromSite}`,
@@ -688,8 +689,13 @@ export async function configureFromSite(
688
689
  getVaultSecretsConfigs(toSite).siteCommonSecretsPath;
689
690
  console.log(`siteCommonSecretsPath => ${siteCommonSecretsPath}`);
690
691
  const siteCommonSecrets = await getVaultSecrets(siteCommonSecretsPath);
692
+ let auth0Domain;
693
+ if (auth0Tenant === '') {
694
+ auth0Domain = `docupace-${toEnv}-${toSite}.us.auth0.com`;
695
+ } else {
696
+ auth0Domain = `${auth0Tenant}.us.auth0.com`;
697
+ }
691
698
 
692
- const auth0Domain = `docupace-${toEnv}-${toSite}.us.auth0.com`;
693
699
  const auth0ClientId = siteCommonSecrets.AUTH0_CLIENT_ID;
694
700
  const auth0ClientSecret = siteCommonSecrets.AUTH0_CLIENT_SECRET;
695
701
  const auth0Token = await getAuth0AuthToken(
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios';
2
2
 
3
- const CORE_JENKINS_URL = process.env.CORE_JENKINS_URL;
4
- const CORE_JOB_NAME = process.env.CORE_JENKINS_JOB_NAME;
3
+ const CORE_JENKINS_URL = 'http://devops.corp.docupace.com';
4
+ const CORE_JOB_NAME = 'auto-deploy-site';
5
5
  const CORE_USERNAME = process.env.CORE_JENKINS_USERNAME;
6
6
  const CORE_API_TOKEN = process.env.CORE_JENKINS_API_TOKEN;
7
7