Skip to content

Commit 9a97ca4

Browse files
author
Oleg Sucharevich
authored
change skip-calidation flag to behind-firewall (#281)
1 parent 96ab73a commit 9a97ca4

File tree

5 files changed

+10
-19
lines changed

5 files changed

+10
-19
lines changed

lib/interface/cli/commands/context/create/git/base.cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const command = new Command({
2323
choices: ['AccountAdmins', 'AllUsersInAccount'],
2424
default: 'AccountAdmins',
2525
})
26-
.option('skip-validation', {
27-
describe: 'Set to true to skip validation',
26+
.option('behind-firewall', {
27+
describe: 'Set to true to mark this context with behind firewall flag',
2828
type: 'boolean',
2929
default: false,
3030
});

lib/interface/cli/commands/context/create/git/types/bitbucket.cmd.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const command = new Command({
4444
spec: {
4545
type: 'git.bitbucket',
4646
data: {
47+
behindFirewall: argv.behindFirewall,
4748
sharingPolicy: argv.sharingPolicy,
4849
auth: {
4950
type: 'basic',
@@ -58,11 +59,7 @@ const command = new Command({
5859
if (!data.metadata.name || !data.spec.type) {
5960
throw new CFError('Name and type must be provided');
6061
}
61-
const opt = {};
62-
if (argv.skipValidation) {
63-
opt.skipValidation = true;
64-
}
65-
await context.createContext(data, opt);
62+
await context.createContext(data);
6663
console.log(`Context: ${data.metadata.name} created`);
6764
},
6865
});

lib/interface/cli/commands/context/create/git/types/github.cmd.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const command = new Command({
3434
default: DEFAULT_API_HOST,
3535
required: true,
3636
})
37-
.option('api', {
37+
.option('api-path-prefix', {
3838
describe: 'Prefix of the api on the given host',
3939
alias: 'a',
4040
default: DEFAULT_API_PREFIX,
@@ -52,6 +52,7 @@ const command = new Command({
5252
spec: {
5353
type: 'git.github',
5454
data: {
55+
behindFirewall: argv.behindFirewall,
5556
sharingPolicy: argv.sharingPolicy,
5657
auth: {
5758
type: 'basic',
@@ -72,11 +73,7 @@ const command = new Command({
7273
if (!data.metadata.name || !data.spec.type) {
7374
throw new CFError('Name and type must be provided');
7475
}
75-
const opt = {};
76-
if (argv.skipValidation) {
77-
opt.skipValidation = true;
78-
}
79-
await context.createContext(data, opt);
76+
await context.createContext(data);
8077
console.log(`Context: ${data.metadata.name} created`);
8178
},
8279
});

lib/interface/cli/commands/context/create/git/types/gitlab.cmd.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const command = new Command({
4646
spec: {
4747
type: 'git.gitlab',
4848
data: {
49+
behindFirewall: argv.behindFirewall,
4950
sharingPolicy: argv.sharingPolicy,
5051
auth: {
5152
type: 'basic',
@@ -63,11 +64,7 @@ const command = new Command({
6364
if (!data.metadata.name || !data.spec.type) {
6465
throw new CFError('Name and type must be provided');
6566
}
66-
const opt = {};
67-
if (argv.skipValidation) {
68-
opt.skipValidation = true;
69-
}
70-
await context.createContext(data, opt);
67+
await context.createContext(data);
7168
console.log(`Context: ${data.metadata.name} created`);
7269
},
7370
});

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

0 commit comments

Comments
 (0)