@payfit/nx-core 4.17.1-beta-continuation-tbot.2 → 4.17.1

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": "@payfit/nx-core",
3
- "version": "4.17.1-beta-continuation-tbot.2",
3
+ "version": "4.17.1",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -4,9 +4,6 @@ orbs:
4
4
  aws-cli: circleci/aws-cli@5.3.3
5
5
  github: payfit/github@0.9
6
6
  node: circleci/node@7.1
7
- <% if (keepContinuationJobs) { %>
8
- continuation: circleci/continuation@1.0.0
9
- <% } %>
10
7
 
11
8
  references:
12
9
  setup_env_node: &setup_env_node
@@ -27,7 +24,7 @@ references:
27
24
  workflow-name: build-test-release
28
25
 
29
26
  jobs:
30
- yarn:
27
+ install_packages:
31
28
  <<: *setup_env_node
32
29
  steps:
33
30
  - checkout
@@ -38,29 +35,28 @@ jobs:
38
35
  steps:
39
36
  - checkout
40
37
  - node/install-packages: *install_packages
41
- - run: yarn nx report
42
- - run: yarn lint
38
+ - run: npx nx run-many -t lint
43
39
 
44
40
  nx-conformance:
45
41
  <<: *setup_env_node
46
42
  steps:
47
43
  - checkout
48
44
  - node/install-packages: *install_packages
49
- - run: yarn nx-cloud record -- yarn nx-cloud conformance:check
45
+ - run: npx nx-cloud record -- npx nx-cloud conformance:check
50
46
 
51
47
  nx-sync:
52
48
  <<: *setup_env_node
53
49
  steps:
54
50
  - checkout
55
51
  - node/install-packages: *install_packages
56
- - run: yarn nx-cloud record -- yarn nx sync:check
52
+ - run: npx nx-cloud record -- npx nx sync:check
57
53
 
58
54
  format:
59
55
  <<: *setup_env_node
60
56
  steps:
61
57
  - checkout
62
58
  - node/install-packages: *install_packages
63
- - run: yarn nx-cloud record -- yarn nx format:check
59
+ - run: npx nx-cloud record -- npx nx format:check
64
60
 
65
61
  build:
66
62
  <<: *setup_env_node
@@ -68,7 +64,7 @@ jobs:
68
64
  - checkout
69
65
  - node/install-packages: *install_packages
70
66
  - nx/set-shas: *nx_set_shas_option
71
- - run: yarn build
67
+ - run: npx nx run-many -t build
72
68
  - persist_to_workspace:
73
69
  root: '.'
74
70
  paths:
@@ -80,7 +76,7 @@ jobs:
80
76
  - checkout
81
77
  - node/install-packages: *install_packages
82
78
  - nx/set-shas: *nx_set_shas_option
83
- - run: yarn test
79
+ - run: npx nx run-many -t test
84
80
  - store_test_results:
85
81
  path: test-results
86
82
 
@@ -117,52 +113,16 @@ jobs:
117
113
  git config --global user.name "semver-release"
118
114
  git config --global --type bool push.autoSetupRemote true
119
115
  git fetch --tags
120
- tbot start -c .circleci/teleport/shared-charts.conf
116
+ tbot start -c .github/teleport/shared-charts.conf
121
117
  if [[ "${CIRCLE_BRANCH}" == "main" || "${CIRCLE_BRANCH}" == "master" ]]; then
122
118
  echo "Publishing release"
123
- yarn nx release --yes
119
+ npx nx release --yes
124
120
  else
125
121
  echo "Publishing ephemeral"
126
- yarn nx release prerelease --preid beta-${CIRCLE_BRANCH//[^a-zA-Z0-9]/-} --skip-publish
127
- yarn nx release publish --tag beta
122
+ npx nx release prerelease --preid beta-${CIRCLE_BRANCH//[^a-zA-Z0-9]/-} --skip-publish
123
+ npx nx release publish --tag beta
128
124
  fi
129
125
 
130
- <% if (keepContinuationJobs) { %>
131
- continuation:
132
- <<: *setup_env_node
133
- parameters:
134
- parameters:
135
- description: >-
136
- The parameters used for the pipeline. A path to a file containing
137
- a JSON object with parameters
138
- type: string
139
- default: << pipeline.parameters.parameters-file >>
140
- continue-config:
141
- description: Path to the internally-used config for continuation
142
- type: string
143
- default: << pipeline.parameters.continue-config >>
144
- steps:
145
- - checkout
146
- - attach_workspace: *attach_workspace
147
- - run:
148
- name: skip if no affected-apps
149
- command: |
150
- # If `affected-apps` is unavailable, stop this job without continuation
151
- if [ ! -f "<< parameters.continue-config >>" ] || [ ! -s "<< parameters.continue-config >>" ]
152
- then
153
- echo 'No affected apps, nothing to do.'
154
- circleci-agent step halt
155
- exit
156
- fi
157
- - run:
158
- name: Setup parameters
159
- command: |
160
- echo "{\"workflow-id\": \"$CIRCLE_WORKFLOW_ID\"}" > parameters.json
161
- - continuation/continue:
162
- configuration_path: << parameters.continue-config >>
163
- parameters: parameters.json
164
- <% } %>
165
-
166
126
  workflows:
167
127
  build-test-deploy:
168
128
  jobs:
@@ -171,38 +131,38 @@ workflows:
171
131
  name: github_authenticate
172
132
  context:
173
133
  - NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
174
- - yarn:
134
+ - install_packages:
175
135
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
176
136
 
177
137
  - lint:
178
138
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
179
139
  requires:
180
- - yarn
140
+ - install_packages
181
141
 
182
142
  - nx-sync:
183
143
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
184
144
  requires:
185
- - yarn
145
+ - install_packages
186
146
 
187
147
  - format:
188
148
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
189
149
  requires:
190
- - yarn
150
+ - install_packages
191
151
 
192
152
  - nx-conformance:
193
153
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
194
154
  requires:
195
- - yarn
155
+ - install_packages
196
156
 
197
157
  - build:
198
158
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
199
159
  requires:
200
- - yarn
160
+ - install_packages
201
161
 
202
162
  - test:
203
163
  context: NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
204
164
  requires:
205
- - yarn
165
+ - install_packages
206
166
 
207
167
  <% if (queuing_release) { %>
208
168
  - publish:
@@ -235,11 +195,3 @@ workflows:
235
195
  context:
236
196
  - NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
237
197
  <% } %>
238
-
239
- <% if (keepContinuationJobs) { %>
240
- - continuation:
241
- requires:
242
- - build
243
- context:
244
- - NX_COMMON_PACKAGES # TSH config / AWS credentials / NPM token
245
- <% } %>
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initGenerator = initGenerator;
4
- const fs = require("fs");
5
4
  const path = require("path");
6
5
  const devkit_1 = require("@nx/devkit");
7
6
  function injectNxReleaseConfiguration(tree) {
@@ -50,42 +49,11 @@ function injectNxReleaseConfiguration(tree) {
50
49
  }
51
50
  async function initGenerator(tree, options = {}) {
52
51
  const workspaceRoot = `.`;
53
- // Check for each project if we can find a template.yaml or a cdk.json file
54
- // If it's the case we should keep the continuation jobs in the .circleci/config.yml,
55
- // the .circleci/shared-config.yml
56
- // and keep the {projectRoot}/.circleci/config.yml file
57
- // If not we can delete all {projectRoot}/.circleci/config.yml files and the .circleci/shared-config.yml file.
58
- const projects = (0, devkit_1.getProjects)(tree);
59
- let hasCdkOrTemplateFile = false;
60
- // Check each project for template.yaml or cdk.json files
61
- for (const [projectName, projectConfig] of projects.entries()) {
62
- const projectRoot = projectConfig.root;
63
- const templateYamlPath = path.join(projectRoot, 'template.yaml');
64
- const cdkJsonPath = path.join(projectRoot, 'cdk.json');
65
- // Check if either file exists
66
- if (fs.existsSync(templateYamlPath) || fs.existsSync(cdkJsonPath)) {
67
- hasCdkOrTemplateFile = true;
68
- break; // We found at least one project with the required files, no need to check further
69
- }
70
- }
71
- // If no project has template.yaml or cdk.json files, delete all project-specific CircleCI config files
72
- if (!hasCdkOrTemplateFile) {
73
- // We don't delete the shared-config.yml file anymore as it should already exist in the project
74
- // Delete all project-specific CircleCI config files
75
- for (const [projectName, projectConfig] of projects.entries()) {
76
- const projectRoot = projectConfig.root;
77
- const projectCircleCIPath = path.join(projectRoot, '.circleci/config.yml');
78
- if (tree.exists(projectCircleCIPath)) {
79
- tree.delete(projectCircleCIPath);
80
- }
81
- }
82
- }
83
52
  // Delete the .circleci/config.yml file if it exists
84
53
  tree.delete(path.join(workspaceRoot, '.circleci/config.yml'));
85
54
  // Generate the .circleci/config.yml file
86
55
  (0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), workspaceRoot, {
87
56
  queuing_release: options.queuing_release ?? true,
88
- keepContinuationJobs: hasCdkOrTemplateFile,
89
57
  });
90
58
  // Patch the nx.json file with the nx release default configuration
91
59
  injectNxReleaseConfiguration(tree);
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/nx-core/src/generators/init/init.ts"],"names":[],"mappings":";;AA8DA,sCAqDC;AAnHD,yBAAwB;AACxB,6BAA4B;AAE5B,uCAMmB;AAInB,SAAS,4BAA4B,CAAC,IAAU;IAC9C,IAAA,mBAAU,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;QACnC,MAAM,CAAC,OAAO,GAAG;YACf,oBAAoB,EAAE,aAAa;YACnC,QAAQ,EAAE,CAAC,GAAG,CAAC;YACf,iBAAiB,EAAE,yBAAyB;YAC5C,SAAS,EAAE;gBACT,iBAAiB,EAAE;oBACjB,aAAa,EAAE,QAAQ;oBACvB,IAAI,EAAE,KAAK;iBACZ;gBACD,gBAAgB,EAAE,IAAI;aACvB;YACD,OAAO,EAAE;gBACP,mBAAmB,EAAE,KAAK;gBAC1B,sBAAsB,EAAE,SAAS;gBACjC,8BAA8B,EAAE,MAAM;gBACtC,eAAe,EAAE,sBAAsB;gBACvC,qBAAqB,EAAE,CAAC,oBAAoB,CAAC;gBAC7C,gCAAgC,EAAE,KAAK;aACxC;YACD,GAAG,EAAE;gBACH,MAAM,EAAE,KAAK;gBACb,GAAG,EAAE,IAAI;aACV;SACF,CAAA;QACD,+CAA+C;QAC/C,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;QAErC,yDAAyD;QACzD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;YAChD,MAAM,CAAC,OAAO,CAA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IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE;QAChE,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,IAAI;KACjD,CAAC,CAAA;IAEF,mEAAmE;IACnE,4BAA4B,CAAC,IAAI,CAAC,CAAA;IAClC,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED,kBAAe,aAAa,CAAA"}
@@ -1,24 +0,0 @@
1
- version: v2
2
- onboarding:
3
- token: "nx-common-packages"
4
- join_method: "circleci"
5
- storage:
6
- type: "directory"
7
- path: "/tmp/tbot-data"
8
- symlinks: "try-secure"
9
- acls: "off"
10
- outputs:
11
- - type: "application"
12
- destination:
13
- type: "directory"
14
- path: "./certs"
15
- symlinks: "try-secure"
16
- acls: "off"
17
- app_name: "charts-shared"
18
- specific_tls_naming: false
19
- debug: false
20
- auth_server: "payfit.teleport.sh:443"
21
- certificate_ttl: "1h0m0s"
22
- renewal_interval: "20m0s"
23
- oneshot: true
24
- fips: false