@turboops/cli 1.0.0-dev.620 → 1.0.0-dev.622
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/dist/index.js +28 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1256,6 +1256,7 @@ function getStatusColor(status) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
|
|
1258
1258
|
// src/commands/init.ts
|
|
1259
|
+
import chalk5 from "chalk";
|
|
1259
1260
|
import { Command as Command3 } from "commander";
|
|
1260
1261
|
import prompts2 from "prompts";
|
|
1261
1262
|
|
|
@@ -1538,7 +1539,6 @@ async function detectProjectConfig() {
|
|
|
1538
1539
|
}
|
|
1539
1540
|
|
|
1540
1541
|
// src/commands/init.ts
|
|
1541
|
-
import chalk5 from "chalk";
|
|
1542
1542
|
var initCommand = new Command3("init").description("Initialize TurboOps project in current directory").action(async () => {
|
|
1543
1543
|
const verbose = process.env.DEBUG === "true";
|
|
1544
1544
|
if (verbose) {
|
|
@@ -2252,48 +2252,56 @@ WICHTIG - Branch-zu-Stage-Zuordnung (STRIKT EINHALTEN!):
|
|
|
2252
2252
|
|
|
2253
2253
|
PIPELINE-STRUKTUR:
|
|
2254
2254
|
|
|
2255
|
-
1. BUILD-JOB (l\xE4uft auf
|
|
2256
|
-
stages: [build, deploy
|
|
2255
|
+
1. BUILD-JOB (l\xE4uft NUR auf dem default branch z.B. dev):
|
|
2256
|
+
stages: [build, deploy]
|
|
2257
2257
|
|
|
2258
2258
|
build:
|
|
2259
2259
|
image: docker:24-dind
|
|
2260
|
+
stage: build
|
|
2260
2261
|
services: [docker:24-dind]
|
|
2261
2262
|
before_script:
|
|
2262
2263
|
- docker login -u ${projectSlug} -p \${TURBOOPS_TOKEN} ${configService.getRegistryUrl()}
|
|
2263
2264
|
script:
|
|
2264
|
-
- docker compose build
|
|
2265
|
-
- docker compose push
|
|
2266
|
-
|
|
2267
|
-
-
|
|
2265
|
+
- docker compose -f docker-compose.yml build
|
|
2266
|
+
- docker compose -f docker-compose.yml push
|
|
2267
|
+
only:
|
|
2268
|
+
- dev # L\xE4uft nur auf dem default branch
|
|
2268
2269
|
|
|
2269
2270
|
2. DEPLOY-JOBS (jeder NUR auf seinem Branch!):
|
|
2270
2271
|
WICHTIG: KEIN --image Flag n\xF6tig! Die CLI erkennt CI_COMMIT_SHA automatisch!
|
|
2271
2272
|
|
|
2272
2273
|
deploy-dev:
|
|
2273
|
-
image: node:
|
|
2274
|
+
image: node:22-alpine
|
|
2275
|
+
stage: deploy
|
|
2274
2276
|
before_script:
|
|
2275
|
-
- npm install -g @turboops/cli
|
|
2277
|
+
- npm install -g @turboops/cli${configService.getEnvironment() === "dev" ? "@dev" : ""}
|
|
2276
2278
|
- turbo config set token \${TURBOOPS_TOKEN}
|
|
2277
2279
|
script:
|
|
2278
2280
|
- turbo deploy dev --wait # CLI erkennt Image automatisch via CI_COMMIT_SHA
|
|
2279
|
-
|
|
2280
|
-
-
|
|
2281
|
-
needs: [build]
|
|
2281
|
+
only:
|
|
2282
|
+
- dev # NUR auf dev Branch!
|
|
2282
2283
|
|
|
2283
2284
|
deploy-test:
|
|
2285
|
+
image: node:22-alpine
|
|
2286
|
+
stage: deploy
|
|
2287
|
+
before_script:
|
|
2288
|
+
- npm install -g @turboops/cli${configService.getEnvironment() === "dev" ? "@dev" : ""}
|
|
2289
|
+
- turbo config set token \${TURBOOPS_TOKEN}
|
|
2284
2290
|
script:
|
|
2285
2291
|
- turbo deploy test --wait
|
|
2286
|
-
|
|
2287
|
-
-
|
|
2288
|
-
needs: [deploy-dev]
|
|
2292
|
+
only:
|
|
2293
|
+
- test # NUR auf test Branch!
|
|
2289
2294
|
|
|
2290
2295
|
deploy-prod:
|
|
2296
|
+
image: node:22-alpine
|
|
2297
|
+
stage: deploy
|
|
2298
|
+
before_script:
|
|
2299
|
+
- npm install -g @turboops/cli${configService.getEnvironment() === "dev" ? "@dev" : ""}
|
|
2300
|
+
- turbo config set token \${TURBOOPS_TOKEN}
|
|
2291
2301
|
script:
|
|
2292
2302
|
- turbo deploy prod --wait
|
|
2293
|
-
|
|
2294
|
-
-
|
|
2295
|
-
when: manual
|
|
2296
|
-
needs: [deploy-test]
|
|
2303
|
+
only:
|
|
2304
|
+
- main # NUR auf main Branch!
|
|
2297
2305
|
|
|
2298
2306
|
WICHTIG:
|
|
2299
2307
|
- Der Build l\xE4uft auf ALLEN Branches (dev, test, main)
|
|
@@ -2786,7 +2794,7 @@ PIPELINE-STRUKTUR:
|
|
|
2786
2794
|
- deploy-prod: rules: if: $CI_COMMIT_BRANCH == "main" (when: manual)
|
|
2787
2795
|
|
|
2788
2796
|
DEPLOY-BEFEHLE (WICHTIG: KEIN --image Flag n\xF6tig!):
|
|
2789
|
-
- TurboOps CLI installieren: npm install -g @turboops/cli
|
|
2797
|
+
- TurboOps CLI installieren: npm install -g @turboops/cli${configService.getEnvironment() === "dev" ? "@dev" : ""}
|
|
2790
2798
|
- Token setzen: turbo config set token \${TURBOOPS_TOKEN}
|
|
2791
2799
|
- Deploy: turbo deploy <stage> --wait
|
|
2792
2800
|
|