jenkins-generator 1.0.1 โ 2.0.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/README.md +176 -17
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/config.interface.d.ts +31 -0
- package/dist/services/cicd-generator.service.d.ts +4 -1
- package/dist/services/cicd-generator.service.js +81 -12
- package/dist/services/cicd-generator.service.js.map +1 -1
- package/dist/services/environment.service.d.ts +10 -0
- package/dist/services/environment.service.js +163 -0
- package/dist/services/environment.service.js.map +1 -0
- package/dist/services/jenkinsfile.service.d.ts +3 -1
- package/dist/services/jenkinsfile.service.js +22 -8
- package/dist/services/jenkinsfile.service.js.map +1 -1
- package/dist/services/prompt.service.d.ts +9 -0
- package/dist/services/prompt.service.js +547 -1
- package/dist/services/prompt.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Jenkins Generator ๐
|
|
2
2
|
|
|
3
|
-
> **Automated Jenkins CI/CD pipeline generator for multi-cloud deployments**
|
|
3
|
+
> **Automated Jenkins CI/CD pipeline generator for multi-cloud deployments with external services support**
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/js/jenkins-generator)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
8
|
|
|
9
|
-
Never worry about CI/CD configuration again! This tool automatically generates production-ready Jenkins pipelines for AWS, Azure, GCP, and DigitalOcean with just a few questions.
|
|
9
|
+
Never worry about CI/CD configuration again! This tool automatically generates production-ready Jenkins pipelines for AWS, Azure, GCP, and DigitalOcean with just a few questions. **Now with automatic external services configuration!**
|
|
10
10
|
|
|
11
11
|
## โจ Features
|
|
12
12
|
|
|
@@ -17,6 +17,19 @@ Never worry about CI/CD configuration again! This tool automatically generates p
|
|
|
17
17
|
- **GCP** - Cloud Run serverless containers
|
|
18
18
|
- **DigitalOcean** - App Platform deployments
|
|
19
19
|
|
|
20
|
+
### ๐ External Services Configuration (v2.0.0)
|
|
21
|
+
|
|
22
|
+
- **๐๏ธ Databases** - PostgreSQL, MongoDB, MySQL, Redis, and more
|
|
23
|
+
- **โก Caching** - Redis, Memcached, ElastiCache
|
|
24
|
+
- **๐จ Message Queues** - RabbitMQ, Kafka, SQS, Azure Service Bus
|
|
25
|
+
- **๐ฆ Storage** - AWS S3, Azure Blob, Google Cloud Storage, MinIO
|
|
26
|
+
- **๐ง Email Services** - SMTP, SendGrid, AWS SES, Mailgun
|
|
27
|
+
- **๐ Monitoring** - DataDog, Sentry, New Relic, Prometheus
|
|
28
|
+
- **๐ง Custom Services** - Any service your app needs
|
|
29
|
+
- **Automatic environment variable configuration**
|
|
30
|
+
- **Jenkins credentials management**
|
|
31
|
+
- **.env.template generation** for local development
|
|
32
|
+
|
|
20
33
|
### ๐ Security First
|
|
21
34
|
|
|
22
35
|
- **AES-256 encryption** for credential storage
|
|
@@ -24,6 +37,7 @@ Never worry about CI/CD configuration again! This tool automatically generates p
|
|
|
24
37
|
- **Secure Jenkins credential references**
|
|
25
38
|
- **No hardcoded secrets** in generated files
|
|
26
39
|
- **Credential rotation reminders**
|
|
40
|
+
- **Automatic .gitignore updates** to protect .env files
|
|
27
41
|
|
|
28
42
|
### ๐ง Multi-Channel Notifications
|
|
29
43
|
|
|
@@ -40,6 +54,7 @@ Never worry about CI/CD configuration again! This tool automatically generates p
|
|
|
40
54
|
- **Container orchestration** on cloud platforms
|
|
41
55
|
- **Health check verification**
|
|
42
56
|
- **Automatic cleanup** of old images
|
|
57
|
+
- **Environment variables injection** into containers
|
|
43
58
|
|
|
44
59
|
### ๐งช Testing Integration
|
|
45
60
|
|
|
@@ -66,6 +81,8 @@ Never worry about CI/CD configuration again! This tool automatically generates p
|
|
|
66
81
|
โ Configure cloud deployment scripts
|
|
67
82
|
โ Set up notifications for each platform
|
|
68
83
|
โ Handle credentials securely
|
|
84
|
+
โ Configure database connections manually
|
|
85
|
+
โ Manage environment variables
|
|
69
86
|
โ Document the entire process
|
|
70
87
|
โ Maintain and update pipelines
|
|
71
88
|
```
|
|
@@ -75,7 +92,9 @@ Never worry about CI/CD configuration again! This tool automatically generates p
|
|
|
75
92
|
```
|
|
76
93
|
โ
Run one command: jenkins-generator
|
|
77
94
|
โ
Answer a few questions
|
|
95
|
+
โ
Configure databases, caching, queues automatically
|
|
78
96
|
โ
Get production-ready pipeline
|
|
97
|
+
โ
Automatic .env.template generation
|
|
79
98
|
โ
Complete documentation included
|
|
80
99
|
โ
Security best practices built-in
|
|
81
100
|
โ
Multi-cloud support out of the box
|
|
@@ -125,6 +144,7 @@ The CLI will ask you about:
|
|
|
125
144
|
- Git repository and branch
|
|
126
145
|
- Docker configuration
|
|
127
146
|
- Testing preferences
|
|
147
|
+
- **External services** (databases, caching, storage, etc.) ๐
|
|
128
148
|
- Cloud provider selection
|
|
129
149
|
- Deployment settings
|
|
130
150
|
- Notification channels
|
|
@@ -134,28 +154,41 @@ The CLI will ask you about:
|
|
|
134
154
|
|
|
135
155
|
```
|
|
136
156
|
your-project/
|
|
137
|
-
โโโ Jenkinsfile # ๐ฏ Main pipeline
|
|
157
|
+
โโโ Jenkinsfile # ๐ฏ Main pipeline with env vars
|
|
158
|
+
โโโ .env.template # ๐ Template for local development
|
|
159
|
+
โโโ .gitignore # ๐ Updated to exclude .env
|
|
138
160
|
โโโ .cicd/
|
|
139
161
|
โโโ README.md # ๐ Project documentation
|
|
140
|
-
โโโ CREDENTIALS_SETUP.md # ๐ Credential guide
|
|
162
|
+
โโโ CREDENTIALS_SETUP.md # ๐ Credential guide (with services)
|
|
141
163
|
โโโ config.encrypted.json # ๐ Encrypted backup
|
|
142
164
|
โโโ .gitignore # ๐ซ Protect secrets
|
|
143
165
|
```
|
|
144
166
|
|
|
145
|
-
### 5. Configure
|
|
167
|
+
### 5. Configure Services (New in v2.0.0!)
|
|
168
|
+
|
|
169
|
+
Copy `.env.template` to `.env` and fill in your values:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
cp .env.template .env
|
|
173
|
+
nano .env # or use your favorite editor
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 6. Configure Jenkins
|
|
146
177
|
|
|
147
178
|
Follow the instructions in `.cicd/CREDENTIALS_SETUP.md` to:
|
|
148
179
|
|
|
149
180
|
- Add credentials to Jenkins
|
|
181
|
+
- Configure external service credentials ๐
|
|
150
182
|
- Create pipeline job
|
|
151
183
|
- Connect to your repository
|
|
152
184
|
|
|
153
|
-
###
|
|
185
|
+
### 7. Deploy!
|
|
154
186
|
|
|
155
187
|
Push your code and watch Jenkins automatically:
|
|
156
188
|
|
|
157
189
|
- โ
Checkout code
|
|
158
190
|
- โ
Install dependencies
|
|
191
|
+
- โ
**Load environment variables** ๐
|
|
159
192
|
- โ
Run tests
|
|
160
193
|
- โ
Build application
|
|
161
194
|
- โ
Create Docker image
|
|
@@ -166,7 +199,7 @@ Push your code and watch Jenkins automatically:
|
|
|
166
199
|
|
|
167
200
|
## ๐ Usage Examples
|
|
168
201
|
|
|
169
|
-
### Example 1: Node.js API on AWS
|
|
202
|
+
### Example 1: Node.js API with PostgreSQL on AWS
|
|
170
203
|
|
|
171
204
|
```bash
|
|
172
205
|
$ jenkins-generator
|
|
@@ -177,31 +210,105 @@ $ jenkins-generator
|
|
|
177
210
|
? Select project type: backend
|
|
178
211
|
? Select programming language: typescript
|
|
179
212
|
? Enter Git repository URL: https://github.com/user/my-api.git
|
|
180
|
-
?
|
|
181
|
-
|
|
182
|
-
|
|
213
|
+
? Does your application use external services? Yes
|
|
214
|
+
|
|
215
|
+
๐ฆ Let's configure your external services...
|
|
216
|
+
|
|
217
|
+
? Select service type: Database
|
|
218
|
+
? Select database type: postgresql
|
|
219
|
+
? Database host environment variable name: DB_HOST
|
|
220
|
+
? Database password environment variable name: DB_PASSWORD
|
|
221
|
+
|
|
222
|
+
? Add another service? No
|
|
223
|
+
|
|
183
224
|
? Select cloud provider: aws
|
|
184
225
|
? Select AWS region: us-east-1
|
|
185
|
-
? Select instance type: t2.small
|
|
186
226
|
? Enable auto-scaling? Yes
|
|
187
227
|
|
|
188
228
|
โ
Jenkins pipeline generated successfully!
|
|
189
229
|
```
|
|
190
230
|
|
|
191
|
-
|
|
231
|
+
**Generated .env.template:**
|
|
232
|
+
|
|
233
|
+
```env
|
|
234
|
+
# postgres-main (postgresql)
|
|
235
|
+
DB_HOST=localhost
|
|
236
|
+
DB_PORT=5432
|
|
237
|
+
DB_NAME=myapp
|
|
238
|
+
DB_USERNAME=your_db_username_here
|
|
239
|
+
DB_PASSWORD=your_db_password_here
|
|
240
|
+
DATABASE_URL=your_database_url_here
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Example 2: React App with S3 Storage on GCP
|
|
192
244
|
|
|
193
245
|
```bash
|
|
194
246
|
$ jenkins-generator
|
|
195
247
|
|
|
196
248
|
? Enter your project name: my-react-app
|
|
197
249
|
? Select project type: frontend
|
|
198
|
-
?
|
|
199
|
-
|
|
200
|
-
? Select
|
|
250
|
+
? Does your application use external services? Yes
|
|
251
|
+
|
|
252
|
+
? Select service type: Storage
|
|
253
|
+
? Select storage service: s3
|
|
254
|
+
? Bucket name environment variable: S3_BUCKET
|
|
255
|
+
? Access key environment variable: S3_ACCESS_KEY
|
|
201
256
|
|
|
202
257
|
โ
Jenkins pipeline generated successfully!
|
|
203
258
|
```
|
|
204
259
|
|
|
260
|
+
## ๐๏ธ Supported External Services (v2.0.0)
|
|
261
|
+
|
|
262
|
+
### Databases
|
|
263
|
+
|
|
264
|
+
- PostgreSQL
|
|
265
|
+
- MongoDB
|
|
266
|
+
- MySQL / MariaDB
|
|
267
|
+
- Redis
|
|
268
|
+
- DynamoDB
|
|
269
|
+
- CosmosDB
|
|
270
|
+
|
|
271
|
+
### Caching
|
|
272
|
+
|
|
273
|
+
- Redis
|
|
274
|
+
- Memcached
|
|
275
|
+
- ElastiCache
|
|
276
|
+
|
|
277
|
+
### Message Queues
|
|
278
|
+
|
|
279
|
+
- RabbitMQ
|
|
280
|
+
- Apache Kafka
|
|
281
|
+
- AWS SQS
|
|
282
|
+
- Azure Service Bus
|
|
283
|
+
|
|
284
|
+
### Storage
|
|
285
|
+
|
|
286
|
+
- AWS S3
|
|
287
|
+
- Azure Blob Storage
|
|
288
|
+
- Google Cloud Storage
|
|
289
|
+
- MinIO
|
|
290
|
+
- DigitalOcean Spaces
|
|
291
|
+
|
|
292
|
+
### Email Services
|
|
293
|
+
|
|
294
|
+
- SMTP
|
|
295
|
+
- SendGrid
|
|
296
|
+
- AWS SES
|
|
297
|
+
- Mailgun
|
|
298
|
+
- Postmark
|
|
299
|
+
|
|
300
|
+
### Monitoring
|
|
301
|
+
|
|
302
|
+
- DataDog
|
|
303
|
+
- New Relic
|
|
304
|
+
- Sentry
|
|
305
|
+
- Prometheus
|
|
306
|
+
- Grafana
|
|
307
|
+
|
|
308
|
+
### Custom Services
|
|
309
|
+
|
|
310
|
+
- Any service with custom environment variables
|
|
311
|
+
|
|
205
312
|
## ๐๏ธ What Gets Generated
|
|
206
313
|
|
|
207
314
|
### Jenkinsfile
|
|
@@ -210,6 +317,7 @@ Complete Jenkins pipeline with:
|
|
|
210
317
|
|
|
211
318
|
- Git checkout
|
|
212
319
|
- Dependency installation
|
|
320
|
+
- **External services environment variables** ๐
|
|
213
321
|
- Test execution (optional)
|
|
214
322
|
- Application build
|
|
215
323
|
- Docker image creation
|
|
@@ -218,11 +326,35 @@ Complete Jenkins pipeline with:
|
|
|
218
326
|
- Health checks
|
|
219
327
|
- Notifications
|
|
220
328
|
|
|
329
|
+
**Example Jenkinsfile Environment Block:**
|
|
330
|
+
|
|
331
|
+
```groovy
|
|
332
|
+
environment {
|
|
333
|
+
// Cloud credentials
|
|
334
|
+
AWS_ACCESS_KEY_ID = credentials('aws-access-key-id')
|
|
335
|
+
|
|
336
|
+
// Database credentials (auto-generated)
|
|
337
|
+
DB_HOST = '${env.DB_HOST ?: ""}'
|
|
338
|
+
DB_USERNAME = credentials('db-username')
|
|
339
|
+
DB_PASSWORD = credentials('db-password')
|
|
340
|
+
|
|
341
|
+
// Redis credentials
|
|
342
|
+
REDIS_HOST = '${env.REDIS_HOST ?: ""}'
|
|
343
|
+
REDIS_PASSWORD = credentials('redis-password')
|
|
344
|
+
|
|
345
|
+
// S3 credentials
|
|
346
|
+
S3_BUCKET = '${env.S3_BUCKET ?: ""}'
|
|
347
|
+
S3_ACCESS_KEY = credentials('s3-access-key')
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
221
351
|
### Documentation
|
|
222
352
|
|
|
223
353
|
- **README.md** - Project-specific pipeline documentation
|
|
224
|
-
- **CREDENTIALS_SETUP.md** - Step-by-step Jenkins credential setup
|
|
354
|
+
- **CREDENTIALS_SETUP.md** - Step-by-step Jenkins credential setup (includes external services) ๐
|
|
225
355
|
- **config.encrypted.json** - Encrypted configuration backup
|
|
356
|
+
- **.env.template** - Template for local development ๐
|
|
357
|
+
- **EXTERNAL_SERVICES_GUIDE.md** - Complete guide for services configuration ๐
|
|
226
358
|
|
|
227
359
|
## ๐ง Supported Cloud Providers
|
|
228
360
|
|
|
@@ -241,10 +373,13 @@ Complete Jenkins pipeline with:
|
|
|
241
373
|
- **No plain-text secrets** in generated files
|
|
242
374
|
- **Security best practices** documentation
|
|
243
375
|
- **Credential rotation** reminders
|
|
376
|
+
- **Automatic .gitignore** protection for .env files ๐
|
|
377
|
+
- **Secret vs non-secret detection** for environment variables ๐
|
|
244
378
|
|
|
245
379
|
## ๐ Documentation
|
|
246
380
|
|
|
247
381
|
- [Setup Guide](./SETUP_GUIDE.md) - Complete installation and setup
|
|
382
|
+
- [External Services Guide](./EXTERNAL_SERVICES_GUIDE.md) - Configuration for databases, caching, etc. ๐
|
|
248
383
|
- [Deployment Checklist](./DEPLOYMENT_CHECKLIST.md) - Pre/post deployment steps
|
|
249
384
|
- [Troubleshooting](#troubleshooting) - Common issues and solutions
|
|
250
385
|
|
|
@@ -304,6 +439,13 @@ npm config get prefix
|
|
|
304
439
|
- Check path is relative to project root
|
|
305
440
|
- Verify file name is exactly `Dockerfile` (case-sensitive)
|
|
306
441
|
|
|
442
|
+
### Issue: "Cannot connect to database"
|
|
443
|
+
|
|
444
|
+
- Verify database credentials in Jenkins
|
|
445
|
+
- Check network connectivity from Jenkins to database
|
|
446
|
+
- Ensure firewall rules allow connection
|
|
447
|
+
- Verify environment variables are loaded correctly
|
|
448
|
+
|
|
307
449
|
### Issue: "Deployment failed"
|
|
308
450
|
|
|
309
451
|
- Verify cloud provider credentials in Jenkins
|
|
@@ -315,6 +457,22 @@ npm config get prefix
|
|
|
315
457
|
|
|
316
458
|
For more troubleshooting, check the generated `.cicd/README.md` in your project.
|
|
317
459
|
|
|
460
|
+
## ๐ What's New in v2.0.0
|
|
461
|
+
|
|
462
|
+
### Major Features
|
|
463
|
+
|
|
464
|
+
- โ
**External Services Configuration** - Automatically configure databases, caching, queues, storage, and more
|
|
465
|
+
- โ
**Environment Variables Management** - Automatic generation and injection
|
|
466
|
+
- โ
**.env.template Generation** - For local development
|
|
467
|
+
- โ
**20+ Services Supported** - PostgreSQL, MongoDB, Redis, S3, SMTP, Kafka, and more
|
|
468
|
+
- โ
**Automatic Jenkins Credentials** - Generates complete credential setup guide
|
|
469
|
+
- โ
**Security Enhancements** - Automatic secret detection and .gitignore updates
|
|
470
|
+
- โ
**Complete Documentation** - New EXTERNAL_SERVICES_GUIDE.md
|
|
471
|
+
|
|
472
|
+
### Breaking Changes
|
|
473
|
+
|
|
474
|
+
None! v2.0.0 is fully backward compatible with v1.0.0. If you don't configure external services, it works exactly like v1.0.0.
|
|
475
|
+
|
|
318
476
|
## ๐ค Contributing
|
|
319
477
|
|
|
320
478
|
Contributions are welcome! Please:
|
|
@@ -350,6 +508,7 @@ If this tool helped you, please:
|
|
|
350
508
|
- ๐ฆ Tweet about it
|
|
351
509
|
- ๐ Write a blog post
|
|
352
510
|
- ๐ฌ Tell your friends
|
|
511
|
+
- You can also [buy me a coffee](For this please mail me at sulabhadhikari90@gmail.com)
|
|
353
512
|
|
|
354
513
|
---
|
|
355
514
|
|
|
@@ -361,5 +520,5 @@ _Stop configuring CI/CD manually. Start deploying automatically!_
|
|
|
361
520
|
npm install -g jenkins-generator
|
|
362
521
|
cd your-project
|
|
363
522
|
jenkins-generator
|
|
364
|
-
#
|
|
523
|
+
# Configure your services, deploy! ๐
|
|
365
524
|
```
|
package/dist/app.module.js
CHANGED
|
@@ -15,6 +15,7 @@ const cloud_provider_service_1 = require("./services/cloud-provider.service");
|
|
|
15
15
|
const security_service_1 = require("./services/security.service");
|
|
16
16
|
const validation_service_1 = require("./services/validation.service");
|
|
17
17
|
const notification_service_1 = require("./services/notification.service");
|
|
18
|
+
const environment_service_1 = require("./services/environment.service");
|
|
18
19
|
let AppModule = class AppModule {
|
|
19
20
|
};
|
|
20
21
|
exports.AppModule = AppModule;
|
|
@@ -29,6 +30,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
29
30
|
security_service_1.SecurityService,
|
|
30
31
|
validation_service_1.ValidationService,
|
|
31
32
|
notification_service_1.NotificationService,
|
|
33
|
+
environment_service_1.EnvironmentService,
|
|
32
34
|
],
|
|
33
35
|
})
|
|
34
36
|
], AppModule);
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,8EAAyE;AACzE,8DAA0D;AAC1D,wEAAoE;AACpE,8EAAyE;AACzE,kEAA8D;AAC9D,sEAAkE;AAClE,0EAAsE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,8EAAyE;AACzE,8DAA0D;AAC1D,wEAAoE;AACpE,8EAAyE;AACzE,kEAA8D;AAC9D,sEAAkE;AAClE,0EAAsE;AACtE,wEAAoE;AAe7D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAbrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,SAAS,EAAE;YACT,6CAAoB;YACpB,8BAAa;YACb,wCAAkB;YAClB,6CAAoB;YACpB,kCAAe;YACf,sCAAiB;YACjB,0CAAmB;YACnB,wCAAkB;SACnB;KACF,CAAC;GACW,SAAS,CAAG"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,4 +23,5 @@ __exportStar(require("./services/prompt.service"), exports);
|
|
|
23
23
|
__exportStar(require("./services/security.service"), exports);
|
|
24
24
|
__exportStar(require("./services/validation.service"), exports);
|
|
25
25
|
__exportStar(require("./interfaces/config.interface"), exports);
|
|
26
|
+
__exportStar(require("./services/environment.service"), exports);
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oEAAkD;AAClD,oEAAkD;AAClD,iEAA+C;AAC/C,kEAAgD;AAChD,4DAA0C;AAC1C,8DAA4C;AAC5C,gEAA8C;AAC9C,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oEAAkD;AAClD,oEAAkD;AAClD,iEAA+C;AAC/C,kEAAgD;AAChD,4DAA0C;AAC1C,8DAA4C;AAC5C,gEAA8C;AAC9C,gEAA8C;AAC9C,iEAA+C"}
|
|
@@ -9,6 +9,17 @@ export interface ProjectConfig {
|
|
|
9
9
|
runTests: boolean;
|
|
10
10
|
testCommand?: string;
|
|
11
11
|
buildCommand?: string;
|
|
12
|
+
requiresEnvFile: boolean;
|
|
13
|
+
envFilePath?: string;
|
|
14
|
+
externalServices: ExternalService[];
|
|
15
|
+
}
|
|
16
|
+
export interface ExternalService {
|
|
17
|
+
type: 'database' | 'cache' | 'queue' | 'storage' | 'email' | 'monitoring' | 'custom';
|
|
18
|
+
name: string;
|
|
19
|
+
service: string;
|
|
20
|
+
envVariables: EnvVariable[];
|
|
21
|
+
connectionString?: string;
|
|
22
|
+
requiresInfrastructure: boolean;
|
|
12
23
|
}
|
|
13
24
|
export interface CloudConfig {
|
|
14
25
|
provider: 'aws' | 'azure' | 'gcp' | 'digitalocean';
|
|
@@ -16,6 +27,20 @@ export interface CloudConfig {
|
|
|
16
27
|
region: string;
|
|
17
28
|
instanceType: string;
|
|
18
29
|
deploymentConfig: DeploymentConfig;
|
|
30
|
+
managedServices: ManagedService[];
|
|
31
|
+
}
|
|
32
|
+
export interface ManagedService {
|
|
33
|
+
type: 'database' | 'cache' | 'queue' | 'storage';
|
|
34
|
+
service: string;
|
|
35
|
+
tier: string;
|
|
36
|
+
autoProvision: boolean;
|
|
37
|
+
existingResourceId?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface EnvVariable {
|
|
40
|
+
key: string;
|
|
41
|
+
value?: string;
|
|
42
|
+
isSecret: boolean;
|
|
43
|
+
description: string;
|
|
19
44
|
}
|
|
20
45
|
export interface AWSCredentials {
|
|
21
46
|
accessKeyId: string;
|
|
@@ -44,6 +69,9 @@ export interface DeploymentConfig {
|
|
|
44
69
|
maxInstances?: number;
|
|
45
70
|
healthCheckPath: string;
|
|
46
71
|
port: number;
|
|
72
|
+
environmentVariables: {
|
|
73
|
+
[key: string]: string;
|
|
74
|
+
};
|
|
47
75
|
}
|
|
48
76
|
export interface NotificationConfig {
|
|
49
77
|
email: string;
|
|
@@ -67,4 +95,7 @@ export interface JenkinsConfig {
|
|
|
67
95
|
agentLabel: string;
|
|
68
96
|
timeout: number;
|
|
69
97
|
retryCount: number;
|
|
98
|
+
environmentVariables: {
|
|
99
|
+
[key: string]: string;
|
|
100
|
+
};
|
|
70
101
|
}
|
|
@@ -2,13 +2,16 @@ import { PromptService } from './prompt.service';
|
|
|
2
2
|
import { JenkinsFileService } from './jenkinsfile.service';
|
|
3
3
|
import { SecurityService } from './security.service';
|
|
4
4
|
import { ValidationService } from './validation.service';
|
|
5
|
+
import { EnvironmentService } from './environment.service';
|
|
5
6
|
export declare class CICDGeneratorService {
|
|
6
7
|
private readonly promptService;
|
|
7
8
|
private readonly jenkinsFileService;
|
|
8
9
|
private readonly securityService;
|
|
9
10
|
private readonly validationService;
|
|
10
|
-
|
|
11
|
+
private readonly environmentService;
|
|
12
|
+
constructor(promptService: PromptService, jenkinsFileService: JenkinsFileService, securityService: SecurityService, validationService: ValidationService, environmentService: EnvironmentService);
|
|
11
13
|
run(): Promise<void>;
|
|
12
14
|
private writeFiles;
|
|
15
|
+
private updateRootGitignore;
|
|
13
16
|
private displaySummary;
|
|
14
17
|
}
|
|
@@ -51,6 +51,7 @@ const prompt_service_1 = require("./prompt.service");
|
|
|
51
51
|
const jenkinsfile_service_1 = require("./jenkinsfile.service");
|
|
52
52
|
const security_service_1 = require("./security.service");
|
|
53
53
|
const validation_service_1 = require("./validation.service");
|
|
54
|
+
const environment_service_1 = require("./environment.service");
|
|
54
55
|
const fs = __importStar(require("fs-extra"));
|
|
55
56
|
const path = __importStar(require("path"));
|
|
56
57
|
const chalk_1 = __importDefault(require("chalk"));
|
|
@@ -60,11 +61,13 @@ let CICDGeneratorService = class CICDGeneratorService {
|
|
|
60
61
|
jenkinsFileService;
|
|
61
62
|
securityService;
|
|
62
63
|
validationService;
|
|
63
|
-
|
|
64
|
+
environmentService;
|
|
65
|
+
constructor(promptService, jenkinsFileService, securityService, validationService, environmentService) {
|
|
64
66
|
this.promptService = promptService;
|
|
65
67
|
this.jenkinsFileService = jenkinsFileService;
|
|
66
68
|
this.securityService = securityService;
|
|
67
69
|
this.validationService = validationService;
|
|
70
|
+
this.environmentService = environmentService;
|
|
68
71
|
}
|
|
69
72
|
async run() {
|
|
70
73
|
try {
|
|
@@ -73,7 +76,7 @@ let CICDGeneratorService = class CICDGeneratorService {
|
|
|
73
76
|
try {
|
|
74
77
|
const packageJson = await this.validationService.readPackageJson();
|
|
75
78
|
spinner.succeed('Project structure validated');
|
|
76
|
-
console.log(chalk_1.default.gray(`Found
|
|
79
|
+
console.log(chalk_1.default.gray(`Found project: ${packageJson.name}\n`));
|
|
77
80
|
}
|
|
78
81
|
catch (error) {
|
|
79
82
|
spinner.fail('Project validation failed');
|
|
@@ -86,16 +89,22 @@ let CICDGeneratorService = class CICDGeneratorService {
|
|
|
86
89
|
generatingSpinner.succeed('Jenkinsfile generated');
|
|
87
90
|
const credentialsGuide = this.jenkinsFileService.generateCredentialsSetupGuide(config);
|
|
88
91
|
const readme = this.jenkinsFileService.generateReadme(config);
|
|
92
|
+
let envTemplate = '';
|
|
93
|
+
if (config.project.externalServices &&
|
|
94
|
+
config.project.externalServices.length > 0) {
|
|
95
|
+
envTemplate = this.environmentService.generateEnvFileTemplate(config.project.externalServices);
|
|
96
|
+
}
|
|
89
97
|
const writingSpinner = (0, ora_1.default)('Writing files...').start();
|
|
90
|
-
await this.writeFiles(jenkinsfile, credentialsGuide, readme, config);
|
|
98
|
+
await this.writeFiles(jenkinsfile, credentialsGuide, readme, envTemplate, config);
|
|
91
99
|
writingSpinner.succeed('Files written successfully');
|
|
92
100
|
this.displaySummary(config);
|
|
93
101
|
}
|
|
94
102
|
catch (error) {
|
|
95
|
-
console.error(chalk_1.default.red('\nโ Error:'), error);
|
|
103
|
+
console.error(chalk_1.default.red('\nโ Error:'), error.message);
|
|
104
|
+
throw error;
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
|
-
async writeFiles(jenkinsfile, credentialsGuide, readme, config) {
|
|
107
|
+
async writeFiles(jenkinsfile, credentialsGuide, readme, envTemplate, config) {
|
|
99
108
|
const rootDir = process.cwd();
|
|
100
109
|
const cicdDir = path.join(rootDir, '.cicd');
|
|
101
110
|
await fs.ensureDir(cicdDir);
|
|
@@ -105,17 +114,58 @@ let CICDGeneratorService = class CICDGeneratorService {
|
|
|
105
114
|
await fs.writeFile(credentialsPath, credentialsGuide);
|
|
106
115
|
const readmePath = path.join(cicdDir, 'README.md');
|
|
107
116
|
await fs.writeFile(readmePath, readme);
|
|
117
|
+
if (envTemplate) {
|
|
118
|
+
const envTemplatePath = path.join(rootDir, '.env.template');
|
|
119
|
+
await fs.writeFile(envTemplatePath, envTemplate);
|
|
120
|
+
console.log(chalk_1.default.green('\n๐ Generated .env.template for local development'));
|
|
121
|
+
}
|
|
108
122
|
const configPath = path.join(cicdDir, 'config.encrypted.json');
|
|
109
123
|
const encryptedConfig = this.securityService.encryptCredentials(config);
|
|
110
124
|
await fs.writeFile(configPath, JSON.stringify({ encrypted: encryptedConfig }, null, 2));
|
|
111
125
|
const gitignorePath = path.join(cicdDir, '.gitignore');
|
|
112
126
|
await fs.writeFile(gitignorePath, 'config.encrypted.json\n*.log\n');
|
|
127
|
+
await this.updateRootGitignore(rootDir);
|
|
113
128
|
console.log(chalk_1.default.green('\n๐ Generated files:'));
|
|
114
129
|
console.log(chalk_1.default.gray(` โโ Jenkinsfile (${jenkinsfilePath})`));
|
|
130
|
+
if (envTemplate) {
|
|
131
|
+
console.log(chalk_1.default.gray(` โโ .env.template (for local development)`));
|
|
132
|
+
}
|
|
115
133
|
console.log(chalk_1.default.gray(` โโ .cicd/CREDENTIALS_SETUP.md`));
|
|
116
134
|
console.log(chalk_1.default.gray(` โโ .cicd/README.md`));
|
|
117
135
|
console.log(chalk_1.default.gray(` โโ .cicd/config.encrypted.json`));
|
|
118
136
|
}
|
|
137
|
+
async updateRootGitignore(rootDir) {
|
|
138
|
+
const gitignorePath = path.join(rootDir, '.gitignore');
|
|
139
|
+
try {
|
|
140
|
+
let gitignoreContent = '';
|
|
141
|
+
if (await fs.pathExists(gitignorePath)) {
|
|
142
|
+
gitignoreContent = await fs.readFile(gitignorePath, 'utf-8');
|
|
143
|
+
}
|
|
144
|
+
const entriesToAdd = [
|
|
145
|
+
'# Environment variables',
|
|
146
|
+
'.env',
|
|
147
|
+
'.env.local',
|
|
148
|
+
'.env.*.local',
|
|
149
|
+
];
|
|
150
|
+
let needsUpdate = false;
|
|
151
|
+
const newEntries = [];
|
|
152
|
+
for (const entry of entriesToAdd) {
|
|
153
|
+
if (!gitignoreContent.includes(entry)) {
|
|
154
|
+
newEntries.push(entry);
|
|
155
|
+
needsUpdate = true;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (needsUpdate) {
|
|
159
|
+
const separator = gitignoreContent ? '\n\n' : '';
|
|
160
|
+
gitignoreContent += separator + newEntries.join('\n') + '\n';
|
|
161
|
+
await fs.writeFile(gitignorePath, gitignoreContent);
|
|
162
|
+
console.log(chalk_1.default.gray(' โโ Updated .gitignore to exclude .env files'));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
console.log(chalk_1.default.yellow(' โ ๏ธ Could not update .gitignore (non-critical)'));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
119
169
|
displaySummary(config) {
|
|
120
170
|
console.log(chalk_1.default.green.bold('\nโ
CICD Pipeline Generated Successfully!\n'));
|
|
121
171
|
console.log(chalk_1.default.cyan('๐ Configuration Summary:'));
|
|
@@ -130,19 +180,37 @@ let CICDGeneratorService = class CICDGeneratorService {
|
|
|
130
180
|
console.log(chalk_1.default.white(` Instance: ${config.cloud.instanceType}`));
|
|
131
181
|
console.log(chalk_1.default.white(` Tests: ${config.project.runTests ? 'Enabled' : 'Disabled'}`));
|
|
132
182
|
console.log(chalk_1.default.white(` Auto-scaling: ${config.cloud.deploymentConfig.autoScaling ? 'Enabled' : 'Disabled'}`));
|
|
183
|
+
if (config.project.externalServices &&
|
|
184
|
+
config.project.externalServices.length > 0) {
|
|
185
|
+
console.log(chalk_1.default.white(` External Services: ${config.project.externalServices.length} configured`));
|
|
186
|
+
for (const service of config.project.externalServices) {
|
|
187
|
+
console.log(chalk_1.default.gray(` - ${service.name} (${service.service})`));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
133
190
|
console.log(chalk_1.default.gray('โ'.repeat(60)));
|
|
134
191
|
console.log(chalk_1.default.yellow('\n๐ Next Steps:\n'));
|
|
135
192
|
console.log(chalk_1.default.white(' 1. Review the generated Jenkinsfile in your project root'));
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
193
|
+
if (config.project.externalServices &&
|
|
194
|
+
config.project.externalServices.length > 0) {
|
|
195
|
+
console.log(chalk_1.default.white(' 2. Copy .env.template to .env and fill in your values'));
|
|
196
|
+
console.log(chalk_1.default.white(' 3. Read .cicd/CREDENTIALS_SETUP.md for Jenkins credential setup'));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
console.log(chalk_1.default.white(' 2. Read .cicd/CREDENTIALS_SETUP.md for Jenkins credential setup'));
|
|
200
|
+
}
|
|
201
|
+
console.log(chalk_1.default.white(' 4. Configure Jenkins credentials as specified'));
|
|
202
|
+
console.log(chalk_1.default.white(' 5. Create a new Jenkins Pipeline job'));
|
|
203
|
+
console.log(chalk_1.default.white(' 6. Point Jenkins to your repository'));
|
|
204
|
+
console.log(chalk_1.default.white(' 7. Run the pipeline and monitor deployment'));
|
|
141
205
|
console.log(chalk_1.default.yellow('\nโ ๏ธ Important Security Notes:\n'));
|
|
142
|
-
console.log(chalk_1.default.red(' โข NEVER commit .cicd/config.encrypted.json to version control'));
|
|
206
|
+
console.log(chalk_1.default.red(' โข NEVER commit .env or .cicd/config.encrypted.json to version control'));
|
|
143
207
|
console.log(chalk_1.default.red(' โข Always use Jenkins credential storage for sensitive data'));
|
|
144
208
|
console.log(chalk_1.default.red(' โข Review and rotate credentials regularly'));
|
|
145
209
|
console.log(chalk_1.default.red(' โข Keep your Jenkinsfile in version control'));
|
|
210
|
+
if (config.project.externalServices &&
|
|
211
|
+
config.project.externalServices.length > 0) {
|
|
212
|
+
console.log(chalk_1.default.red(' โข .env.template is safe to commit, but NEVER commit .env'));
|
|
213
|
+
}
|
|
146
214
|
console.log(chalk_1.default.cyan('\n๐ Your CI/CD pipeline is ready for deployment!\n'));
|
|
147
215
|
console.log(chalk_1.default.gray(`For detailed documentation, check .cicd/README.md\n`));
|
|
148
216
|
}
|
|
@@ -153,6 +221,7 @@ exports.CICDGeneratorService = CICDGeneratorService = __decorate([
|
|
|
153
221
|
__metadata("design:paramtypes", [prompt_service_1.PromptService,
|
|
154
222
|
jenkinsfile_service_1.JenkinsFileService,
|
|
155
223
|
security_service_1.SecurityService,
|
|
156
|
-
validation_service_1.ValidationService
|
|
224
|
+
validation_service_1.ValidationService,
|
|
225
|
+
environment_service_1.EnvironmentService])
|
|
157
226
|
], CICDGeneratorService);
|
|
158
227
|
//# sourceMappingURL=cicd-generator.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cicd-generator.service.js","sourceRoot":"","sources":["../../src/services/cicd-generator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qDAAiD;AACjD,+DAA2D;AAC3D,yDAAqD;AACrD,6DAAyD;AACzD,6CAA+B;AAC/B,2CAA6B;AAC7B,kDAA0B;AAC1B,8CAAsB;AAGf,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAEZ;IACA;IACA;IACA;
|
|
1
|
+
{"version":3,"file":"cicd-generator.service.js","sourceRoot":"","sources":["../../src/services/cicd-generator.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qDAAiD;AACjD,+DAA2D;AAC3D,yDAAqD;AACrD,6DAAyD;AACzD,+DAA2D;AAC3D,6CAA+B;AAC/B,2CA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