@docupace/pipeline 1.0.109 → 1.0.111

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.
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "restricted",
8
+ "baseBranch": "master",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,53 @@
1
+ # @docupace/pipeline
2
+
3
+ ## 1.0.111
4
+
5
+ ### Patch Changes
6
+
7
+ - 471bab7: Fix pipeline
8
+
9
+ ## 1.0.110
10
+
11
+ ### Patch Changes
12
+
13
+ - 672f1c0: Fix Pipeline
14
+
15
+ ## 1.0.110
16
+
17
+ ### Patch Changes
18
+
19
+ - e4eac44: Fix publish
20
+
21
+ ## 1.0.110
22
+
23
+ ### Patch Changes
24
+
25
+ - 067293a: Fix pipleine
26
+
27
+ ## 1.0.110
28
+
29
+ ### Patch Changes
30
+
31
+ - e9e26c0: Fix Publish
32
+
33
+ ## 1.0.110
34
+
35
+ ### Patch Changes
36
+
37
+ - Fix for publishing
38
+
39
+ ## 1.0.110
40
+
41
+ ### Patch Changes
42
+
43
+ - 412e6ec: Fix for publishing
44
+ - Updated dependencies [412e6ec]
45
+ - @docupace/pipeline@1.0.110
46
+
47
+ ## 1.0.110
48
+
49
+ ### Patch Changes
50
+
51
+ - 456ee5f: Add support for publishing
52
+ - Updated dependencies [456ee5f]
53
+ - @docupace/pipeline@1.0.110
@@ -2,6 +2,22 @@
2
2
  clone:
3
3
  depth: 2
4
4
 
5
+ definitions:
6
+ caches:
7
+ pnpm: ~/.pnpm-store
8
+ steps:
9
+ - step: &version-step
10
+ runs-on:
11
+ - self.hosted
12
+ - linux.shell
13
+ - onprem
14
+ name: On Merge
15
+ script:
16
+ - npm config set //registry.npmjs.org/:_authToken $DOCUPACE_NPM_TOKEN
17
+ - pnpm install --frozen-lockfile
18
+ - export HOME=/tmp
19
+ - node src/changeset/cli.js version-commit-tag --ignore-install-error
20
+
5
21
  pipelines:
6
22
  pull-requests:
7
23
  '**':
@@ -9,29 +25,13 @@ pipelines:
9
25
  runs-on:
10
26
  - self.hosted
11
27
  - linux.shell
28
+ - onprem
12
29
  name: On Pull Request
13
30
  script:
14
- - npm install -g pnpm
15
- - pnpm config set //registry.npmjs.org/:_authToken $DOCUPACE_NPM_TOKEN
16
- - pnpm install --frozen-lockfile
17
- - 'npx eslint . --rule "no-unused-vars: warn" --rule "no-useless-escape: warn" --color'
18
- - pnpm test
19
- artifacts:
20
- - coverage/**
21
- after-script:
22
- - echo "Pipeline completed with status $BITBUCKET_EXIT_CODE"
23
-
24
- custom:
25
- scheduled-tests:
26
- - step:
27
- runs-on:
28
- - self.hosted
29
- - linux.shell
30
- name: Scheduled Tests
31
- script:
32
- - npm install -g pnpm
33
31
  - pnpm config set //registry.npmjs.org/:_authToken $DOCUPACE_NPM_TOKEN
34
32
  - pnpm install --frozen-lockfile
33
+ - export HOME=/tmp
34
+ - node src/changeset/cli.js validate
35
35
  - 'npx eslint . --rule "no-unused-vars: warn" --rule "no-useless-escape: warn" --color'
36
36
  - pnpm test
37
37
  artifacts:
@@ -40,21 +40,22 @@ pipelines:
40
40
  - echo "Pipeline completed with status $BITBUCKET_EXIT_CODE"
41
41
 
42
42
  branches:
43
- main:
43
+ master:
44
+ - step: *version-step
45
+ 'release/*':
46
+ - step: *version-step
47
+
48
+ tags:
49
+ 'v*':
44
50
  - step:
45
51
  runs-on:
46
52
  - self.hosted
47
53
  - linux.shell
48
- name: Main Branch Build
54
+ - onprem
55
+ name: On Tag
49
56
  script:
50
- - npm install -g pnpm
51
57
  - pnpm config set //registry.npmjs.org/:_authToken $DOCUPACE_NPM_TOKEN
52
58
  - pnpm install --frozen-lockfile
53
59
  - 'npx eslint . --rule "no-unused-vars: warn" --rule "no-useless-escape: warn" --color'
54
60
  - pnpm test
55
- artifacts:
56
- - coverage/**
57
-
58
- definitions:
59
- caches:
60
- pnpm: ~/.pnpm-store
61
+ - pnpm publish --no-git-checks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.109",
3
+ "version": "1.0.111",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -21,7 +21,6 @@
21
21
  "license": "ISC",
22
22
  "dependencies": {
23
23
  "@changesets/cli": "^2.27.10",
24
- "@docupace/pipeline": "^1.0.86",
25
24
  "@jest/globals": "^30.1.2",
26
25
  "@docupace/core-client": "^0.1.59",
27
26
  "auth0-deploy-cli": "^8.8.0",
@@ -148,9 +148,13 @@ program
148
148
  program
149
149
  .command('version-commit-tag')
150
150
  .description('Run versioning and commit-and-tag in sequence')
151
- .action(async () => {
151
+ .option(
152
+ '--ignore-install-error',
153
+ 'Ignore errors from pnpm install and return early',
154
+ )
155
+ .action(async (options) => {
152
156
  console.log('📦 Running all steps...');
153
- const releases = await versionCommand();
157
+ const releases = await versionCommand(false, options.ignoreInstallError);
154
158
  await updateJiraWithVersion(releases);
155
159
  await updateWikiWithVersion(releases);
156
160
  await commitTagCommand(releases);
@@ -3,6 +3,7 @@ export const componentConfig = {
3
3
  '@docupace/cc-ui-app': 'C & C Application',
4
4
  '@docupace/core': 'Enterprise Core',
5
5
  '@docupace/graphql-server': 'Enterprise',
6
+ 'docupace-graphql-server': 'Enterprise',
6
7
  '@docupace/enterprise-template': 'Enterprise',
7
8
  '@docupace/compliance-edge-ui-app': 'Compliance Edge',
8
9
  };
@@ -65,14 +65,31 @@ export async function versionStatus(sinceBranch) {
65
65
  return jsonOutput.releases;
66
66
  }
67
67
 
68
- export async function versionCommand(closeVersion = false) {
68
+ export async function versionCommand(
69
+ closeVersion = false,
70
+ ignoreInstallError = false,
71
+ ) {
69
72
  console.log('📦 Running Changeset versioning...');
70
73
  if (!process.env.IS_DEV) {
71
74
  await setGitInfo();
72
75
  await $`mv package.json package.json.bak`;
73
76
  await $`mv pnpm-lock.yaml pnpm-lock.yaml.bak`;
74
77
  await fs.promises.writeFile('package.json', changeSetPackage);
75
- await $`pnpm install`;
78
+ await $`npm config set //registry.npmjs.org/:_authToken ${process.env.DOCUPACE_NPM_TOKEN}`;
79
+ try {
80
+ await $`pnpm install`;
81
+ } catch (error) {
82
+ if (ignoreInstallError) {
83
+ console.log(
84
+ `⚠️ pnpm install failed: ${error.message}. Ignoring error and returning.`,
85
+ );
86
+ await $`rm -f package.json pnpm-lock.yaml`;
87
+ await $`mv package.json.bak package.json`;
88
+ await $`mv pnpm-lock.yaml.bak pnpm-lock.yaml`;
89
+ return [];
90
+ }
91
+ throw error;
92
+ }
76
93
  await $`rm package.json pnpm-lock.yaml`;
77
94
  await $`mv package.json.bak package.json`;
78
95
  await $`mv pnpm-lock.yaml.bak pnpm-lock.yaml`;
@@ -723,14 +723,14 @@ describe('deployFromSite', () => {
723
723
  ];
724
724
 
725
725
  yaml.load
726
- .mockReturnValueOnce(mockFromConfig) // version capture: fromConfig
727
- .mockReturnValueOnce(mockToConfig) // version capture: toConfig
728
- .mockReturnValueOnce(mockFromConfig) // deployApp: fromDeployConfig
729
- .mockReturnValueOnce(mockToConfig) // deployApp: toDeployConfig
730
- .mockReturnValueOnce(mockToAppConfig) // deployApp: toDeployAppConfig
726
+ .mockReturnValueOnce(mockFromConfig) // version capture: fromConfig
727
+ .mockReturnValueOnce(mockToConfig) // version capture: toConfig
728
+ .mockReturnValueOnce(mockFromConfig) // deployApp: fromDeployConfig
729
+ .mockReturnValueOnce(mockToConfig) // deployApp: toDeployConfig
730
+ .mockReturnValueOnce(mockToAppConfig) // deployApp: toDeployAppConfig
731
731
  .mockReturnValueOnce(mockAutoDeployConfig) // updateAutoDeployVersion: auto-deploy.yaml
732
- .mockReturnValueOnce(mockFromConfig) // validateDeployVersionConsistency: values
733
- .mockReturnValueOnce(mockToAppConfig); // validateDeployVersionConsistency: app
732
+ .mockReturnValueOnce(mockFromConfig) // validateDeployVersionConsistency: values
733
+ .mockReturnValueOnce(mockToAppConfig); // validateDeployVersionConsistency: app
734
734
 
735
735
  yaml.dump.mockReturnValue('updated');
736
736
 
@@ -742,7 +742,9 @@ describe('deployFromSite', () => {
742
742
 
743
743
  const gitStatusCalls = [];
744
744
  $.mockImplementation((strings) => {
745
- const cmdStr = Array.isArray(strings) ? strings.join('') : String(strings);
745
+ const cmdStr = Array.isArray(strings)
746
+ ? strings.join('')
747
+ : String(strings);
746
748
  if (cmdStr.includes('git status --porcelain')) {
747
749
  gitStatusCalls.push(cmdStr);
748
750
  return Promise.resolve({ stdout: ' M file.yaml\n', stderr: '' });
@@ -750,7 +752,14 @@ describe('deployFromSite', () => {
750
752
  return Promise.resolve({ stdout: '', stderr: '' });
751
753
  });
752
754
 
753
- await deployFromSite('dev', 'financialdev', 'qa', 'usafinancial', 'false', 'false');
755
+ await deployFromSite(
756
+ 'dev',
757
+ 'financialdev',
758
+ 'qa',
759
+ 'usafinancial',
760
+ 'false',
761
+ 'false',
762
+ );
754
763
 
755
764
  // Two pushes should have occurred: one for gitops-qa, one for gitops-dev
756
765
  expect(gitStatusCalls.length).toBeGreaterThanOrEqual(2);