@turboops/cli 1.0.21 → 1.0.23-dev.1000
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 +18 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -194,7 +194,7 @@ function getPackageName() {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
// src/services/config.ts
|
|
197
|
-
var BUILD_ENV = true ? "
|
|
197
|
+
var BUILD_ENV = true ? "dev" : void 0;
|
|
198
198
|
var API_URLS = {
|
|
199
199
|
local: "http://localhost:3000",
|
|
200
200
|
dev: "https://api.dev.turbo-ops.de",
|
|
@@ -2541,12 +2541,23 @@ var deployCommand = new Command4("deploy").description("Trigger a deployment (fo
|
|
|
2541
2541
|
logger.header(`Deploying: ${project.name} \u2192 ${env.name}`);
|
|
2542
2542
|
let imageTag = options.image;
|
|
2543
2543
|
if (!imageTag) {
|
|
2544
|
-
const
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2544
|
+
const isFirstStage = !env.stageOrder || env.stageOrder === 0;
|
|
2545
|
+
if (isFirstStage) {
|
|
2546
|
+
const commitSha = detectCiCommitSha();
|
|
2547
|
+
const ciEnv = detectCiEnvironment();
|
|
2548
|
+
if (commitSha && ciEnv) {
|
|
2549
|
+
imageTag = `${configService.getRegistryUrl()}/${project.slug}:${commitSha}`;
|
|
2550
|
+
logger.info(`CI/CD detected (${ciEnv})`);
|
|
2551
|
+
logger.info(`Auto-using image: ${imageTag}`);
|
|
2552
|
+
}
|
|
2553
|
+
} else {
|
|
2554
|
+
const ciEnv = detectCiEnvironment();
|
|
2555
|
+
if (ciEnv) {
|
|
2556
|
+
logger.info(`CI/CD detected (${ciEnv})`);
|
|
2557
|
+
logger.info(
|
|
2558
|
+
`Stage "${env.name}" uses promotion - using image from previous stage`
|
|
2559
|
+
);
|
|
2560
|
+
}
|
|
2550
2561
|
}
|
|
2551
2562
|
}
|
|
2552
2563
|
let composeFileContent;
|