@docupace/pipeline 1.0.8-6.publish → 1.0.8-6.xray

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.86.publish",
3
+ "version": "1.0.86.xray",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
package/src/micro/cli.js CHANGED
@@ -8,7 +8,6 @@ import {
8
8
  microserviceDeployTagVersion,
9
9
  microserviceCopyImageToEnv,
10
10
  microserviceBuildPushImage,
11
- microserviceBuildPushImageWithServiceName,
12
11
  } from './ms-deploy.js';
13
12
 
14
13
  dotenv.config({ path: ['.env.pipeline.local', 'config/.env.pipeline.local'] });
@@ -17,14 +16,6 @@ const program = new Command();
17
16
 
18
17
  //const GIT_SHA = (await $`git log --pretty=format:'%h' -n 1`).stdout.trim();
19
18
 
20
- program
21
- .command('publish-microservice-v2 <repoName> <serviceName> ')
22
- .description('Publish a microservice Docker image with version tags')
23
- .option('-t, --tag <tag>', 'Version tag (defaults to BITBUCKET_TAG)')
24
- .action(async (repoName, serviceName, options) => {
25
- await microserviceBuildPushImageWithServiceName(repoName,serviceName, options);
26
- });
27
-
28
19
  program
29
20
  .command('publish-microservice <serviceName>')
30
21
  .description('Publish a microservice Docker image with version tags')
@@ -264,24 +264,13 @@ export async function microserviceCopyImageToEnv(
264
264
  }
265
265
  }
266
266
 
267
-
268
- export async function microserviceBuildPushImageWithServiceName(repoName, serviceName,options = {}) {
269
- await _microserviceBuildPushImageCommon(repoName, serviceName, options);
270
- }
271
-
272
267
  export async function microserviceBuildPushImage(repoName, options = {}) {
268
+ // Use environment variables as defaults, but allow overrides
269
+
273
270
  const serviceName = String(repoName || '')
274
271
  .split('-')
275
272
  .pop()
276
273
  .trim();
277
- await _microserviceBuildPushImageCommon(repoName, serviceName, options);
278
- }
279
-
280
-
281
- export async function _microserviceBuildPushImageCommon(repoName,serviceName, options = {}) {
282
- // Use environment variables as defaults, but allow overrides
283
-
284
-
285
274
  const config = {
286
275
  imageName: serviceName,
287
276
  registryUrl: options.registryUrl || process.env.JF_REGISTRY_URL,
@@ -298,16 +287,12 @@ export async function _microserviceBuildPushImageCommon(repoName,serviceName, op
298
287
  'Image name is required. Set IMAGE_NAME or APP_NAME environment variable.',
299
288
  );
300
289
  }
301
-
302
- const registryPath = `${config.registryUrl}/${repoName}-dev-docker-local`;
303
-
304
290
  console.log('=== Docker Image Publishing Configuration ===');
305
291
  console.log(`Version Tag: ${config.tag || 'none'}`);
306
- console.log(`Registry: ${registryPath}`);
307
- console.log(`ImageName: ${serviceName}`);
292
+ console.log(`Registry: ${config.registryUrl}/${repoName}`);
308
293
  console.log('==========================================');
309
294
 
310
-
295
+ const registryPath = `${config.registryUrl}/${repoName}-dev-docker-local`;
311
296
  // Docker login
312
297
  await $`echo ${config.password} | docker login --username ${config.username} --password-stdin ${config.registryUrl}`;
313
298