@payfit/nx-core 0.0.0-e2e → 0.0.0-semver
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/README.md +10 -163
- package/dist/src/executors/publisher/docker.d.ts +3 -1
- package/dist/src/executors/publisher/docker.js +12 -57
- package/dist/src/executors/publisher/docker.js.map +1 -1
- package/dist/src/executors/publisher/executor.js +12 -9
- package/dist/src/executors/publisher/executor.js.map +1 -1
- package/dist/src/executors/publisher/helm.d.ts +5 -1
- package/dist/src/executors/publisher/helm.js +11 -40
- package/dist/src/executors/publisher/helm.js.map +1 -1
- package/dist/src/executors/publisher/schema.d.ts +5 -0
- package/dist/src/executors/publisher/schema.json +0 -44
- package/dist/src/index.d.ts +1 -24
- package/dist/src/index.js +11 -67
- package/dist/src/index.js.map +1 -1
- package/dist/src/scripts/version-actions.d.ts +20 -3
- package/dist/src/scripts/version-actions.js +41 -23
- package/dist/src/scripts/version-actions.js.map +1 -1
- package/dist/src/utils/{common/aws-auth.d.ts → aws-auth.d.ts} +8 -16
- package/dist/src/utils/aws-auth.js +84 -0
- package/dist/src/utils/aws-auth.js.map +1 -0
- package/dist/src/utils/docker.d.ts +16 -12
- package/dist/src/utils/docker.js +23 -63
- package/dist/src/utils/docker.js.map +1 -1
- package/dist/src/utils/exec.d.ts +7 -0
- package/dist/src/utils/exec.js +25 -0
- package/dist/src/utils/exec.js.map +1 -0
- package/dist/src/utils/get-version.d.ts +6 -0
- package/dist/src/utils/get-version.js +14 -0
- package/dist/src/utils/get-version.js.map +1 -0
- package/dist/src/utils/github.d.ts +4 -0
- package/dist/src/utils/github.js +17 -0
- package/dist/src/utils/github.js.map +1 -0
- package/dist/src/utils/helm.d.ts +16 -32
- package/dist/src/utils/helm.js +15 -83
- package/dist/src/utils/helm.js.map +1 -1
- package/dist/src/utils/import-esm.js.map +1 -0
- package/dist/src/utils/{common/tsh.d.ts → tsh.d.ts} +0 -1
- package/dist/src/utils/{common/tsh.js → tsh.js} +15 -20
- package/dist/src/utils/tsh.js.map +1 -0
- package/executors.json +2 -12
- package/package.json +18 -42
- package/dist/src/codegen.d.ts +0 -3
- package/dist/src/codegen.js +0 -25
- package/dist/src/codegen.js.map +0 -1
- package/dist/src/executors/preview-deploy/README.md +0 -5
- package/dist/src/executors/preview-deploy/argocdOverride.d.ts +0 -4
- package/dist/src/executors/preview-deploy/argocdOverride.js +0 -22
- package/dist/src/executors/preview-deploy/argocdOverride.js.map +0 -1
- package/dist/src/executors/preview-deploy/executor.d.ts +0 -4
- package/dist/src/executors/preview-deploy/executor.js +0 -143
- package/dist/src/executors/preview-deploy/executor.js.map +0 -1
- package/dist/src/executors/preview-deploy/kargoPolicy.d.ts +0 -14
- package/dist/src/executors/preview-deploy/kargoPolicy.js +0 -69
- package/dist/src/executors/preview-deploy/kargoPolicy.js.map +0 -1
- package/dist/src/executors/preview-deploy/schema.json +0 -28
- package/dist/src/executors/publisher/README.md +0 -3
- package/dist/src/executors/publisher/lambda.d.ts +0 -18
- package/dist/src/executors/publisher/lambda.js +0 -86
- package/dist/src/executors/publisher/lambda.js.map +0 -1
- package/dist/src/executors/release/README.md +0 -15
- package/dist/src/executors/release/executor.d.ts +0 -4
- package/dist/src/executors/release/executor.js +0 -104
- package/dist/src/executors/release/executor.js.map +0 -1
- package/dist/src/executors/release/schema.json +0 -37
- package/dist/src/generators/init/README.md +0 -5
- package/dist/src/generators/init/files/.circleci/config.yml.template +0 -232
- package/dist/src/generators/init/files/.circleci/teleport/shared-charts.conf.template +0 -24
- package/dist/src/generators/init/files/.npmrc.template +0 -1
- package/dist/src/generators/init/init.d.ts +0 -13
- package/dist/src/generators/init/init.js +0 -278
- package/dist/src/generators/init/init.js.map +0 -1
- package/dist/src/generators/init/schema.json +0 -7
- package/dist/src/scripts/codegen-with-auth.js +0 -55
- package/dist/src/scripts/version-actions.mock.d.ts +0 -6
- package/dist/src/scripts/version-actions.mock.js +0 -61
- package/dist/src/scripts/version-actions.mock.js.map +0 -1
- package/dist/src/utils/common/aws-auth.js +0 -145
- package/dist/src/utils/common/aws-auth.js.map +0 -1
- package/dist/src/utils/common/circleci.d.ts +0 -2
- package/dist/src/utils/common/circleci.js +0 -20
- package/dist/src/utils/common/circleci.js.map +0 -1
- package/dist/src/utils/common/exec.d.ts +0 -4
- package/dist/src/utils/common/exec.js +0 -52
- package/dist/src/utils/common/exec.js.map +0 -1
- package/dist/src/utils/common/github.d.ts +0 -20
- package/dist/src/utils/common/github.js +0 -60
- package/dist/src/utils/common/github.js.map +0 -1
- package/dist/src/utils/common/import-esm.js.map +0 -1
- package/dist/src/utils/common/logger.d.ts +0 -1
- package/dist/src/utils/common/logger.js +0 -8
- package/dist/src/utils/common/logger.js.map +0 -1
- package/dist/src/utils/common/nx.d.ts +0 -22
- package/dist/src/utils/common/nx.js +0 -174
- package/dist/src/utils/common/nx.js.map +0 -1
- package/dist/src/utils/common/s3.d.ts +0 -1
- package/dist/src/utils/common/s3.js +0 -18
- package/dist/src/utils/common/s3.js.map +0 -1
- package/dist/src/utils/common/tsh.js.map +0 -1
- package/dist/src/utils/datadog.d.ts +0 -1
- package/dist/src/utils/datadog.js +0 -33
- package/dist/src/utils/datadog.js.map +0 -1
- package/dist/src/utils/helm.mock.d.ts +0 -85
- package/dist/src/utils/helm.mock.js +0 -100
- package/dist/src/utils/helm.mock.js.map +0 -1
- package/dist/src/utils/lambda/aws-lambda.d.ts +0 -47
- package/dist/src/utils/lambda/aws-lambda.js +0 -231
- package/dist/src/utils/lambda/aws-lambda.js.map +0 -1
- package/dist/src/utils/lambda/lambda.d.ts +0 -7
- package/dist/src/utils/lambda/lambda.js +0 -20
- package/dist/src/utils/lambda/lambda.js.map +0 -1
- package/dist/src/utils/lambda/oci.d.ts +0 -8
- package/dist/src/utils/lambda/oci.js +0 -22
- package/dist/src/utils/lambda/oci.js.map +0 -1
- package/dist/src/utils/lambda/publish.d.ts +0 -14
- package/dist/src/utils/lambda/publish.js +0 -44
- package/dist/src/utils/lambda/publish.js.map +0 -1
- package/dist/src/utils/lambda/spacelift.d.ts +0 -3
- package/dist/src/utils/lambda/spacelift.js +0 -55
- package/dist/src/utils/lambda/spacelift.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.d.ts +0 -19
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.js +0 -22
- package/dist/src/utils/spacelift/lib/__generated__/fragment-masking.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/gql.d.ts +0 -15
- package/dist/src/utils/spacelift/lib/__generated__/gql.js +0 -8
- package/dist/src/utils/spacelift/lib/__generated__/gql.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/graphql.d.ts +0 -9426
- package/dist/src/utils/spacelift/lib/__generated__/graphql.js +0 -819
- package/dist/src/utils/spacelift/lib/__generated__/graphql.js.map +0 -1
- package/dist/src/utils/spacelift/lib/__generated__/index.d.ts +0 -2
- package/dist/src/utils/spacelift/lib/__generated__/index.js +0 -6
- package/dist/src/utils/spacelift/lib/__generated__/index.js.map +0 -1
- package/dist/src/utils/spacelift/lib/graphql.service.d.ts +0 -18
- package/dist/src/utils/spacelift/lib/graphql.service.js +0 -186
- package/dist/src/utils/spacelift/lib/graphql.service.js.map +0 -1
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.d.ts +0 -34
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.js +0 -48
- package/dist/src/utils/spacelift/lib/query/spacelift.queries.js.map +0 -1
- package/dist/src/utils/spacelift/lib/spacelift.error.d.ts +0 -43
- package/dist/src/utils/spacelift/lib/spacelift.error.js +0 -63
- package/dist/src/utils/spacelift/lib/spacelift.error.js.map +0 -1
- package/dist/src/utils/spacelift/lib/spacelift.service.d.ts +0 -16
- package/dist/src/utils/spacelift/lib/spacelift.service.js +0 -58
- package/dist/src/utils/spacelift/lib/spacelift.service.js.map +0 -1
- package/dist/src/utils/spacelift/lib/utils.d.ts +0 -4
- package/dist/src/utils/spacelift/lib/utils.js +0 -32
- package/dist/src/utils/spacelift/lib/utils.js.map +0 -1
- package/generators.json +0 -9
- /package/dist/src/utils/{common/import-esm.d.ts → import-esm.d.ts} +0 -0
- /package/dist/src/utils/{common/import-esm.js → import-esm.js} +0 -0
package/README.md
CHANGED
|
@@ -1,173 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nx-core package
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- Automated Docker image building and publishing
|
|
8
|
-
- Helm chart packaging and versioning
|
|
9
|
-
- AWS Lambda function packaging and deployment
|
|
10
|
-
- Transparent version management through Nx's versionActions
|
|
11
|
-
- Seamless integration with your Nx workspace
|
|
12
|
-
- Auto setup using init generator to update your repository at plugin installation
|
|
13
|
-
|
|
14
|
-
## Prerequisites
|
|
15
|
-
|
|
16
|
-
- yarn v4
|
|
17
|
-
- Nx up-to-date https://github.com/nrwl/nx/releases
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```shell
|
|
22
|
-
npx nx add @payfit/nx-core
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
This command will:
|
|
26
|
-
|
|
27
|
-
- Install the package as a dev dependency
|
|
28
|
-
- Run the [init generator](./src/generators/init) to set up the necessary configuration
|
|
29
|
-
- Update your workspace configuration automatically
|
|
30
|
-
|
|
31
|
-
### Init generator
|
|
32
|
-
|
|
33
|
-
Using the above command will setup your repo with the default recommended configuration. You are free to edit this configuration to your needs.
|
|
34
|
-
|
|
35
|
-
It will also generate the CircleCI config file & Teleport file needed.
|
|
36
|
-
|
|
37
|
-
The plugin uses Nx's versionActions to handle versioning transparently. [We only override the semver calculation to switch it to calver (which you can opt out)](./src/scripts/version-actions.ts).
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
38
4
|
|
|
39
5
|
## Usage
|
|
40
6
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
The plugin automatically handles:
|
|
44
|
-
|
|
45
|
-
- Building Docker images
|
|
46
|
-
- Tagging with appropriate versions
|
|
47
|
-
- Publishing to your container registry
|
|
48
|
-
|
|
49
|
-
### Helm Chart Release
|
|
50
|
-
|
|
51
|
-
The plugin manages:
|
|
52
|
-
|
|
53
|
-
- Chart version updates
|
|
54
|
-
- Chart packaging
|
|
55
|
-
- Chart publishing
|
|
56
|
-
- Automatic image tag patching in values.yaml files
|
|
57
|
-
|
|
58
|
-
#### Image Tag Patching Behavior
|
|
59
|
-
|
|
60
|
-
When releasing a new version, the plugin automatically updates Docker image tags in your Helm chart's `values.yaml` file. The patching behavior handles three scenarios:
|
|
61
|
-
|
|
62
|
-
1. **Dependencies Only**: If your `values.yaml` contains service entries that match the dependencies in your `Chart.yaml`, the plugin will update the image tags for these services.
|
|
63
|
-
|
|
64
|
-
2. **Global Tag Only**: If your `values.yaml` contains a global image tag (at `image.tag`), the plugin will update this tag with the new version.
|
|
65
|
-
|
|
66
|
-
3. **Both Dependencies and Global Tag**: If both dependency-specific tags and a global tag are present, the plugin will update all of them to maintain consistency.
|
|
67
|
-
|
|
68
|
-
This ensures that all relevant image tags are updated to the new version during the release process, regardless of your Helm chart's structure.
|
|
69
|
-
|
|
70
|
-
### Lambda Function Release
|
|
71
|
-
|
|
72
|
-
The plugin automates the process of packaging and deploying AWS Lambda functions:
|
|
7
|
+
Install the package as dev dependency of your project:
|
|
73
8
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- Creating an empty OCI artifact and pushing it to ECR for versioning
|
|
77
|
-
|
|
78
|
-
#### Lambda Configuration Parameters
|
|
79
|
-
|
|
80
|
-
When using Lambda functions, you can configure the following parameters in your project's `project.json` file:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"metadata": {
|
|
85
|
-
"lambdaFunctions": ["your-lambda-registry"],
|
|
86
|
-
"lambdaStacks": ["your-lambda-stack"],
|
|
87
|
-
"lambdaBucket": "your-lambda-bucket",
|
|
88
|
-
"lambdaHealthCheckPayload": "your-lambda-payload-json-string-formatted"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
These fields are used to:
|
|
94
|
-
|
|
95
|
-
- `lambdaFunctions`: Lambda functions to deploy
|
|
96
|
-
- `lambdaStacks`: Spacelift stacks deploying lambdas
|
|
97
|
-
- `lambdaBucket`: the S3 bucket where Lambda function zip archives are stored
|
|
98
|
-
- `lambdaHealthCheckPayload`: Payload used for smoke tests invocation
|
|
99
|
-
|
|
100
|
-
If `lambdaBucket` is not specified, the plugin will fall back to the default bucket: `payfit-shared-lambda-artifacts`.
|
|
101
|
-
|
|
102
|
-
#### Lambda Detection
|
|
103
|
-
|
|
104
|
-
The plugin automatically detects Lambda functions by looking for a `lambdaFunctions` metadata in your project root. When this metadata is present, the plugin will configure the necessary targets for packaging and deploying your Lambda function.
|
|
105
|
-
|
|
106
|
-
## Configuration
|
|
107
|
-
|
|
108
|
-
You'll need to add the following metadata to your project's `project.json` file:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"metadata": {
|
|
113
|
-
"ecrRegistry": "your-app-name",
|
|
114
|
-
"chartRegistry": "your-chart-registry",
|
|
115
|
-
"ociEcrRegistry": "your-app-name",
|
|
116
|
-
"helmChartFolder": "your-helm-folder",
|
|
117
|
-
"lambdaFunctions": ["your-lambda-registry"],
|
|
118
|
-
"lambdaStacks": ["your-lambda-stack"],
|
|
119
|
-
"lambdaBucket": "your-lambda-bucket",
|
|
120
|
-
"lambdaHealthCheckPayload": "your-lambda-payload-json-string-formatted"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
9
|
+
```shell
|
|
10
|
+
yarn add -D @payfit/nx-core
|
|
123
11
|
```
|
|
124
12
|
|
|
125
|
-
|
|
13
|
+
## Building
|
|
126
14
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- `ociEcrRegistry`: the OCI registry for container images
|
|
130
|
-
- `helmChartFolder`: the folder containing Helm chart files (Chart.yaml, values.yaml, etc.), defaults to `.deploy`
|
|
131
|
-
- `lambdaStacks`: the spacelift stacks containing lambda to deploy
|
|
132
|
-
- `lambdaFunctions`: the lambda functions to deploy
|
|
133
|
-
- `lambdaBucket`: the S3 bucket where Lambda function zip archives are stored (defaults to `payfit-shared-lambda-artifacts`)
|
|
134
|
-
- `lambdaHealthCheckPayload`: Payload used for smoke tests invocation before lambda being released
|
|
15
|
+
Run `nx build nx-core` to build the library.
|
|
16
|
+
The build artifacts will be stored in the `dist/packages/nx-core` directory.
|
|
135
17
|
|
|
136
|
-
##
|
|
137
|
-
|
|
138
|
-
The plugin automatically infers release targets for your projects based on the presence of deployment files:
|
|
139
|
-
|
|
140
|
-
1. **Docker Image Release**: If a `Dockerfile` exists in your project root, the plugin will automatically:
|
|
141
|
-
- Configure Docker image building and publishing
|
|
142
|
-
- Set up version management for the image
|
|
143
|
-
- Handle ECR repository integration
|
|
144
|
-
|
|
145
|
-
2. **Helm Chart Release**: If a `Chart.yaml` exists in your Helm chart folder (defaults to `.deploy/Chart.yaml`), the plugin will automatically:
|
|
146
|
-
- Configure Helm chart packaging and versioning
|
|
147
|
-
- Set up chart publishing to your registry
|
|
148
|
-
- Handle chart dependencies and updates
|
|
149
|
-
|
|
150
|
-
3. **Lambda Function Release**: If a `.lambda` file exists in your project root, the plugin will automatically:
|
|
151
|
-
- Configure Lambda function packaging (zip archive creation)
|
|
152
|
-
- Set up S3 bucket uploading for the Lambda artifact
|
|
153
|
-
- Create and push an empty OCI artifact to ECR for versioning
|
|
154
|
-
|
|
155
|
-
The inference of the `nx-release-publish` target is handled through Nx's plugin system, which automatically adds the necessary targets and version actions to your project configuration. You don't need to manually configure these targets.
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
# Debug locally
|
|
160
|
-
|
|
161
|
-
1. Build everything:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
npx nx run-many -t build
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
2. Trigger a new release using the local plugin version:
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
npx nx run @payfit/nx-common-packages:release --dry-run
|
|
171
|
-
```
|
|
18
|
+
## Running unit tests
|
|
172
19
|
|
|
173
|
-
|
|
20
|
+
Run `nx test nx-core` to execute the unit tests via [Vitest](https://vitest.dev/).
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { PublisherExecutorOptions } from './schema';
|
|
3
|
-
export declare function publishDocker(options: PublisherExecutorOptions, context: ExecutorContext, version: string
|
|
3
|
+
export declare function publishDocker(options: PublisherExecutorOptions, context: ExecutorContext, version: string): Promise<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
}>;
|
|
@@ -2,65 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.publishDocker = publishDocker;
|
|
4
4
|
const fs = require("node:fs");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const logger_1 = require("../../utils/common/logger");
|
|
8
|
-
const datadog_1 = require("../../utils/datadog");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const aws_auth_1 = require("../../utils/aws-auth");
|
|
9
7
|
const docker_1 = require("../../utils/docker");
|
|
10
|
-
async function publishDocker(options, context, version
|
|
11
|
-
const projectDockerfile = `${projectRoot}/Dockerfile`;
|
|
12
|
-
if (!fs.existsSync(projectDockerfile)) {
|
|
13
|
-
logger_1.consola.warn(`Dockerfile not found at ${projectDockerfile}, skipping`);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!options.ecrRegistry) {
|
|
17
|
-
logger_1.consola.error('Dockerfile detected but No ECR registry provided, add "ecrRegistry" to your project.json metadata');
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const registry = {
|
|
21
|
-
url: options.isPublicRegistry
|
|
22
|
-
? 'public.ecr.aws/payfit'
|
|
23
|
-
: process.env.AWS_ECR_REGISTRY,
|
|
24
|
-
name: options.isPublicRegistry
|
|
25
|
-
? 'public.ecr.aws'
|
|
26
|
-
: process.env.AWS_ECR_REGISTRY,
|
|
27
|
-
};
|
|
28
|
-
if (isDryRun) {
|
|
29
|
-
logger_1.consola.box(`Would have published docker image located at ${projectDockerfile} to registry ${options.ecrRegistry} with version ${version} but --dry-run is enabled`);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
8
|
+
async function publishDocker(options, context, version) {
|
|
32
9
|
await (0, aws_auth_1.checkAwsAuth)();
|
|
33
|
-
await (0, aws_auth_1.loginToEcr)(
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
37
|
-
|
|
38
|
-
// Try logging in again
|
|
39
|
-
await (0, aws_auth_1.loginToEcr)(registry.name, options.isPublicRegistry);
|
|
40
|
-
// Verify credentials again
|
|
41
|
-
const retryCredentials = await (0, aws_auth_1.verifyEcrCredentials)(registry.name);
|
|
42
|
-
if (!retryCredentials) {
|
|
43
|
-
throw new Error('No valid ECR credentials available for pushing Docker image');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
logger_1.consola.box(`Publishing docker image to ${registry.url}/${options.ecrRegistry} with version ${version}`);
|
|
47
|
-
const extraTags = !version.includes('ephemeral') && options.extraReleaseTags
|
|
48
|
-
? options.extraReleaseTags
|
|
49
|
-
: [];
|
|
50
|
-
const sanitizedRepoUrl = await (0, github_1.getSanitizedCurrentGitRepoUrl)();
|
|
51
|
-
const commitSha = await (0, github_1.getCurrentGitCommitSha)();
|
|
52
|
-
const appName = context.projectName || 'unknown-app';
|
|
53
|
-
try {
|
|
54
|
-
logger_1.consola.start('Building and pushing docker image');
|
|
55
|
-
await (0, docker_1.buildAndPushDockerImage)(options.ecrRegistry, projectDockerfile, version, sanitizedRepoUrl, commitSha, registry.url, extraTags, appName);
|
|
56
|
-
logger_1.consola.success('Docker image built and pushed successfully!');
|
|
57
|
-
if (!version.includes('ephemeral')) {
|
|
58
|
-
await (0, datadog_1.correlateDeploymentImage)(`${registry.url}/${options.ecrRegistry}:${version}`, sanitizedRepoUrl, commitSha);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
logger_1.consola.error('Failed to build and push Docker image:', error);
|
|
63
|
-
throw error;
|
|
10
|
+
await (0, aws_auth_1.loginToEcr)();
|
|
11
|
+
const projectRoot = context.projectsConfigurations.projects[context.projectName].root;
|
|
12
|
+
const projectDockerfile = (0, path_1.join)(projectRoot, 'Dockerfile');
|
|
13
|
+
if (!fs.existsSync(projectDockerfile)) {
|
|
14
|
+
throw new Error('Dockerfile not found in project root');
|
|
64
15
|
}
|
|
16
|
+
console.log('Building docker image with version ' + version);
|
|
17
|
+
await (0, docker_1.buildDockerImage)(options.ecrRegistry, projectDockerfile, version);
|
|
18
|
+
console.log(`Publishing docker image to ${options.ecrRegistry} with version ${version}`);
|
|
19
|
+
return await (0, aws_auth_1.pushImageToEcr)(options.ecrRegistry, version);
|
|
65
20
|
}
|
|
66
21
|
//# sourceMappingURL=docker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../../src/executors/publisher/docker.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../../src/executors/publisher/docker.ts"],"names":[],"mappings":";;AASA,sCAwBC;AAjCD,8BAA6B;AAC7B,+BAA2B;AAI3B,mDAA+E;AAC/E,+CAAqD;AAG9C,KAAK,UAAU,aAAa,CACjC,OAAiC,EACjC,OAAwB,EACxB,OAAe;IAIf,MAAM,IAAA,uBAAY,GAAE,CAAA;IACpB,MAAM,IAAA,qBAAU,GAAE,CAAA;IAElB,MAAM,WAAW,GACf,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAA;IACnE,MAAM,iBAAiB,GAAG,IAAA,WAAI,EAAC,WAAW,EAAE,YAAY,CAAC,CAAA;IAEzD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;IACzD,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,qCAAqC,GAAG,OAAO,CAAC,CAAA;IAC5D,MAAM,IAAA,yBAAgB,EAAC,OAAO,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA;IAEvE,OAAO,CAAC,GAAG,CACT,8BAA8B,OAAO,CAAC,WAAW,iBAAiB,OAAO,EAAE,CAC5E,CAAA;IACD,OAAO,MAAM,IAAA,yBAAc,EAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;AAC3D,CAAC"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const get_version_1 = require("../../utils/get-version");
|
|
4
4
|
const docker_1 = require("./docker");
|
|
5
5
|
const helm_1 = require("./helm");
|
|
6
|
-
const lambda_1 = require("./lambda");
|
|
7
6
|
const runExecutor = async (options, context) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
try {
|
|
8
|
+
const version = (0, get_version_1.getVersion)(context.projectName);
|
|
9
|
+
await (0, docker_1.publishDocker)(options, context, version);
|
|
10
|
+
await (0, helm_1.publishHelm)(options, context, version);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error(error);
|
|
14
|
+
return {
|
|
15
|
+
success: false,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
15
18
|
return {
|
|
16
19
|
success: true,
|
|
17
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/publisher/executor.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/publisher/executor.ts"],"names":[],"mappings":";;AAEA,yDAAoD;AACpD,qCAAwC;AACxC,iCAAoC;AAGpC,MAAM,WAAW,GAGuB,KAAK,EAC3C,OAAiC,EACjC,OAAwB,EACxB,EAAE;IACF,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,wBAAU,EAAC,OAAO,CAAC,WAAW,CAAC,CAAA;QAC/C,MAAM,IAAA,sBAAa,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAC9C,MAAM,IAAA,kBAAW,EAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACpB,OAAO;YACL,OAAO,EAAE,KAAK;SACf,CAAA;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI;KACd,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
import { PublisherExecutorOptions } from './schema';
|
|
3
|
-
export declare function publishHelm(options: PublisherExecutorOptions, context: ExecutorContext, version: string
|
|
3
|
+
export declare function publishHelm(options: PublisherExecutorOptions, context: ExecutorContext, version: string): Promise<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
stdout: any;
|
|
6
|
+
stderr: any;
|
|
7
|
+
}>;
|
|
@@ -3,60 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.publishHelm = publishHelm;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs = require("node:fs");
|
|
6
|
-
const aws_auth_1 = require("../../utils/
|
|
7
|
-
const github_1 = require("../../utils/
|
|
8
|
-
const logger_1 = require("../../utils/common/logger");
|
|
9
|
-
const tsh_1 = require("../../utils/common/tsh");
|
|
6
|
+
const aws_auth_1 = require("../../utils/aws-auth");
|
|
7
|
+
const github_1 = require("../../utils/github");
|
|
10
8
|
const helm_1 = require("../../utils/helm");
|
|
11
|
-
|
|
9
|
+
const tsh_1 = require("../../utils/tsh");
|
|
10
|
+
async function publishHelm(options, context, version) {
|
|
12
11
|
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
13
12
|
try {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const valuesConfigPath = `${projectHelmFolder}/values.yaml`;
|
|
17
|
-
const chartConfigPath = `${projectHelmFolder}/Chart.yaml`;
|
|
18
|
-
const destinationHelmFolder = `${projectDist}/chart/`;
|
|
13
|
+
const projectHelmFolder = `apps/${context.projectName}/.deploy`;
|
|
14
|
+
const destinationHelmFolder = `dist/apps/${context.projectName}/chart/`;
|
|
19
15
|
const gitBranchName = await (0, github_1.getSanitizedCurrentGitBranch)();
|
|
20
16
|
if (!gitBranchName)
|
|
21
17
|
throw new Error('Unable to get current Git branch');
|
|
22
|
-
if (!fs.existsSync(chartConfigPath)) {
|
|
23
|
-
logger_1.consola.warn(`No helm chart found in project ${context.projectName}, searching ${chartConfigPath}, skipping`);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (!options.chartRegistry) {
|
|
27
|
-
logger_1.consola.error('Helm chart detected but no chart registry provided, add "chartRegistry" to your project.json metadata');
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (isDryRun) {
|
|
31
|
-
logger_1.consola.box(`Would have published Helm chart located at ${projectHelmFolder} to ${options.ociEcrRegistry ? options.ociEcrRegistry : options.chartRegistry}/${gitBranchName} with version ${version} but --dry-run is enabled`);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
18
|
await (0, aws_auth_1.checkAwsAuth)();
|
|
35
|
-
|
|
19
|
+
if (!fs.existsSync(projectHelmFolder)) {
|
|
20
|
+
throw new Error(`.deploy folder not found for project ${context.projectName}`);
|
|
21
|
+
}
|
|
22
|
+
console.log(`Publishing Helm chart to ${options.chartRegistry}/${gitBranchName} with version ${version}`);
|
|
36
23
|
// connect to the chartmuseum through teleport
|
|
37
24
|
const proxyData = tslib_1.__addDisposableResource(env_1, await (0, tsh_1.getLocalPortForChartMuseum)(), false);
|
|
38
25
|
await proxyData.isReady();
|
|
39
|
-
logger_1.consola.start('Building Helm chart');
|
|
40
26
|
await (0, helm_1.setupTeleportProxyHelmChartFile)(projectHelmFolder, proxyData.port);
|
|
41
27
|
await (0, helm_1.installHelmRepo)(projectHelmFolder);
|
|
42
|
-
await (0, helm_1.patchImageTag)(valuesConfigPath, chartConfigPath, version);
|
|
43
28
|
await (0, helm_1.packageHelm)(projectHelmFolder, version, destinationHelmFolder);
|
|
44
29
|
await (0, helm_1.resetTeleportProxyHelmChartFile)(projectHelmFolder, proxyData.port);
|
|
45
|
-
|
|
46
|
-
const chartConfig = await (0, helm_1.getHelmChartFile)(projectHelmFolder);
|
|
47
|
-
const packagedHelmChartName = `${chartConfig.name}-${version}.tgz`;
|
|
48
|
-
const packagedHelmChartPath = `${destinationHelmFolder}${packagedHelmChartName}`;
|
|
49
|
-
logger_1.consola.start('Publishing Helm chart');
|
|
50
|
-
// If ociEcrRegistry is provided, push to ECR using OCI format
|
|
51
|
-
if (options.ociEcrRegistry) {
|
|
52
|
-
logger_1.consola.log(`Publishing Helm chart to OCI registry ${options.ociEcrRegistry}`);
|
|
53
|
-
await (0, helm_1.pushOciPackagedHelm)(packagedHelmChartPath, options.ociEcrRegistry);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
// Otherwise, push to the chartmuseum as before
|
|
57
|
-
await (0, helm_1.pushPackagedHelm)(packagedHelmChartPath, packagedHelmChartName, options.chartRegistry, gitBranchName);
|
|
58
|
-
}
|
|
59
|
-
logger_1.consola.success('Helm chart published successfully!');
|
|
30
|
+
return (0, helm_1.pushPackagedHelm)(`${destinationHelmFolder}${context.projectName}-${version}.tgz`, options.chartRegistry, gitBranchName);
|
|
60
31
|
}
|
|
61
32
|
catch (e_1) {
|
|
62
33
|
env_1.error = e_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helm.js","sourceRoot":"","sources":["../../../../src/executors/publisher/helm.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"helm.js","sourceRoot":"","sources":["../../../../src/executors/publisher/helm.ts"],"names":[],"mappings":";;AAgBA,kCAsCC;;AAtDD,8BAA6B;AAI7B,mDAAmD;AACnD,+CAAiE;AACjE,2CAMyB;AACzB,yCAA4D;AAGrD,KAAK,UAAU,WAAW,CAC/B,OAAiC,EACjC,OAAwB,EACxB,OAAe;;;QAMf,MAAM,iBAAiB,GAAG,QAAQ,OAAO,CAAC,WAAW,UAAU,CAAA;QAC/D,MAAM,qBAAqB,GAAG,aAAa,OAAO,CAAC,WAAW,SAAS,CAAA;QACvE,MAAM,aAAa,GAAG,MAAM,IAAA,qCAA4B,GAAE,CAAA;QAE1D,IAAI,CAAC,aAAa;YAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;QAEvE,MAAM,IAAA,uBAAY,GAAE,CAAA;QAEpB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,wCAAwC,OAAO,CAAC,WAAW,EAAE,CAC9D,CAAA;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CACT,4BAA4B,OAAO,CAAC,aAAa,IAAI,aAAa,iBAAiB,OAAO,EAAE,CAC7F,CAAA;QACD,8CAA8C;QAC9C,MAAM,SAAS,0CAAG,MAAM,IAAA,gCAA0B,GAAE,QAAA,CAAA;QACpD,MAAM,SAAS,CAAC,OAAO,EAAE,CAAA;QAEzB,MAAM,IAAA,sCAA+B,EAAC,iBAAiB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QACxE,MAAM,IAAA,sBAAe,EAAC,iBAAiB,CAAC,CAAA;QACxC,MAAM,IAAA,kBAAW,EAAC,iBAAiB,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAA;QACpE,MAAM,IAAA,sCAA+B,EAAC,iBAAiB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;QACxE,OAAO,IAAA,uBAAgB,EACrB,GAAG,qBAAqB,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,MAAM,EAC/D,OAAO,CAAC,aAAa,EACrB,aAAa,CACd,CAAA;;;;;;;;;CACF"}
|
|
@@ -12,50 +12,6 @@
|
|
|
12
12
|
"ecrRegistry": {
|
|
13
13
|
"type": "string",
|
|
14
14
|
"description": "The docker registry"
|
|
15
|
-
},
|
|
16
|
-
"ociEcrRegistry": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "The docker registry in oci format (AWS ECR)"
|
|
19
|
-
},
|
|
20
|
-
"isPublicRegistry": {
|
|
21
|
-
"type": "boolean",
|
|
22
|
-
"description": "Whether to use the public ECR registry",
|
|
23
|
-
"default": false
|
|
24
|
-
},
|
|
25
|
-
"helmChartFolder": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"description": "The folder containing the Helm chart files (Chart.yaml, values.yaml, etc.)",
|
|
28
|
-
"default": ".deploy"
|
|
29
|
-
},
|
|
30
|
-
"extraReleaseTags": {
|
|
31
|
-
"type": "array",
|
|
32
|
-
"items": {
|
|
33
|
-
"type": "string"
|
|
34
|
-
},
|
|
35
|
-
"description": "Additional tags to add to the Docker image during a release",
|
|
36
|
-
"default": []
|
|
37
|
-
},
|
|
38
|
-
"dryRun": {
|
|
39
|
-
"type": "boolean",
|
|
40
|
-
"description": "Whether to run in dry run mode. When true, shows what would be published without actually publishing.",
|
|
41
|
-
"default": false
|
|
42
|
-
},
|
|
43
|
-
"lambdaBucket": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "The S3 bucket for lambda",
|
|
46
|
-
"default": "payfit-shared-lambda-artifacts"
|
|
47
|
-
},
|
|
48
|
-
"lambdaStacks": {
|
|
49
|
-
"type": "array",
|
|
50
|
-
"description": "The list of stacks to publish the lambda to"
|
|
51
|
-
},
|
|
52
|
-
"lambdaFunctions": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"description": "The list of lambda functions inside the workload"
|
|
55
|
-
},
|
|
56
|
-
"lambdaHealthCheckPayload": {
|
|
57
|
-
"type": "string",
|
|
58
|
-
"description": "Health check payload for the lambda functions. Must be in JSON string format"
|
|
59
15
|
}
|
|
60
16
|
},
|
|
61
17
|
"required": []
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
export interface MyPluginOptions {
|
|
3
3
|
}
|
|
4
4
|
export declare const createNodesV2: CreateNodesV2<MyPluginOptions>;
|
|
5
|
-
export declare function createNodesInternal(configFilePath: string, options: MyPluginOptions, context: CreateNodesContextV2): Promise<{
|
|
6
|
-
projects: {
|
|
7
|
-
[x: string]: {
|
|
8
|
-
targets: {};
|
|
9
|
-
release: any;
|
|
10
|
-
name?: string;
|
|
11
|
-
root: string;
|
|
12
|
-
sourceRoot?: string;
|
|
13
|
-
projectType?: import("@nx/devkit").ProjectType;
|
|
14
|
-
generators?: {
|
|
15
|
-
[collectionName: string]: {
|
|
16
|
-
[generatorName: string]: any;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
implicitDependencies?: string[];
|
|
20
|
-
namedInputs?: {
|
|
21
|
-
[inputName: string]: (string | import("nx/src/config/workspace-json-project-json").InputDefinition)[];
|
|
22
|
-
};
|
|
23
|
-
tags?: string[];
|
|
24
|
-
metadata?: import("nx/src/config/workspace-json-project-json").ProjectMetadata;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}>;
|
package/dist/src/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createNodesV2 = void 0;
|
|
4
|
-
exports.createNodesInternal = createNodesInternal;
|
|
5
4
|
const fs_1 = require("fs");
|
|
6
5
|
const path_1 = require("path");
|
|
7
6
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -15,93 +14,38 @@ async function createNodesInternal(configFilePath, options, context) {
|
|
|
15
14
|
const projectConfiguration = (0, devkit_1.readJsonFile)(configFilePath);
|
|
16
15
|
const projectRoot = (0, path_1.dirname)(configFilePath);
|
|
17
16
|
const isDockerProject = (0, fs_1.existsSync)((0, path_1.join)(projectRoot, 'Dockerfile'));
|
|
18
|
-
|
|
19
|
-
const helmChartFolder = projectConfiguration?.metadata?.['helmChartFolder'] || '.deploy';
|
|
20
|
-
const isHelmProject = (0, fs_1.existsSync)((0, path_1.join)(projectRoot, helmChartFolder, 'Chart.yaml'));
|
|
21
|
-
const isLambdaProject = !!(projectConfiguration.metadata &&
|
|
22
|
-
projectConfiguration.metadata['lambdaFunctions']);
|
|
17
|
+
const isHelmProject = (0, fs_1.existsSync)((0, path_1.join)(projectRoot, '.deploy/Chart.yaml'));
|
|
23
18
|
const targets = {};
|
|
24
19
|
const ecrRegistry = isDockerProject
|
|
25
20
|
? projectConfiguration.metadata &&
|
|
26
|
-
projectConfiguration.metadata['
|
|
21
|
+
projectConfiguration.metadata['ecrRepository']
|
|
27
22
|
: undefined;
|
|
28
23
|
const chartRegistry = isHelmProject
|
|
29
24
|
? projectConfiguration.metadata &&
|
|
30
25
|
projectConfiguration.metadata['chartRegistry']
|
|
31
26
|
: undefined;
|
|
32
|
-
const isPublicRegistry = isDockerProject
|
|
33
|
-
? projectConfiguration.metadata &&
|
|
34
|
-
projectConfiguration.metadata['isPublicRegistry'] == true
|
|
35
|
-
: false;
|
|
36
|
-
const extraReleaseTags = isDockerProject
|
|
37
|
-
? projectConfiguration.metadata &&
|
|
38
|
-
projectConfiguration.metadata['extraReleaseTags']
|
|
39
|
-
: undefined;
|
|
40
|
-
const lambdaBucket = isLambdaProject
|
|
41
|
-
? projectConfiguration.metadata &&
|
|
42
|
-
projectConfiguration.metadata['lambdaBucket']
|
|
43
|
-
: undefined;
|
|
44
|
-
const lambdaStacks = isLambdaProject
|
|
45
|
-
? projectConfiguration.metadata &&
|
|
46
|
-
projectConfiguration.metadata['lambdaStacks']
|
|
47
|
-
: undefined;
|
|
48
|
-
const lambdaFunctions = isLambdaProject
|
|
49
|
-
? projectConfiguration.metadata &&
|
|
50
|
-
projectConfiguration.metadata['lambdaFunctions']
|
|
51
|
-
: undefined;
|
|
52
|
-
const lambdaHealthCheckPayload = isLambdaProject
|
|
53
|
-
? projectConfiguration.metadata &&
|
|
54
|
-
projectConfiguration.metadata['lambdaHealthCheckPayload']
|
|
55
|
-
: undefined;
|
|
56
|
-
const isRootProject = projectRoot === '.';
|
|
57
27
|
let release = null;
|
|
58
|
-
if (isHelmProject || isDockerProject
|
|
28
|
+
if (isHelmProject || isDockerProject) {
|
|
59
29
|
const publisherConfig = (0, devkit_1.readJsonFile)((0, path_1.join)(__dirname, '/executors/publisher/schema.json'));
|
|
60
30
|
targets['nx-release-publish'] = {
|
|
61
31
|
// infer the custom publisher target to handle publishing docker & helm artefacts
|
|
62
32
|
executor: '@payfit/nx-core:publisher',
|
|
63
|
-
cache: false,
|
|
64
33
|
options: {
|
|
65
34
|
ecrRegistry,
|
|
66
35
|
chartRegistry,
|
|
67
|
-
isPublicRegistry,
|
|
68
|
-
helmChartFolder,
|
|
69
|
-
extraReleaseTags,
|
|
70
|
-
lambdaBucket,
|
|
71
|
-
lambdaStacks,
|
|
72
|
-
lambdaFunctions,
|
|
73
|
-
lambdaHealthCheckPayload,
|
|
74
36
|
},
|
|
37
|
+
cache: true,
|
|
38
|
+
inputs: ['production', '^production'],
|
|
39
|
+
outputs: [`{workspaceRoot}/dist/apps/${projectConfiguration.name}/chart`],
|
|
75
40
|
metadata: {
|
|
76
|
-
technologies: ['helm', 'docker'
|
|
41
|
+
technologies: ['helm', 'docker'],
|
|
77
42
|
description: publisherConfig.description,
|
|
78
43
|
},
|
|
79
44
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
version: {
|
|
85
|
-
versionActions: '@payfit/nx-core/versionActions',
|
|
86
|
-
},
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (isRootProject) {
|
|
91
|
-
const previewDeployConfig = (0, devkit_1.readJsonFile)((0, path_1.join)(__dirname, '/executors/preview-deploy/schema.json'));
|
|
92
|
-
targets['preview-deploy'] = {
|
|
93
|
-
executor: '@payfit/nx-core:preview-deploy',
|
|
94
|
-
cache: false,
|
|
95
|
-
metadata: {
|
|
96
|
-
description: previewDeployConfig.description,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
const releaseConfig = (0, devkit_1.readJsonFile)((0, path_1.join)(__dirname, '/executors/release/schema.json'));
|
|
100
|
-
targets['release'] = {
|
|
101
|
-
executor: '@payfit/nx-core:release',
|
|
102
|
-
cache: false,
|
|
103
|
-
metadata: {
|
|
104
|
-
description: releaseConfig.description,
|
|
45
|
+
release = {
|
|
46
|
+
// infer the version actions to handle the custom versioning
|
|
47
|
+
version: {
|
|
48
|
+
versionActions: '@payfit/nx-core/versionActions',
|
|
105
49
|
},
|
|
106
50
|
};
|
|
107
51
|
}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,2BAA+B;AAC/B,+BAAoC;AAEpC,uCAKmB;AAKN,QAAA,aAAa,GAAmC;IAC3D,iBAAiB;IACjB,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QACtC,OAAO,MAAM,IAAA,6BAAoB,EAC/B,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAC/B,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,EACnD,WAAW,EACX,OAAO,EACP,OAAO,CACR,CAAA;IACH,CAAC;CACF,CAAA;AAED,KAAK,UAAU,mBAAmB,CAChC,cAAsB,EACtB,OAAwB,EACxB,OAA6B;IAE7B,MAAM,oBAAoB,GAAG,IAAA,qBAAY,EAAC,cAAc,CAAC,CAAA;IACzD,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,cAAc,CAAC,CAAA;IAE3C,MAAM,eAAe,GAAG,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;IACnE,MAAM,aAAa,GAAG,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAA;IAEzE,MAAM,OAAO,GAAG,EAAE,CAAA;IAElB,MAAM,WAAW,GAAG,eAAe;QACjC,CAAC,CAAC,oBAAoB,CAAC,QAAQ;YAC7B,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAChD,CAAC,CAAC,SAAS,CAAA;IACb,MAAM,aAAa,GAAG,aAAa;QACjC,CAAC,CAAC,oBAAoB,CAAC,QAAQ;YAC7B,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC;QAChD,CAAC,CAAC,SAAS,CAAA;IAEb,IAAI,OAAO,GAAG,IAAI,CAAA;IAElB,IAAI,aAAa,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,eAAe,GAAG,IAAA,qBAAY,EAClC,IAAA,WAAI,EAAC,SAAS,EAAE,kCAAkC,CAAC,CACpD,CAAA;QACD,OAAO,CAAC,oBAAoB,CAAC,GAAG;YAC9B,iFAAiF;YACjF,QAAQ,EAAE,2BAA2B;YACrC,OAAO,EAAE;gBACP,WAAW;gBACX,aAAa;aACd;YACD,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;YACrC,OAAO,EAAE,CAAC,6BAA6B,oBAAoB,CAAC,IAAI,QAAQ,CAAC;YACzE,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;gBAChC,WAAW,EAAE,eAAe,CAAC,WAAW;aACzC;SACF,CAAA;QACD,OAAO,GAAG;YACR,4DAA4D;YAC5D,OAAO,EAAE;gBACP,cAAc,EAAE,gCAAgC;aACjD;SACF,CAAA;IACH,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,CAAC,WAAW,CAAC,EAAE;gBACb,GAAG,oBAAoB;gBACvB,OAAO;gBACP,OAAO;aACR;SACF;KACF,CAAA;AACH,CAAC"}
|