@turboops/cli 1.0.0-dev.611 → 1.0.0-dev.612

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.
Files changed (2) hide show
  1. package/dist/index.js +82 -27
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2226,23 +2226,61 @@ Modifiziere die Datei "${pipelineFile}" entsprechend.` : `Erstelle eine neue ${p
2226
2226
  Projekt-Slug: ${projectSlug}
2227
2227
  Pipeline-Datei: ${pipelineFile}
2228
2228
 
2229
- Erstelle eine Standard-Pipeline mit:
2230
- 1. Build-Stage: Docker Image bauen und pushen
2231
- 2. Deploy-Stages f\xFCr jede Umgebung (dev, test, prod)
2232
-
2233
- Jede Stage deployed nur auf ihrem Branch (dev->dev, test->test, main->prod).
2234
-
2235
- Verwende:
2236
- - Image: docker:24-dind f\xFCr Build
2237
- - Image: node:20-alpine f\xFCr Deploy
2238
- - Registry: registry.turbo-ops.de/${projectSlug}
2239
- - TurboOps CLI: npm install -g @turboops/cli
2240
-
2241
- Befehle:
2242
- - turbo config set token \${TURBOOPS_TOKEN}
2243
- - turbo deploy <stage-slug> --image <image-tag> --wait
2244
-
2245
- Secrets ben\xF6tigt: TURBOOPS_TOKEN
2229
+ WICHTIG - Branch-zu-Stage-Zuordnung (STRIKT EINHALTEN!):
2230
+ - dev Stage \u2192 deployed NUR wenn Branch == "dev"
2231
+ - test Stage \u2192 deployed NUR wenn Branch == "test"
2232
+ - prod Stage \u2192 deployed NUR wenn Branch == "main"
2233
+
2234
+ PIPELINE-STRUKTUR:
2235
+
2236
+ 1. BUILD-JOB (l\xE4uft auf ALLEN Branches: dev, test, main):
2237
+ stages: [build, deploy-dev, deploy-test, deploy-prod]
2238
+
2239
+ build:
2240
+ image: docker:24-dind
2241
+ services: [docker:24-dind]
2242
+ before_script:
2243
+ - docker login -u ${projectSlug} -p \${TURBOOPS_TOKEN} registry.turbo-ops.de
2244
+ script:
2245
+ - docker compose build
2246
+ - docker compose push
2247
+ rules:
2248
+ - if: $CI_COMMIT_BRANCH # L\xE4uft auf ALLEN Branches!
2249
+
2250
+ 2. DEPLOY-JOBS (jeder NUR auf seinem Branch!):
2251
+
2252
+ deploy-dev:
2253
+ image: node:20-alpine
2254
+ before_script:
2255
+ - npm install -g @turboops/cli
2256
+ - turbo config set token \${TURBOOPS_TOKEN}
2257
+ script:
2258
+ - turbo deploy dev --image registry.turbo-ops.de/${projectSlug}:\${CI_COMMIT_SHA} --wait
2259
+ rules:
2260
+ - if: $CI_COMMIT_BRANCH == "dev" # NUR auf dev Branch!
2261
+ needs: [build]
2262
+
2263
+ deploy-test:
2264
+ script:
2265
+ - turbo deploy test --wait # Kein --image, Auto-Promotion von dev
2266
+ rules:
2267
+ - if: $CI_COMMIT_BRANCH == "test" # NUR auf test Branch!
2268
+ needs: [deploy-dev]
2269
+
2270
+ deploy-prod:
2271
+ script:
2272
+ - turbo deploy prod --wait # Kein --image, Auto-Promotion von test
2273
+ rules:
2274
+ - if: $CI_COMMIT_BRANCH == "main" # NUR auf main Branch!
2275
+ when: manual
2276
+ needs: [deploy-test]
2277
+
2278
+ WICHTIG:
2279
+ - Der Build l\xE4uft auf ALLEN Branches (dev, test, main)
2280
+ - Jeder Deploy-Job l\xE4uft NUR auf seinem zugeordneten Branch
2281
+ - --image nur bei deploy-dev (erste Stage), danach Auto-Promotion
2282
+ - Registry-URL: registry.turbo-ops.de/${projectSlug}
2283
+ - Secrets ben\xF6tigt: TURBOOPS_TOKEN
2246
2284
 
2247
2285
  Erstelle die Datei "${pipelineFile}".`;
2248
2286
  const success = await aiToolsService.runWithPrompt(tool, prompt, verbose);
@@ -2581,17 +2619,34 @@ async function integratePipelineWithAI2(pipelineType, projectSlug, pipelinePath)
2581
2619
  Projekt-Slug: ${projectSlug}
2582
2620
  Pipeline-Datei: ${pipelinePath}
2583
2621
 
2584
- Anforderungen:
2585
- 1. Die bestehende Pipeline-Struktur beibehalten
2586
- 2. Einen neuen Deploy-Job/Step hinzuf\xFCgen der nach dem Build l\xE4uft
2587
- 3. TurboOps CLI installieren: npm install -g @turboops/cli
2588
- 4. Token setzen: turbo config set token \${TURBOOPS_TOKEN}
2589
- 5. Deploy ausf\xFChren: turbo deploy <environment> --image <image-tag> --wait
2590
-
2591
- Die erste Stage braucht --image, weitere Stages k\xF6nnen ohne --image deployen (Auto-Promotion).
2622
+ WICHTIG - Branch-zu-Stage-Zuordnung:
2623
+ - dev Stage \u2192 wird NUR auf dem "dev" Branch deployed
2624
+ - test Stage \u2192 wird NUR auf dem "test" Branch deployed
2625
+ - prod Stage \u2192 wird NUR auf dem "main" Branch deployed
2626
+
2627
+ PIPELINE-STRUKTUR:
2628
+ 1. Build-Job: L\xE4uft auf ALLEN Branches (dev, test, main)
2629
+ - Docker Images bauen mit docker-compose build
2630
+ - Images pushen mit docker-compose push
2631
+ - Registry: registry.turbo-ops.de/${projectSlug}
2632
+
2633
+ 2. Deploy-Jobs: Jeder Job l\xE4uft NUR auf seinem Branch!
2634
+ - deploy-dev: rules: if: $CI_COMMIT_BRANCH == "dev"
2635
+ - deploy-test: rules: if: $CI_COMMIT_BRANCH == "test"
2636
+ - deploy-prod: rules: if: $CI_COMMIT_BRANCH == "main" (when: manual)
2637
+
2638
+ DEPLOY-BEFEHLE:
2639
+ - TurboOps CLI installieren: npm install -g @turboops/cli
2640
+ - Token setzen: turbo config set token \${TURBOOPS_TOKEN}
2641
+ - Deploy mit Image (nur erste Stage): turbo deploy dev --image registry.turbo-ops.de/${projectSlug}:\${CI_COMMIT_SHA} --wait
2642
+ - Deploy ohne Image (test/prod - Auto-Promotion): turbo deploy test --wait
2643
+
2644
+ DEPENDENCIES:
2645
+ - deploy-dev needs: [build]
2646
+ - deploy-test needs: [deploy-dev]
2647
+ - deploy-prod needs: [deploy-test]
2592
2648
 
2593
- Secrets die ben\xF6tigt werden:
2594
- - TURBOOPS_TOKEN: TurboOps Projekt-Token
2649
+ Secrets ben\xF6tigt: TURBOOPS_TOKEN
2595
2650
 
2596
2651
  Modifiziere die Datei "${pipelinePath}" entsprechend.`;
2597
2652
  const success = await aiToolsService.runWithPrompt(tool, prompt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turboops/cli",
3
- "version": "1.0.0-dev.611",
3
+ "version": "1.0.0-dev.612",
4
4
  "description": "TurboCLI - Command line interface for TurboOps deployments",
5
5
  "author": "lenne.tech GmbH",
6
6
  "license": "MIT",