codebrewlab / nx-plugins Goto Github PK
View Code? Open in Web Editor NEWNx(nrwl) plugins by CodeBrew Team, helps deploy systems to the cloud(aws-cdk)
Nx(nrwl) plugins by CodeBrew Team, helps deploy systems to the cloud(aws-cdk)
Per https://docs.aws.amazon.com/cdk/v1/guide/home.html, the support for CDK v1 is until June 1, 2022.
Best to generate CDK v2 project per https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html
Hey.
I am trying to use the plugin in AWS CodeBuild as part of the pipeline.
It fails with the following:
/codebuild/output/src304675747/src/node_modules/@codebrew/nx-aws-cdk/src/utils/executor.util.js:56
--
process.stdin.end();
^
ย
TypeError: process.stdin.end is not a function
at ChildProcess.<anonymous> (/codebuild/output/src304675747/src/node_modules/@codebrew/nx-aws-cdk/src/utils/executor.util.js:56:27)
at ChildProcess.emit (events.js:387:35)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
CodeBuild is non-TTY environment and it looks like the fix added here b5ef5c7 might be what is causing the issue as it always tries to execute this:
process.stdin.end();
process.stdin.removeListener('data', processExitListener);
First issue:
In Line 10: /packages/nx-aws-cdk/executors.json
"implementation": "./src/executors/destroy/executor",
needs to be
"implementation": "./src/executors/destroy/destroy",
Second:
Once the first fix is made in my node_modules, the command works without error, though it doesn't remove the stack, and Executing command: cdk destroy
is output to command line.
Side Note:
I'm using aws-cdk 2.9.0, aws-cdk-lib 2.9.0 and constructs 10.0.46, and the stack deployed just fine.
It might also help to document the process for providing the credentials via environment variables.
I personally used npm install -D env-cmd
and made a .env.json
in the base folder with { "AWS_ACCESS_KEY_ID": "", "AWS_SECRET_ACCESS_KEY": "" }
, and added .env.json to .gitignore.
Then called npm exec env-cmd nx r cdk:deploy
.
๐
I'm trying to use the CDK plugin, and it generated and deployed a CDK stack just fine until I added a dependency from /libs
.
For some reason, it is not able to find the dependency ๐
> nx deploy my-api
> nx run my-api:deploy
Executing command: cdk deploy
Cannot find module '@my-org/cdk-utils'
Require stack:
- /my-api/src/main.ts
-
-
import * as cdk from "@aws-cdk/core";
import { getResourcePrefix } from "@my-org/cdk-utils";
import { AppStack } from "./stacks/app-stack";
const app = new cdk.App();
new AppStack(app, `${getResourcePrefix()}guides-api`);
nx test my-api
still works fine - also with /libs
dependencies. It seems @nrwl/jest:jest
is handling these dependencies.
Is there any extra setup that needs to be added to work with /libs
deps?
Hi,
I'm trying to set a parameter value when deploying but I can't get it to work.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.