Skip to content

Commit bf27af2

Browse files
skip and only support (#342)
* skip and only support * bump
1 parent 993524d commit bf27af2

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

lib/interface/cli/commands/pipeline/run.base.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class RunBaseCommand {
2323
const contexts = this.argv.context;
2424
const noCfCache = this.argv['no-cf-cache'];
2525
const trigger = this.argv['trigger'];
26+
const only = this.argv['only'];
27+
const skip = this.argv['skip'];
2628

2729
const executionRequestTemplate = {
2830
pipelineName,
@@ -35,6 +37,8 @@ class RunBaseCommand {
3537
userYamlDescriptor,
3638
noCfCache,
3739
trigger,
40+
only,
41+
skip
3842
},
3943
};
4044
if (variablesFromFile) {

lib/interface/cli/commands/pipeline/run.cf.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ function _buildBody(data) {
4242
if (data.trigger) {
4343
body.trigger = data.trigger;
4444
}
45+
if (data.skip) {
46+
body.options.skip = data.skip;
47+
}
48+
if (data.only) {
49+
body.options.only = data.only;
50+
}
4551
return body;
4652
}
4753

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ const run = new Command({
8282
alias: 'ncfc',
8383
default: false,
8484
})
85+
.option('only', {
86+
describe: 'run only specifc steps',
87+
array: true
88+
})
89+
.option('skip', {
90+
describe: 'skip specifc steps',
91+
array: true
92+
})
8593
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -trigger TRIGGER_ID | TRIGGER_NAME -b=master', 'Choosing a specific trigger')
8694
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -b=master', 'Defining the source control context using a branch')
8795
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -s=52b992e783d2f84dd0123c70ac8623b4f0f938d1', 'Defining the source control context using a commit')

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

0 commit comments

Comments
 (0)