Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/interface/cli/commands/pipeline/run.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class RunBaseCommand {
const contexts = this.argv.context;
const noCfCache = this.argv['no-cf-cache'];
const trigger = this.argv['trigger'];
const only = this.argv['only'];
const skip = this.argv['skip'];

const executionRequestTemplate = {
pipelineName,
Expand All @@ -35,6 +37,8 @@ class RunBaseCommand {
userYamlDescriptor,
noCfCache,
trigger,
only,
skip
},
};
if (variablesFromFile) {
Expand Down
6 changes: 6 additions & 0 deletions lib/interface/cli/commands/pipeline/run.cf.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ function _buildBody(data) {
if (data.trigger) {
body.trigger = data.trigger;
}
if (data.skip) {
body.options.skip = data.skip;
}
if (data.only) {
body.options.only = data.only;
}
return body;
}

Expand Down
8 changes: 8 additions & 0 deletions lib/interface/cli/commands/pipeline/run.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ const run = new Command({
alias: 'ncfc',
default: false,
})
.option('only', {
describe: 'run only specifc steps',
array: true
})
.option('skip', {
describe: 'skip specifc steps',
array: true
})
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -trigger TRIGGER_ID | TRIGGER_NAME -b=master', 'Choosing a specific trigger')
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -b=master', 'Defining the source control context using a branch')
.example('codefresh run PIPELINE_ID | PIPELINE_NAME -s=52b992e783d2f84dd0123c70ac8623b4f0f938d1', 'Defining the source control context using a commit')
Expand Down