Skip to content

Commit 33364bb

Browse files
Itai GendlerItai Gendler
authored andcommitted
Rename workflow external references to build to allign with our UI concepts
1 parent 52452ca commit 33364bb

File tree

11 files changed

+26
-192
lines changed

11 files changed

+26
-192
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const get = new Command({
1717
' * pipelines (aka \'pip\')\n' +
1818
' * environments (aka \'env\')\n' +
1919
' * compositions (aka \'com\')\n' +
20-
' * workflows (aka \'wf\')\n' +
20+
' * builds\n' +
2121
' * images (aka \'img\')')
2222
.example('$0 get contexts', '# List all contexts')
2323
.example('$0 get contexts context-name', '# List a single context with specified NAME')

lib/interface/cli/commands/workflow/describe.cmd.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ const { workflow } = require('../../../../logic').api;
66
const describeRoot = require('../root/describe.cmd');
77

88
const command = new Command({
9-
command: 'workflow <id>',
10-
aliases: ['wf'],
11-
description: 'Describe a workflow',
9+
command: 'build <id>',
10+
description: 'Describe a build',
1211
builder: (yargs) => {
1312
return yargs
1413
.positional('id', {
15-
describe: 'workflow id',
14+
describe: 'build id',
1615
});
1716
},
1817
handler: async (argv) => {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ const getRoot = require('../root/get.cmd');
99
const { printError } = require('../../helpers/general');
1010

1111
const command = new Command({
12-
command: 'workflows [id]',
13-
aliases: ['wf', 'workflow'],
14-
description: 'Get workflows',
12+
command: 'builds [id]',
13+
aliases: ['build'],
14+
description: 'Get builds',
1515
builder: (yargs) => {
1616
return yargs
1717
.positional('id', {
18-
describe: 'workflow id',
18+
describe: 'Build id',
1919
})
2020
.option('limit', {
2121
describe: 'Limit amount of returned results',
@@ -72,7 +72,7 @@ const command = new Command({
7272
pipelineIds.push(currPipeline.info.id);
7373
});
7474
} else if (_.isEmpty(pipelineIds)) {
75-
throw new CFError('Cannot find any workflows with these pipelines names');
75+
throw new CFError('Cannot find any builds with these pipelines names');
7676
}
7777
}
7878
workflows = await workflow.getWorkflows({

lib/interface/cli/commands/workflow/logs.cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ const { log } = require('../../../../logic').api;
88
const run = new Command({
99
root: true,
1010
command: 'logs <id>',
11-
description: 'Show logs of a workflow',
11+
description: 'Show logs of a build',
1212
builder: (yargs) => {
1313
yargs
1414
.positional('id', {
1515
describe: 'Pipeline id',
1616
})
1717
.option('f', {
18-
describe: 'Continue showing workflow logs until it will finish',
18+
describe: 'Continue showing build logs until it will finish',
1919
type: 'boolean',
2020
});
2121

lib/interface/cli/commands/workflow/restart.cmd.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ const { log } = require('../../../../logic').api;
55
const restart = new Command({
66
root: true,
77
command: 'restart <id>',
8-
description: 'Restart a workflow by its id',
8+
description: 'Restart a build by its id',
99
builder: (yargs) => {
1010
return yargs
1111
.positional('id', {
12-
describe: 'Workflow id',
12+
describe: 'Build id',
1313
})
1414
.option('detach', {
1515
alias: 'd',
16-
describe: 'Run workflow and print workflow ID',
16+
describe: 'Run build and print workflow ID',
1717
});
1818
},
1919
handler: async (argv) => {

lib/interface/cli/commands/workflow/run.cmd.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const run = new Command({
3737
default: false,
3838
})
3939
.option('variable', {
40-
describe: 'Set workflow variables',
40+
describe: 'Set build variables',
4141
default: [],
4242
alias: 'v',
4343
})
@@ -48,13 +48,13 @@ const run = new Command({
4848
})
4949
.option('detach', {
5050
alias: 'd',
51-
describe: 'Run pipeline and print workflow ID',
51+
describe: 'Run pipeline and print build ID',
5252
});
5353

5454
crudFilenameOption(yargs, {
5555
name: 'variable-file',
5656
alias: 'var-file',
57-
describe: 'Set workflow variables from a file',
57+
describe: 'Set build variables from a file',
5858
});
5959

6060
return yargs;

lib/interface/cli/commands/workflow/terminate.cmd.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ const { workflow } = require('../../../../logic/index').api;
44
const terminate = new Command({
55
root: true,
66
command: 'terminate <id>',
7-
description: 'Terminate a workflow by its id',
7+
description: 'Terminate a build by its id',
88
builder: (yargs) => {
99
return yargs
1010
.positional('id', {
11-
describe: 'Workflow id',
11+
describe: 'Build id',
1212
});
1313
},
1414
handler: async (argv) => {
1515
const workflowId = argv.id;
1616
await workflow.terminateWorkflowById(workflowId);
17-
console.log(`Workflow: ${workflowId} terminated`);
17+
console.log(`Build: ${workflowId} terminated`);
1818
},
1919
});
2020

lib/interface/cli/commands/workflow/wait.cmd.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const moment = require('moment');
99
const annotate = new Command({
1010
root: true,
1111
command: 'wait <id..>',
12-
description: 'Wait until a condition will be met on a workflow',
12+
description: 'Wait until a condition will be met on a build',
1313
builder: (yargs) => {
1414
return yargs
1515
.option('status', {
16-
describe: 'Workflow status',
16+
describe: 'Build status',
1717
alias: 's',
1818
choices: ['pending', 'elected', 'running', 'error', 'success', 'terminating', 'terminated'],
1919
required: true,
@@ -28,7 +28,7 @@ const annotate = new Command({
2828
default: 30,
2929
})
3030
.positional('id', {
31-
describe: 'Workflow id',
31+
describe: 'Build id',
3232
});
3333
},
3434
handler: async (argv) => {
@@ -39,7 +39,7 @@ const annotate = new Command({
3939
_.forEach(workflowIds, (workflowId) => {
4040
if (!ObjectID.isValid(workflowId)) {
4141
throw new CFError({
42-
message: `Passed workflow id: ${workflowId} is not valid`,
42+
message: `Passed build id: ${workflowId} is not valid`,
4343
});
4444
}
4545
});

lib/logic/api/workflow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const waitForStatus = async (workflowId, desiredStatus, timeoutDate, descriptive
7878
await Promise.delay(5000);
7979
await waitForStatus(workflowId, desiredStatus, timeoutDate, descriptive);
8080
} else {
81-
console.log(`Workflow: ${workflowId} status: ${desiredStatus} reached`);
81+
console.log(`Build: ${workflowId} status: ${desiredStatus} reached`);
8282
}
8383
};
8484

lib/logic/api/workflow.new.js

Lines changed: 0 additions & 165 deletions
This file was deleted.

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.6.8",
3+
"version": "0.6.9",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)