Skip to content

Commit 08a4cdd

Browse files
Saas 3085 sha and webhook (#339)
* image : add sha and remove _id + build : add webhook * add full pip name
1 parent c598d77 commit 08a4cdd

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

lib/interface/cli/commands/image/get.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const getRoot = require('../root/get.cmd');
88
const Promise = require('bluebird');
99
const { sdk } = require('../../../../logic');
1010

11-
const IMAGE_FIELDS_TO_SELECT = 'internalName tags internalImageId created size imageDisplayName metadata';
11+
const IMAGE_FIELDS_TO_SELECT = 'internalName tags internalImageId created size imageDisplayName metadata sha';
1212

1313
const command = new Command({
1414
command: 'images [id..]',

lib/interface/cli/helpers/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ImagesHelper {
1616
const newImage = {
1717
name: image.imageDisplayName,
1818
size: filesize(image.size),
19-
_id: image._id,
19+
sha: image.sha,
2020
annotations: _.get(image, 'metadata', {}),
2121
tagId: tag._id,
2222
created: image.created ? new Date(image.created) : undefined,

lib/logic/entities/Image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Image extends Entity {
55
super();
66
this.entityType = 'image';
77
this.info = data;
8-
this.defaultColumns = ['id', 'name', 'tag', 'created', 'size', 'pull'];
8+
this.defaultColumns = ['id', 'name', 'tag', 'created', 'size', 'sha', 'pull'];
99
this.wideColumns = this.defaultColumns.concat([]);
1010
}
1111
}

lib/logic/entities/Workflow.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Workflow extends Entity {
77
this.entityType = 'workflow';
88
this.info = data;
99
this.defaultColumns = [
10-
'id', 'pipeline-name', 'status', 'created', 'started', 'finished', 'totalTime', 'trigger', 'repository', 'branch',
10+
'id', 'pipeline-name', 'status', 'created', 'started', 'finished', 'totalTime', 'trigger', 'webhook', 'repository', 'branch',
1111
];
1212
this.wideColumns = [
1313
'id',
@@ -20,6 +20,7 @@ class Workflow extends Entity {
2020
'buildTime',
2121
'totalTime',
2222
'trigger',
23+
'webhook',
2324
'repository',
2425
'branch',
2526
'commit-Id',
@@ -46,10 +47,11 @@ class Workflow extends Entity {
4647
totalTime,
4748
buildTime,
4849
status: response.status,
49-
'pipeline-name': response.serviceName,
50+
'pipeline-name': response.pipelineName,
5051
repository: `${response.repoOwner}/${response.repoName}`,
5152
branch: response.branchName,
5253
trigger: response.pipelineTriggerName,
54+
webhook: !!response.webhookTriggered,
5355
progress: response.progress,
5456
'pipeline-Id': response.serviceId,
5557
'commit-Id': response.revision,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.21.0",
3+
"version": "0.21.1",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)