codefresh 0.86.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/release-drafter.yaml +8 -0
- package/.github/workflows/draft-release.yaml +33 -0
- package/docs/content/pipelines/spec.md +138 -64
- package/lib/interface/cli/commands/root/assign.cmd.js +18 -0
- package/lib/interface/cli/commands/root/unassign.cmd.js +18 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/apply.cmd.js +44 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/assign.cmd.js +51 -0
- package/lib/interface/cli/commands/systemRuntimeEnvironments/unassign.cmd.js +51 -0
- package/lib/interface/cli/commands/trigger/create.cmd.js +2 -2
- package/lib/interface/cli/commands/trigger/delete.cmd.js +1 -1
- package/lib/interface/cli/commands/trigger/event/create.cmd.js +2 -2
- package/lib/interface/cli/commands/trigger/event/delete.cmd.js +2 -2
- package/lib/interface/cli/commands/trigger/event/get.cmd.js +2 -2
- package/lib/interface/cli/commands/trigger/get.cmd.js +2 -2
- package/lib/interface/cli/commands/trigger/type/get.cmd.js +2 -2
- package/lib/interface/cli/completion/tree.json +1 -1
- package/openapi.json +116 -2
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
|
3
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
4
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
|
5
|
+
template: |
|
|
6
|
+
## Changes
|
|
7
|
+
|
|
8
|
+
$CHANGES
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## Reference: https://github.com/release-drafter/release-drafter
|
|
2
|
+
name: Create Release
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
create_release:
|
|
11
|
+
name: Create Release
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Set up jq
|
|
20
|
+
uses: dcarbone/install-jq-action@v1.0.1
|
|
21
|
+
|
|
22
|
+
- name: Get release version from service.yaml
|
|
23
|
+
run: |
|
|
24
|
+
RELEASE_VERSION=$(jq -r '.version' package.json )
|
|
25
|
+
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
|
|
26
|
+
|
|
27
|
+
- uses: release-drafter/release-drafter@v5
|
|
28
|
+
env:
|
|
29
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
with:
|
|
31
|
+
publish: true
|
|
32
|
+
version: ${{ env.RELEASE_VERSION }}
|
|
33
|
+
config-name: release-drafter.yaml
|
|
@@ -8,79 +8,169 @@ A Pipeline also needs a `.spec` section.
|
|
|
8
8
|
|
|
9
9
|
### Examples
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Use create/replace/delete commands to manage your pipeline
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
# create pipeline
|
|
15
|
+
codefresh create -f pipeline.yaml
|
|
16
|
+
|
|
17
|
+
# get created/modified pipeline spec
|
|
18
|
+
codefresh get pipeline <name> -o yaml > pipeline.yaml
|
|
19
|
+
|
|
20
|
+
# update pipeline with modified pipeline spec
|
|
21
|
+
codefresh replace -f pipeline.yaml
|
|
22
|
+
|
|
23
|
+
# delete pipeline using spec file
|
|
24
|
+
codefresh delete -f pipeline.yaml
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
See the examples of pipeline spec below to manage your pipelines.
|
|
28
|
+
|
|
29
|
+
#### Basic pipeline with cron triggers in spec
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
version: '1.0'
|
|
33
|
+
kind: pipeline
|
|
34
|
+
metadata:
|
|
35
|
+
name: cron
|
|
36
|
+
spec:
|
|
37
|
+
cronTriggers:
|
|
38
|
+
- name: every minute
|
|
39
|
+
type: cron
|
|
40
|
+
message: every minute
|
|
41
|
+
expression: 0/1 * 1/1 * *
|
|
42
|
+
steps:
|
|
43
|
+
test:
|
|
44
|
+
image: alpine
|
|
45
|
+
commands:
|
|
46
|
+
- echo test
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Basic pipeline with cron triggers with variables
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
version: '1.0'
|
|
53
|
+
kind: pipeline
|
|
54
|
+
metadata:
|
|
55
|
+
name: cron
|
|
56
|
+
spec:
|
|
57
|
+
cronTriggers:
|
|
58
|
+
- name: every minute
|
|
59
|
+
type: cron
|
|
60
|
+
message: every minute
|
|
61
|
+
expression: 0/1 * 1/1 * *
|
|
62
|
+
variables:
|
|
63
|
+
- key: TEST_VAR
|
|
64
|
+
value: 'my-test'
|
|
65
|
+
steps:
|
|
66
|
+
test:
|
|
67
|
+
image: alpine
|
|
68
|
+
commands:
|
|
69
|
+
- echo ${{TEST_VARIABLE}}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Basic pipeline with cron triggers with run options
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
version: '1.0'
|
|
76
|
+
kind: pipeline
|
|
77
|
+
metadata:
|
|
78
|
+
name: cron
|
|
79
|
+
spec:
|
|
80
|
+
cronTriggers:
|
|
81
|
+
- name: every minute
|
|
82
|
+
type: cron
|
|
83
|
+
message: every minute
|
|
84
|
+
expression: 0/1 * 1/1 * *
|
|
85
|
+
options:
|
|
86
|
+
resetVolume: true
|
|
87
|
+
steps:
|
|
88
|
+
test:
|
|
89
|
+
image: alpine
|
|
90
|
+
commands:
|
|
91
|
+
- echo test >> test.txt
|
|
92
|
+
- cat test.txt
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Pipeline started by cron trigger but simulating the git trigger
|
|
96
|
+
|
|
97
|
+
Note that `spec.triggers.0.id` and `spec.cronTriggers.gitTriggerId`
|
|
98
|
+
should be the same value and a valid ObjectId.
|
|
12
99
|
|
|
13
100
|
```yaml
|
|
14
101
|
version: '1.0'
|
|
15
102
|
kind: pipeline
|
|
16
103
|
metadata:
|
|
17
|
-
name:
|
|
18
|
-
labels:
|
|
19
|
-
tags: []
|
|
20
|
-
deprecate:
|
|
21
|
-
applicationPort: '8080'
|
|
22
|
-
repoPipeline: true
|
|
104
|
+
name: cron
|
|
23
105
|
spec:
|
|
24
106
|
triggers:
|
|
25
107
|
- type: git
|
|
26
|
-
|
|
108
|
+
name: test
|
|
109
|
+
repo: repo-owner/repo-name
|
|
27
110
|
events:
|
|
28
111
|
- push.heads
|
|
29
112
|
pullRequestAllowForkEvents: false
|
|
30
113
|
commentRegex: /.*/gi
|
|
31
114
|
branchRegex: /.*/gi
|
|
32
115
|
branchRegexInput: regex
|
|
33
|
-
provider:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
116
|
+
provider: git-context-name
|
|
117
|
+
id: 65329431edb87250ff128acc
|
|
118
|
+
|
|
119
|
+
cronTriggers:
|
|
120
|
+
- name: every minute
|
|
121
|
+
type: cron
|
|
122
|
+
message: every minute
|
|
123
|
+
expression: 0/1 * 1/1 * *
|
|
124
|
+
gitTriggerId: 65329431edb87250ff128acc
|
|
125
|
+
branch: master
|
|
126
|
+
|
|
41
127
|
steps:
|
|
42
|
-
|
|
128
|
+
test:
|
|
43
129
|
image: alpine
|
|
44
|
-
working_directory: '${{clone_step}}'
|
|
45
130
|
commands:
|
|
46
|
-
- echo
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
131
|
+
- echo ${{CF_BRANCH}}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### **Disable** cron trigger in pipeline
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
version: '1.0'
|
|
138
|
+
kind: pipeline
|
|
139
|
+
metadata:
|
|
140
|
+
name: cron
|
|
141
|
+
spec:
|
|
142
|
+
cronTriggers:
|
|
143
|
+
- name: every minute
|
|
144
|
+
type: cron
|
|
145
|
+
message: every minute
|
|
146
|
+
expression: 0/1 * 1/1 * *
|
|
147
|
+
disabled: true
|
|
148
|
+
steps:
|
|
149
|
+
test:
|
|
150
|
+
image: alpine
|
|
151
|
+
commands:
|
|
152
|
+
- echo test
|
|
58
153
|
```
|
|
59
154
|
|
|
60
|
-
#### Basic Pipeline with
|
|
155
|
+
#### Basic Pipeline with clone step and git trigger
|
|
61
156
|
|
|
62
157
|
```yaml
|
|
63
158
|
version: '1.0'
|
|
64
159
|
kind: pipeline
|
|
65
160
|
metadata:
|
|
66
|
-
name:
|
|
67
|
-
labels:
|
|
68
|
-
tags: []
|
|
69
|
-
deprecate:
|
|
70
|
-
applicationPort: '8080'
|
|
71
|
-
repoPipeline: true
|
|
161
|
+
name: basic-pipeline
|
|
72
162
|
spec:
|
|
73
163
|
triggers:
|
|
74
164
|
- type: git
|
|
75
|
-
|
|
165
|
+
name: test
|
|
166
|
+
repo: repo-owner/repo-name
|
|
76
167
|
events:
|
|
77
168
|
- push.heads
|
|
78
169
|
pullRequestAllowForkEvents: false
|
|
79
170
|
commentRegex: /.*/gi
|
|
80
171
|
branchRegex: /.*/gi
|
|
81
172
|
branchRegexInput: regex
|
|
82
|
-
provider:
|
|
83
|
-
contexts: []
|
|
173
|
+
provider: git-context-name
|
|
84
174
|
variables:
|
|
85
175
|
- key: PORT
|
|
86
176
|
value: '3000'
|
|
@@ -108,7 +198,6 @@ spec:
|
|
|
108
198
|
dockerfile: ./Dockerfile
|
|
109
199
|
image_name: my-custom-docker-image
|
|
110
200
|
tag: bla
|
|
111
|
-
stages: []
|
|
112
201
|
```
|
|
113
202
|
|
|
114
203
|
#### Pipeline with a remote spec template brought from a git repository
|
|
@@ -116,24 +205,19 @@ spec:
|
|
|
116
205
|
version: '1.0'
|
|
117
206
|
kind: pipeline
|
|
118
207
|
metadata:
|
|
119
|
-
name:
|
|
120
|
-
isPublic: false
|
|
121
|
-
labels:
|
|
122
|
-
tags: []
|
|
123
|
-
deprecate:
|
|
124
|
-
applicationPort: '8080'
|
|
125
|
-
repoPipeline: true
|
|
208
|
+
name: basic-pipeline
|
|
126
209
|
spec:
|
|
127
210
|
triggers:
|
|
128
211
|
- type: git
|
|
129
|
-
|
|
212
|
+
name: test
|
|
213
|
+
repo: repo-owner/repo-name
|
|
130
214
|
events:
|
|
131
215
|
- push.heads
|
|
132
216
|
pullRequestAllowForkEvents: false
|
|
133
217
|
commentRegex: /.*/gi
|
|
134
218
|
branchRegex: /.*/gi
|
|
135
219
|
branchRegexInput: regex
|
|
136
|
-
provider:
|
|
220
|
+
provider: git-context-name
|
|
137
221
|
contexts: []
|
|
138
222
|
variables:
|
|
139
223
|
- key: PORT
|
|
@@ -147,8 +231,6 @@ spec:
|
|
|
147
231
|
repo: codefresh-io/cli
|
|
148
232
|
path: codefresh.yml
|
|
149
233
|
revision: master # can be a branch or commit. if not specified will use CF_BRANCH variable value
|
|
150
|
-
steps: {}
|
|
151
|
-
stages: []
|
|
152
234
|
```
|
|
153
235
|
|
|
154
236
|
#### Pipeline with a remote spec template from a public git URL
|
|
@@ -156,25 +238,19 @@ spec:
|
|
|
156
238
|
version: '1.0'
|
|
157
239
|
kind: pipeline
|
|
158
240
|
metadata:
|
|
159
|
-
name:
|
|
160
|
-
isPublic: false
|
|
161
|
-
labels:
|
|
162
|
-
tags: []
|
|
163
|
-
deprecate:
|
|
164
|
-
applicationPort: '8080'
|
|
165
|
-
repoPipeline: true
|
|
166
|
-
project: codefresh-io/cli
|
|
241
|
+
name: basic-pipeline
|
|
167
242
|
spec:
|
|
168
243
|
triggers:
|
|
169
244
|
- type: git
|
|
170
|
-
|
|
245
|
+
name: test
|
|
246
|
+
repo: repo-owner/repo-name
|
|
171
247
|
events:
|
|
172
248
|
- push.heads
|
|
173
249
|
pullRequestAllowForkEvents: false
|
|
174
250
|
commentRegex: /.*/gi
|
|
175
251
|
branchRegex: /.*/gi
|
|
176
252
|
branchRegexInput: regex
|
|
177
|
-
provider:
|
|
253
|
+
provider: git-context-name
|
|
178
254
|
contexts: []
|
|
179
255
|
variables:
|
|
180
256
|
- key: PORT
|
|
@@ -185,6 +261,4 @@ spec:
|
|
|
185
261
|
specTemplate:
|
|
186
262
|
location: url
|
|
187
263
|
url: 'https://raw.githubusercontent.com/codefresh-io/cli/master/codefresh.yml'
|
|
188
|
-
steps: {}
|
|
189
|
-
stages: []
|
|
190
264
|
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const Command = require('../../Command');
|
|
2
|
+
|
|
3
|
+
const assign = new Command({
|
|
4
|
+
root: true,
|
|
5
|
+
command: 'assign',
|
|
6
|
+
description: 'Assign a resource',
|
|
7
|
+
usage: 'codefresh assign --help',
|
|
8
|
+
webDocs: {
|
|
9
|
+
title: 'Assign',
|
|
10
|
+
weight: 70,
|
|
11
|
+
},
|
|
12
|
+
builder: (yargs) => {
|
|
13
|
+
return yargs
|
|
14
|
+
.demandCommand(1, 'You need at least one command before moving on');
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
module.exports = assign;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const Command = require('../../Command');
|
|
2
|
+
|
|
3
|
+
const unassign = new Command({
|
|
4
|
+
root: true,
|
|
5
|
+
command: 'unassign',
|
|
6
|
+
description: 'Unassign a resource',
|
|
7
|
+
usage: 'codefresh assign --help',
|
|
8
|
+
webDocs: {
|
|
9
|
+
title: 'Unassign',
|
|
10
|
+
weight: 70,
|
|
11
|
+
},
|
|
12
|
+
builder: (yargs) => {
|
|
13
|
+
return yargs
|
|
14
|
+
.demandCommand(1, 'You need at least one command before moving on');
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
module.exports = unassign;
|
|
@@ -4,6 +4,7 @@ const _ = require('lodash');
|
|
|
4
4
|
const applyRoot = require('../root/apply.cmd');
|
|
5
5
|
const { crudFilenameOption } = require('../../helpers/general');
|
|
6
6
|
const sysRe = require('../../helpers/sys-re');
|
|
7
|
+
const { sdk } = require('../../../../logic');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
const command = new Command({
|
|
@@ -38,6 +39,18 @@ const command = new Command({
|
|
|
38
39
|
alias: 'd',
|
|
39
40
|
describe: 'Description of the new runtime environment',
|
|
40
41
|
})
|
|
42
|
+
.option('assign-accounts', {
|
|
43
|
+
alias: 'a',
|
|
44
|
+
type: Boolean,
|
|
45
|
+
// default: false,
|
|
46
|
+
describe: 'Assign runtime environment to accounts specified in the yaml',
|
|
47
|
+
})
|
|
48
|
+
.option('unassign-accounts', {
|
|
49
|
+
alias: 'u',
|
|
50
|
+
type: Boolean,
|
|
51
|
+
// default: false,
|
|
52
|
+
describe: 'Unassign runtime environment from accounts based on diff with current state',
|
|
53
|
+
})
|
|
41
54
|
.example('codefresh patch system-runtime-environments -f ./re.yml', 'Apply changes to a system runtime environment');
|
|
42
55
|
},
|
|
43
56
|
handler: async (argv) => {
|
|
@@ -60,6 +73,37 @@ const command = new Command({
|
|
|
60
73
|
} else {
|
|
61
74
|
await sysRe.update(options, body);
|
|
62
75
|
console.log(`Runtime-Environment: '${options.name}' patched.`);
|
|
76
|
+
const yamlAccounts = body.accounts;
|
|
77
|
+
if (yamlAccounts) {
|
|
78
|
+
if (argv.unassignAccounts) {
|
|
79
|
+
const re = await sysRe.get({ ...options, extend: false });
|
|
80
|
+
const accounts = _.difference(re.accounts, yamlAccounts);
|
|
81
|
+
if (!_.isEmpty(accounts)) {
|
|
82
|
+
await sdk.onPrem.runtimeEnvs.account.delete({ name: options.name }, { accounts });
|
|
83
|
+
console.log(`Runtime-Environment unassigned from accounts: ${accounts}`);
|
|
84
|
+
} else {
|
|
85
|
+
console.log('No accounts to unassign');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (argv.assignAccounts) {
|
|
90
|
+
const re = await sysRe.get({ ...options, extend: false });
|
|
91
|
+
const accounts = _.difference(yamlAccounts, re.accounts);
|
|
92
|
+
const existing = await sdk.accounts.listAccounts({ _id: accounts });
|
|
93
|
+
const nonExisting = _.difference(accounts, existing.map(({id}) => id));
|
|
94
|
+
if (!_.isEmpty(nonExisting)) {
|
|
95
|
+
throw new CFError({
|
|
96
|
+
message: `Accounts do not exist: ${nonExisting}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (!_.isEmpty(accounts)) {
|
|
100
|
+
await sdk.onPrem.runtimeEnvs.account.modify({ name: options.name }, { accounts });
|
|
101
|
+
console.log(`Runtime-Environment assigned to accounts: ${accounts}`);
|
|
102
|
+
} else {
|
|
103
|
+
console.log('No accounts to assign');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
63
107
|
}
|
|
64
108
|
},
|
|
65
109
|
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const CFError = require('cf-errors');
|
|
2
|
+
const _ = require('lodash');
|
|
3
|
+
const Command = require('../../Command');
|
|
4
|
+
const assignRoot = require('../root/assign.cmd');
|
|
5
|
+
const { crudFilenameOption } = require('../../helpers/general');
|
|
6
|
+
const { sdk } = require('../../../../logic');
|
|
7
|
+
|
|
8
|
+
const command = new Command({
|
|
9
|
+
command: 'system-runtime-environments <name> <accounts..>',
|
|
10
|
+
aliases: ['sys-re', 'system-runtime-environment'],
|
|
11
|
+
parent: assignRoot,
|
|
12
|
+
description: 'Assign system-runtime-environments to accounts',
|
|
13
|
+
onPremCommand: true,
|
|
14
|
+
usage: 'Use assign to add runtime environments to accounts by their name or id',
|
|
15
|
+
webDocs: {
|
|
16
|
+
title: 'Assign System Runtime-Environments',
|
|
17
|
+
weight: 90,
|
|
18
|
+
},
|
|
19
|
+
builder: (yargs) => {
|
|
20
|
+
crudFilenameOption(yargs);
|
|
21
|
+
return yargs
|
|
22
|
+
.positional('name', {
|
|
23
|
+
describe: 'Runtime environments name',
|
|
24
|
+
required: true,
|
|
25
|
+
})
|
|
26
|
+
.positional('accounts', {
|
|
27
|
+
describe: 'Accounts names',
|
|
28
|
+
type: Array,
|
|
29
|
+
required: true,
|
|
30
|
+
})
|
|
31
|
+
.example(
|
|
32
|
+
'codefresh assign sys-re my-sys-re acc1 acc2',
|
|
33
|
+
'Add system runtime enviroment "my-sys-re" to accounts acc1 and acc2' ,
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
handler: async (argv) => {
|
|
37
|
+
const { name, accounts: accountsNames } = argv;
|
|
38
|
+
const accounts = await sdk.accounts.listAccounts({ name: accountsNames });
|
|
39
|
+
const nonExistentAccounts = _.difference(accountsNames, accounts.map((a) => a.name));
|
|
40
|
+
if (!_.isEmpty(nonExistentAccounts)) {
|
|
41
|
+
throw new CFError({
|
|
42
|
+
message: `Accounts do not exist: ${nonExistentAccounts}`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const accountIds = accounts.map((a) => a.id);
|
|
46
|
+
await sdk.onPrem.runtimeEnvs.account.modify({ name }, { accounts: accountIds });
|
|
47
|
+
console.log(`Successfully assigned "${name}" to accounts: ${accountsNames}`);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
module.exports = command;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const CFError = require('cf-errors');
|
|
2
|
+
const _ = require('lodash');
|
|
3
|
+
const Command = require('../../Command');
|
|
4
|
+
const unassignRoot = require('../root/unassign.cmd');
|
|
5
|
+
const { crudFilenameOption } = require('../../helpers/general');
|
|
6
|
+
const { sdk } = require('../../../../logic');
|
|
7
|
+
|
|
8
|
+
const command = new Command({
|
|
9
|
+
command: 'system-runtime-environments <name> <accounts..>',
|
|
10
|
+
aliases: ['sys-re', 'system-runtime-environment'],
|
|
11
|
+
parent: unassignRoot,
|
|
12
|
+
description: 'Unassign system-runtime-environments from accounts',
|
|
13
|
+
onPremCommand: true,
|
|
14
|
+
usage: 'Use unassign to remove runtime environments from accounts by their name or id',
|
|
15
|
+
webDocs: {
|
|
16
|
+
title: 'Unassign System Runtime-Environments',
|
|
17
|
+
weight: 90,
|
|
18
|
+
},
|
|
19
|
+
builder: (yargs) => {
|
|
20
|
+
crudFilenameOption(yargs);
|
|
21
|
+
return yargs
|
|
22
|
+
.positional('name', {
|
|
23
|
+
describe: 'Runtime environment name',
|
|
24
|
+
required: true,
|
|
25
|
+
})
|
|
26
|
+
.positional('accounts', {
|
|
27
|
+
describe: 'Accounts names',
|
|
28
|
+
type: Array,
|
|
29
|
+
required: true,
|
|
30
|
+
})
|
|
31
|
+
.example(
|
|
32
|
+
'codefresh unassign sys-re my-sys-re acc1 acc2',
|
|
33
|
+
'Remove system runtime enviroment "my-sys-re" from accounts acc1 and acc2',
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
handler: async (argv) => {
|
|
37
|
+
const { name, accounts: accountsNames } = argv;
|
|
38
|
+
const accounts = await sdk.accounts.listAccounts({ name: accountsNames });
|
|
39
|
+
const nonExistentAccounts = _.difference(accountsNames, accounts.map((a) => a.name));
|
|
40
|
+
if (!_.isEmpty(nonExistentAccounts)) {
|
|
41
|
+
throw new CFError({
|
|
42
|
+
message: `Accounts do not exist: ${nonExistentAccounts}`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const accountIds = accounts.map((a) => a.id);
|
|
46
|
+
await sdk.onPrem.runtimeEnvs.account.delete({ name }, { accounts: accountIds });
|
|
47
|
+
console.log(`Successfully removed "${name}" from accounts: ${accountsNames}`);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
module.exports = command;
|
|
@@ -9,10 +9,10 @@ const command = new Command({
|
|
|
9
9
|
command: 'trigger [event-uri] [pipeline]',
|
|
10
10
|
aliases: ['t'],
|
|
11
11
|
parent: createRoot,
|
|
12
|
-
description: 'Create trigger: link pipeline to `trigger-event
|
|
12
|
+
description: '[Deprecated] Create trigger: link pipeline to `trigger-event`. Deprecated - please use pipeline spec to manager cron trigger',
|
|
13
13
|
webDocs: {
|
|
14
14
|
category: 'Triggers',
|
|
15
|
-
title: 'Create Pipeline Trigger',
|
|
15
|
+
title: '[Deprecated] Create Pipeline Trigger',
|
|
16
16
|
weight: 5,
|
|
17
17
|
},
|
|
18
18
|
builder: (yargs) => {
|
|
@@ -11,7 +11,7 @@ const command = new Command({
|
|
|
11
11
|
description: 'Delete trigger: unlink pipeline from `trigger-event`',
|
|
12
12
|
webDocs: {
|
|
13
13
|
category: 'Triggers',
|
|
14
|
-
title: 'Delete Pipeline Trigger',
|
|
14
|
+
title: '[Deprecated] Delete Pipeline Trigger. Deprecated - please use pipeline spec to manager cron trigger',
|
|
15
15
|
weight: 20,
|
|
16
16
|
},
|
|
17
17
|
builder: (yargs) => {
|
|
@@ -9,10 +9,10 @@ const command = new Command({
|
|
|
9
9
|
command: 'trigger-event',
|
|
10
10
|
aliases: ['te'],
|
|
11
11
|
parent: createRoot,
|
|
12
|
-
description: 'Create new `trigger-event
|
|
12
|
+
description: '[Deprecated] Create new `trigger-event`. Deprecated - please use pipeline spec to manager cron trigger',
|
|
13
13
|
webDocs: {
|
|
14
14
|
category: 'Triggers',
|
|
15
|
-
title: 'Create Trigger Event',
|
|
15
|
+
title: '[Deprecated] Create Trigger Event',
|
|
16
16
|
},
|
|
17
17
|
builder: (yargs) => {
|
|
18
18
|
yargs
|
|
@@ -8,10 +8,10 @@ const command = new Command({
|
|
|
8
8
|
command: 'trigger-event [event-uri]',
|
|
9
9
|
aliases: ['te'],
|
|
10
10
|
parent: deleteRoot,
|
|
11
|
-
description: 'Delete `trigger-event
|
|
11
|
+
description: '[Deprecated] Delete `trigger-event`. Deprecated - please use pipeline spec to manager cron trigger',
|
|
12
12
|
webDocs: {
|
|
13
13
|
category: 'Triggers',
|
|
14
|
-
title: 'Delete Trigger Event',
|
|
14
|
+
title: '[Deprecated] Delete Trigger Event',
|
|
15
15
|
},
|
|
16
16
|
builder: (yargs) => {
|
|
17
17
|
yargs
|
|
@@ -11,10 +11,10 @@ const command = new Command({
|
|
|
11
11
|
command: 'trigger-events [event-uri]',
|
|
12
12
|
aliases: ['trigger-event', 'te'],
|
|
13
13
|
parent: getRoot,
|
|
14
|
-
description: 'Get `trigger-event
|
|
14
|
+
description: '[Deprecated] Get `trigger-event`. Deprecated - please use pipeline spec to manager cron trigger',
|
|
15
15
|
webDocs: {
|
|
16
16
|
category: 'Triggers',
|
|
17
|
-
title: 'Get Trigger Event',
|
|
17
|
+
title: '[Deprecated] Get Trigger Event',
|
|
18
18
|
},
|
|
19
19
|
builder: (yargs) => {
|
|
20
20
|
yargs
|
|
@@ -10,11 +10,11 @@ const command = new Command({
|
|
|
10
10
|
command: 'triggers',
|
|
11
11
|
aliases: ['trigger', 't'],
|
|
12
12
|
parent: getRoot,
|
|
13
|
-
description: 'Get triggers, optionally filtered by pipeline or event.',
|
|
13
|
+
description: '[Deprecated] Get triggers, optionally filtered by pipeline or event. Deprecated - please use pipeline spec to manager cron triggers',
|
|
14
14
|
usage: 'Only cron/registry triggers are supported (for git triggers use `codefresh get pip <pip-name> -o json`)',
|
|
15
15
|
webDocs: {
|
|
16
16
|
category: 'Triggers',
|
|
17
|
-
title: 'Get Triggers',
|
|
17
|
+
title: '[Deprecated] Get Triggers',
|
|
18
18
|
},
|
|
19
19
|
builder: (yargs) => {
|
|
20
20
|
yargs
|
|
@@ -11,10 +11,10 @@ const command = new Command({
|
|
|
11
11
|
command: 'trigger-types',
|
|
12
12
|
aliases: ['trigger-type', 'tt'],
|
|
13
13
|
parent: getRoot,
|
|
14
|
-
description: 'Get a list of available trigger-types',
|
|
14
|
+
description: '[Deprecated] Get a list of available trigger-types. Deprecated - please use pipeline spec to manager cron trigger',
|
|
15
15
|
webDocs: {
|
|
16
16
|
category: 'Triggers',
|
|
17
|
-
title: 'Get Trigger Types',
|
|
17
|
+
title: '[Deprecated] Get Trigger Types',
|
|
18
18
|
},
|
|
19
19
|
builder: (yargs) => {
|
|
20
20
|
yargs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"codefresh":{"analyze":{},"completion":{},"completions":{"alias":"completion"},"tag":{},"untag":{},"offline-logs":{"ensure-index":{},"offload-to-collection":{},"offload-to-file":{}},"run":{"__optionHandlers":["../commands/pipeline/run.completion.js"]},"add":{"repository":{},"repo":{"alias":"repository"}},"annotate":{"image":{},"img":{"alias":"image"}},"patch":{"__optionHandlers":["../commands/root/apply.completion.js"],"agent":{"__optionHandlers":["../commands/root/apply.completion.js"]},"board":{"__optionHandlers":["../commands/root/apply.completion.js"]},"project":{"__optionHandlers":["../commands/root/apply.completion.js"]},"runtime-environments":{"__optionHandlers":["../commands/root/apply.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/apply.completion.js"]},"system-runtime-environments":{"__optionHandlers":["../commands/root/apply.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/apply.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/apply.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/apply.completion.js"]},"context":{"__optionHandlers":["../commands/root/apply.completion.js"]},"ctx":{"alias":"context"}},"auth":{"create-context":{},"current-context":{},"get-contexts":{},"use-context":{}},"components":{"download":{},"update":{}},"create":{"__optionHandlers":["../commands/root/create.completion.js"],"agent":{"__optionHandlers":["../commands/root/create.completion.js"]},"clusters":{"__optionHandlers":["../commands/root/create.completion.js"]},"cluster":{"alias":"clusters"},"annotation":{"__optionHandlers":["../commands/root/create.completion.js"]},"board":{"__optionHandlers":["../commands/root/create.completion.js"]},"composition":{"__optionHandlers":["../commands/composition/create.completion.js","../commands/root/create.completion.js"]},"com":{"alias":"composition"},"project":{"__optionHandlers":["../commands/root/create.completion.js"]},"runtime-environments":{"__optionHandlers":["../commands/root/create.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/create.completion.js"]},"teams":{"__optionHandlers":["../commands/root/create.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"token":{"__optionHandlers":["../commands/root/create.completion.js"]},"helm-repo":{"__optionHandlers":["../commands/root/create.completion.js"]},"registry":{"__optionHandlers":["../commands/root/create.completion.js"],"standard":{"__optionHandlers":["../commands/root/create.completion.js"]}},"trigger":{"__optionHandlers":["../commands/root/create.completion.js"]},"t":{"alias":"trigger"},"trigger-event":{"__optionHandlers":["../commands/root/create.completion.js"]},"te":{"alias":"trigger-event"},"workflow-data-item":{"__optionHandlers":["../commands/root/create.completion.js"]},"wdi":{"alias":"workflow-data-item"},"context":{"__optionHandlers":["../commands/root/create.completion.js"],"config":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret-yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"git":{"__optionHandlers":["../commands/root/create.completion.js"],"bitbucket":{"__optionHandlers":["../commands/root/create.completion.js"]},"github":{"__optionHandlers":["../commands/root/create.completion.js"]},"gitlab":{"__optionHandlers":["../commands/root/create.completion.js"]},"stash":{"__optionHandlers":["../commands/root/create.completion.js"]}},"helm-repository":{"__optionHandlers":["../commands/root/create.completion.js"],"http":{"__optionHandlers":["../commands/root/create.completion.js"]},"s3":{"__optionHandlers":["../commands/root/create.completion.js"]}},"secret-store":{"__optionHandlers":["../commands/root/create.completion.js"],"hashicorp-vault":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes-runtime":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes":{"__optionHandlers":["../commands/root/create.completion.js"]}}},"ctx":{"alias":"context","config":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret-yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"git":{"__optionHandlers":["../commands/root/create.completion.js"],"bitbucket":{"__optionHandlers":["../commands/root/create.completion.js"]},"github":{"__optionHandlers":["../commands/root/create.completion.js"]},"gitlab":{"__optionHandlers":["../commands/root/create.completion.js"]},"stash":{"__optionHandlers":["../commands/root/create.completion.js"]}},"helm-repository":{"__optionHandlers":["../commands/root/create.completion.js"],"http":{"__optionHandlers":["../commands/root/create.completion.js"]},"s3":{"__optionHandlers":["../commands/root/create.completion.js"]}},"secret-store":{"__optionHandlers":["../commands/root/create.completion.js"],"hashicorp-vault":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes-runtime":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes":{"__optionHandlers":["../commands/root/create.completion.js"]}}}},"delete":{"__optionHandlers":["../commands/root/delete.completion.js"],"agent":{"__optionHandlers":["../commands/root/delete.completion.js"]},"annotation":{"__optionHandlers":["../commands/root/delete.completion.js"]},"board":{"__optionHandlers":["../commands/root/delete.completion.js"]},"cluster":{"__optionHandlers":["../commands/root/delete.completion.js"]},"clusters":{"alias":"cluster"},"composition":{"__optionHandlers":["../commands/root/delete.completion.js"]},"com":{"alias":"composition"},"environment":{"__optionHandlers":["../commands/root/delete.completion.js"]},"env":{"alias":"environment"},"pipeline":{"__optionHandlers":["../commands/root/delete.completion.js"]},"pip":{"alias":"pipeline"},"project":{"__optionHandlers":["../commands/root/delete.completion.js"]},"repository":{"__optionHandlers":["../commands/root/delete.completion.js"]},"repo":{"alias":"repository"},"runtime-environments":{"__optionHandlers":["../commands/root/delete.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/delete.completion.js"]},"step-type":{"__optionHandlers":["../commands/root/delete.completion.js"]},"system-runtime-environments":{"__optionHandlers":["../commands/root/delete.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/delete.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/delete.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/delete.completion.js"]},"registry":{"__optionHandlers":["../commands/root/delete.completion.js"]},"trigger":{"__optionHandlers":["../commands/root/delete.completion.js"]},"t":{"alias":"trigger"},"trigger-event":{"__optionHandlers":["../commands/root/delete.completion.js"]},"te":{"alias":"trigger-event"},"context":{"__optionHandlers":["../commands/root/delete.completion.js"]},"ctx":{"alias":"context"}},"diff":{"__optionHandlers":["../commands/root/diff.completion.js"],"runtime-environments":{"__optionHandlers":["../commands/root/diff.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"system-runtime-environments":{"__optionHandlers":["../commands/root/diff.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"}},"download":{"audit":{}},"generate":{"image-pull-secret":{}},"get":{"__optionHandlers":["../commands/root/get.completion.js"],"runtime-environment-base-images":{"__optionHandlers":["../commands/root/get.completion.js"]},"re-base-images":{"alias":"runtime-environment-base-images"},"agents":{"__optionHandlers":["../commands/root/get.completion.js"]},"agent":{"alias":"agents"},"annotation":{"__optionHandlers":["../commands/root/get.completion.js"]},"boards":{"__optionHandlers":["../commands/root/get.completion.js"]},"board":{"alias":"boards"},"clusters":{"__optionHandlers":["../commands/root/get.completion.js"]},"cluster":{"alias":"clusters"},"compositions":{"__optionHandlers":["../commands/root/get.completion.js"]},"com":{"alias":"compositions"},"composition":{"alias":"compositions"},"environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"env":{"alias":"environments"},"environment":{"alias":"environments"},"images":{"__optionHandlers":["../commands/root/get.completion.js"]},"img":{"alias":"images"},"image":{"alias":"images"},"pipelines":{"__positionalHandler":"../commands/pipeline/get.completion.js","__optionHandlers":["../commands/root/get.completion.js"]},"pip":{"alias":"pipelines"},"pipeline":{"alias":"pipelines"},"projects":{"__optionHandlers":["../commands/root/get.completion.js"]},"project":{"alias":"projects"},"repository":{"__optionHandlers":["../commands/root/get.completion.js"]},"repo":{"alias":"repository"},"runtime-environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"sections":{"__optionHandlers":["../commands/root/get.completion.js"]},"section":{"alias":"sections"},"step-types":{"__positionalHandler":"../commands/step/get.completion.js","__optionHandlers":["../commands/root/get.completion.js"]},"step-type":{"alias":"step-types"},"system-runtime-environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/get.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/get.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/get.completion.js"]},"registry":{"__optionHandlers":["../commands/root/get.completion.js"]},"triggers":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger":{"alias":"triggers"},"t":{"alias":"triggers"},"trigger-events":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger-event":{"alias":"trigger-events"},"te":{"alias":"trigger-events"},"trigger-types":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger-type":{"alias":"trigger-types"},"tt":{"alias":"trigger-types"},"builds":{"__optionHandlers":["../commands/root/get.completion.js"]},"build":{"alias":"builds"},"workflow-data-item":{"__optionHandlers":["../commands/root/get.completion.js"]},"wdi":{"alias":"workflow-data-item"},"contexts":{"__optionHandlers":["../commands/root/get.completion.js"]},"ctx":{"alias":"contexts"},"context":{"alias":"contexts"}},"install":{"runtime":{},"agent":{},"app-proxy":{},"monitor":{},"gitops":{}},"replace":{"__optionHandlers":["../commands/root/replace.completion.js"],"composition":{"__optionHandlers":["../commands/composition/replace.completion.js","../commands/root/replace.completion.js"]},"com":{"alias":"composition"}},"runner":{"delete":{},"execute-test-pipeline":{},"info":{},"init":{},"upgrade":{}},"synchronize":{"teams":{},"team":{"alias":"teams"},"tm":{"alias":"teams"}},"uninstall":{"agent":{},"app-proxy":{},"runtime":{},"monitor":{},"gitops":{}},"upgrade":{"app-proxy":{},"gitops":{}},"validate":{"__positionalHandler":"../commands/root/validate.completion.js"},"version":{},"attach":{},"cli-config":{"get":{},"help":{},"profile":{},"set":{}},"set-helm-config":{},"install-chart":{},"helm-promotion":{},"delete-release":{},"rollback-release":{},"test-release":{},"approve":{},"deny":{},"logs":{},"restart":{},"terminate":{},"wait":{}}}
|
|
1
|
+
{"codefresh":{"analyze":{},"completion":{},"completions":{"alias":"completion"},"tag":{},"untag":{},"offline-logs":{"ensure-index":{},"offload-to-collection":{},"offload-to-file":{}},"run":{"__optionHandlers":["../commands/pipeline/run.completion.js"]},"attach":{},"add":{"repository":{},"repo":{"alias":"repository"}},"annotate":{"image":{},"img":{"alias":"image"}},"patch":{"__optionHandlers":["../commands/root/apply.completion.js"],"agent":{"__optionHandlers":["../commands/root/apply.completion.js"]},"board":{"__optionHandlers":["../commands/root/apply.completion.js"]},"project":{"__optionHandlers":["../commands/root/apply.completion.js"]},"runtime-environments":{"__optionHandlers":["../commands/root/apply.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/apply.completion.js"]},"system-runtime-environments":{"__optionHandlers":["../commands/root/apply.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/apply.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/apply.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/apply.completion.js"]},"context":{"__optionHandlers":["../commands/root/apply.completion.js"]},"ctx":{"alias":"context"}},"assign":{"system-runtime-environments":{},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"}},"auth":{"create-context":{},"current-context":{},"get-contexts":{},"use-context":{}},"components":{"download":{},"update":{}},"create":{"__optionHandlers":["../commands/root/create.completion.js"],"agent":{"__optionHandlers":["../commands/root/create.completion.js"]},"clusters":{"__optionHandlers":["../commands/root/create.completion.js"]},"cluster":{"alias":"clusters"},"annotation":{"__optionHandlers":["../commands/root/create.completion.js"]},"board":{"__optionHandlers":["../commands/root/create.completion.js"]},"composition":{"__optionHandlers":["../commands/composition/create.completion.js","../commands/root/create.completion.js"]},"com":{"alias":"composition"},"project":{"__optionHandlers":["../commands/root/create.completion.js"]},"runtime-environments":{"__optionHandlers":["../commands/root/create.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/create.completion.js"]},"teams":{"__optionHandlers":["../commands/root/create.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"token":{"__optionHandlers":["../commands/root/create.completion.js"]},"helm-repo":{"__optionHandlers":["../commands/root/create.completion.js"]},"registry":{"__optionHandlers":["../commands/root/create.completion.js"],"standard":{"__optionHandlers":["../commands/root/create.completion.js"]}},"trigger":{"__optionHandlers":["../commands/root/create.completion.js"]},"t":{"alias":"trigger"},"trigger-event":{"__optionHandlers":["../commands/root/create.completion.js"]},"te":{"alias":"trigger-event"},"workflow-data-item":{"__optionHandlers":["../commands/root/create.completion.js"]},"wdi":{"alias":"workflow-data-item"},"context":{"__optionHandlers":["../commands/root/create.completion.js"],"config":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret-yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"git":{"__optionHandlers":["../commands/root/create.completion.js"],"bitbucket":{"__optionHandlers":["../commands/root/create.completion.js"]},"github":{"__optionHandlers":["../commands/root/create.completion.js"]},"gitlab":{"__optionHandlers":["../commands/root/create.completion.js"]},"stash":{"__optionHandlers":["../commands/root/create.completion.js"]}},"helm-repository":{"__optionHandlers":["../commands/root/create.completion.js"],"http":{"__optionHandlers":["../commands/root/create.completion.js"]},"s3":{"__optionHandlers":["../commands/root/create.completion.js"]}},"secret-store":{"__optionHandlers":["../commands/root/create.completion.js"],"hashicorp-vault":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes-runtime":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes":{"__optionHandlers":["../commands/root/create.completion.js"]}}},"ctx":{"alias":"context","config":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret":{"__optionHandlers":["../commands/root/create.completion.js"]},"secret-yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"yaml":{"__optionHandlers":["../commands/root/create.completion.js"]},"git":{"__optionHandlers":["../commands/root/create.completion.js"],"bitbucket":{"__optionHandlers":["../commands/root/create.completion.js"]},"github":{"__optionHandlers":["../commands/root/create.completion.js"]},"gitlab":{"__optionHandlers":["../commands/root/create.completion.js"]},"stash":{"__optionHandlers":["../commands/root/create.completion.js"]}},"helm-repository":{"__optionHandlers":["../commands/root/create.completion.js"],"http":{"__optionHandlers":["../commands/root/create.completion.js"]},"s3":{"__optionHandlers":["../commands/root/create.completion.js"]}},"secret-store":{"__optionHandlers":["../commands/root/create.completion.js"],"hashicorp-vault":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes-runtime":{"__optionHandlers":["../commands/root/create.completion.js"]},"kubernetes":{"__optionHandlers":["../commands/root/create.completion.js"]}}}},"delete":{"__optionHandlers":["../commands/root/delete.completion.js"],"agent":{"__optionHandlers":["../commands/root/delete.completion.js"]},"annotation":{"__optionHandlers":["../commands/root/delete.completion.js"]},"board":{"__optionHandlers":["../commands/root/delete.completion.js"]},"cluster":{"__optionHandlers":["../commands/root/delete.completion.js"]},"clusters":{"alias":"cluster"},"composition":{"__optionHandlers":["../commands/root/delete.completion.js"]},"com":{"alias":"composition"},"environment":{"__optionHandlers":["../commands/root/delete.completion.js"]},"env":{"alias":"environment"},"pipeline":{"__optionHandlers":["../commands/root/delete.completion.js"]},"pip":{"alias":"pipeline"},"project":{"__optionHandlers":["../commands/root/delete.completion.js"]},"repository":{"__optionHandlers":["../commands/root/delete.completion.js"]},"repo":{"alias":"repository"},"runtime-environments":{"__optionHandlers":["../commands/root/delete.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"section":{"__optionHandlers":["../commands/root/delete.completion.js"]},"step-type":{"__optionHandlers":["../commands/root/delete.completion.js"]},"system-runtime-environments":{"__optionHandlers":["../commands/root/delete.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/delete.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/delete.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/delete.completion.js"]},"registry":{"__optionHandlers":["../commands/root/delete.completion.js"]},"trigger":{"__optionHandlers":["../commands/root/delete.completion.js"]},"t":{"alias":"trigger"},"trigger-event":{"__optionHandlers":["../commands/root/delete.completion.js"]},"te":{"alias":"trigger-event"},"context":{"__optionHandlers":["../commands/root/delete.completion.js"]},"ctx":{"alias":"context"}},"diff":{"__optionHandlers":["../commands/root/diff.completion.js"],"runtime-environments":{"__optionHandlers":["../commands/root/diff.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"system-runtime-environments":{"__optionHandlers":["../commands/root/diff.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"}},"download":{"audit":{}},"generate":{"image-pull-secret":{}},"get":{"__optionHandlers":["../commands/root/get.completion.js"],"runtime-environment-base-images":{"__optionHandlers":["../commands/root/get.completion.js"]},"re-base-images":{"alias":"runtime-environment-base-images"},"agents":{"__optionHandlers":["../commands/root/get.completion.js"]},"agent":{"alias":"agents"},"annotation":{"__optionHandlers":["../commands/root/get.completion.js"]},"boards":{"__optionHandlers":["../commands/root/get.completion.js"]},"board":{"alias":"boards"},"clusters":{"__optionHandlers":["../commands/root/get.completion.js"]},"cluster":{"alias":"clusters"},"compositions":{"__optionHandlers":["../commands/root/get.completion.js"]},"com":{"alias":"compositions"},"composition":{"alias":"compositions"},"environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"env":{"alias":"environments"},"environment":{"alias":"environments"},"images":{"__optionHandlers":["../commands/root/get.completion.js"]},"img":{"alias":"images"},"image":{"alias":"images"},"pipelines":{"__positionalHandler":"../commands/pipeline/get.completion.js","__optionHandlers":["../commands/root/get.completion.js"]},"pip":{"alias":"pipelines"},"pipeline":{"alias":"pipelines"},"projects":{"__optionHandlers":["../commands/root/get.completion.js"]},"project":{"alias":"projects"},"repository":{"__optionHandlers":["../commands/root/get.completion.js"]},"repo":{"alias":"repository"},"runtime-environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"re":{"alias":"runtime-environments"},"runtime-environment":{"alias":"runtime-environments"},"sections":{"__optionHandlers":["../commands/root/get.completion.js"]},"section":{"alias":"sections"},"step-types":{"__positionalHandler":"../commands/step/get.completion.js","__optionHandlers":["../commands/root/get.completion.js"]},"step-type":{"alias":"step-types"},"system-runtime-environments":{"__optionHandlers":["../commands/root/get.completion.js"]},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"},"teams":{"__optionHandlers":["../commands/root/get.completion.js"]},"team":{"alias":"teams"},"tm":{"alias":"teams"},"tokens":{"__optionHandlers":["../commands/root/get.completion.js"]},"token":{"alias":"tokens"},"helm-repo":{"__optionHandlers":["../commands/root/get.completion.js"]},"registry":{"__optionHandlers":["../commands/root/get.completion.js"]},"triggers":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger":{"alias":"triggers"},"t":{"alias":"triggers"},"trigger-events":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger-event":{"alias":"trigger-events"},"te":{"alias":"trigger-events"},"trigger-types":{"__optionHandlers":["../commands/root/get.completion.js"]},"trigger-type":{"alias":"trigger-types"},"tt":{"alias":"trigger-types"},"builds":{"__optionHandlers":["../commands/root/get.completion.js"]},"build":{"alias":"builds"},"workflow-data-item":{"__optionHandlers":["../commands/root/get.completion.js"]},"wdi":{"alias":"workflow-data-item"},"contexts":{"__optionHandlers":["../commands/root/get.completion.js"]},"ctx":{"alias":"contexts"},"context":{"alias":"contexts"}},"install":{"runtime":{},"agent":{},"app-proxy":{},"monitor":{},"gitops":{}},"replace":{"__optionHandlers":["../commands/root/replace.completion.js"],"composition":{"__optionHandlers":["../commands/composition/replace.completion.js","../commands/root/replace.completion.js"]},"com":{"alias":"composition"}},"runner":{"delete":{},"execute-test-pipeline":{},"info":{},"init":{},"upgrade":{}},"synchronize":{"teams":{},"team":{"alias":"teams"},"tm":{"alias":"teams"}},"unassign":{"system-runtime-environments":{},"sys-re":{"alias":"system-runtime-environments"},"system-runtime-environment":{"alias":"system-runtime-environments"}},"uninstall":{"agent":{},"app-proxy":{},"runtime":{},"monitor":{},"gitops":{}},"upgrade":{"app-proxy":{},"gitops":{}},"validate":{"__positionalHandler":"../commands/root/validate.completion.js"},"version":{},"cli-config":{"get":{},"help":{},"profile":{},"set":{}},"set-helm-config":{},"install-chart":{},"helm-promotion":{},"delete-release":{},"rollback-release":{},"test-release":{},"approve":{},"deny":{},"logs":{},"restart":{},"terminate":{},"wait":{}}}
|
package/openapi.json
CHANGED
|
@@ -1036,7 +1036,30 @@
|
|
|
1036
1036
|
"description": "get all the accounts in the system",
|
|
1037
1037
|
"operationId": "accounts-list-accounts",
|
|
1038
1038
|
"summary": "List accounts",
|
|
1039
|
-
"parameters": [
|
|
1039
|
+
"parameters": [
|
|
1040
|
+
{
|
|
1041
|
+
"name": "name",
|
|
1042
|
+
"in": "query",
|
|
1043
|
+
"required": false,
|
|
1044
|
+
"schema": {
|
|
1045
|
+
"type": "array",
|
|
1046
|
+
"items": {
|
|
1047
|
+
"type": "string"
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"name": "_id",
|
|
1053
|
+
"in": "query",
|
|
1054
|
+
"required": false,
|
|
1055
|
+
"schema": {
|
|
1056
|
+
"type": "array",
|
|
1057
|
+
"items": {
|
|
1058
|
+
"type": "string"
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
],
|
|
1040
1063
|
"x-sdk-interface": "accounts.listAccounts"
|
|
1041
1064
|
},
|
|
1042
1065
|
"post": {
|
|
@@ -1318,6 +1341,82 @@
|
|
|
1318
1341
|
"x-sdk-interface": "onPrem.runtimeEnvs.account.list"
|
|
1319
1342
|
}
|
|
1320
1343
|
},
|
|
1344
|
+
"/admin/runtime-environments/account/modify/{name}": {
|
|
1345
|
+
"put": {
|
|
1346
|
+
"x-action": "addRuntimeEnvToAccountByAdmin",
|
|
1347
|
+
"x-entityId": {
|
|
1348
|
+
"pathName": "params.name"
|
|
1349
|
+
},
|
|
1350
|
+
"requestBody": {
|
|
1351
|
+
"content": {
|
|
1352
|
+
"application/json": {
|
|
1353
|
+
"schema": {
|
|
1354
|
+
"type": "object"
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
"responses": {
|
|
1360
|
+
"200": {
|
|
1361
|
+
"$ref": "#/components/responses/Json"
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"tags": [
|
|
1365
|
+
"onPrem.runtimeEnvs.account"
|
|
1366
|
+
],
|
|
1367
|
+
"operationId": "onPrem-runtimeEnvs-account-modify",
|
|
1368
|
+
"parameters": [
|
|
1369
|
+
{
|
|
1370
|
+
"in": "path",
|
|
1371
|
+
"name": "name",
|
|
1372
|
+
"schema": {
|
|
1373
|
+
"type": "string"
|
|
1374
|
+
},
|
|
1375
|
+
"required": true,
|
|
1376
|
+
"description": "Runtime environment name"
|
|
1377
|
+
}
|
|
1378
|
+
],
|
|
1379
|
+
"summary": "Add to account",
|
|
1380
|
+
"x-sdk-interface": "onPrem.runtimeEnvs.account.modify"
|
|
1381
|
+
},
|
|
1382
|
+
"delete": {
|
|
1383
|
+
"x-action": "removeRuntimeEnvFromAccountByAdmin",
|
|
1384
|
+
"x-entityId": {
|
|
1385
|
+
"pathName": "params.name"
|
|
1386
|
+
},
|
|
1387
|
+
"requestBody": {
|
|
1388
|
+
"content": {
|
|
1389
|
+
"application/json": {
|
|
1390
|
+
"schema": {
|
|
1391
|
+
"type": "object"
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
"responses": {
|
|
1397
|
+
"200": {
|
|
1398
|
+
"$ref": "#/components/responses/Json"
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
"tags": [
|
|
1402
|
+
"onPrem.runtimeEnvs.account"
|
|
1403
|
+
],
|
|
1404
|
+
"operationId": "onPrem-runtimeEnvs-account-delete",
|
|
1405
|
+
"parameters": [
|
|
1406
|
+
{
|
|
1407
|
+
"in": "path",
|
|
1408
|
+
"name": "name",
|
|
1409
|
+
"schema": {
|
|
1410
|
+
"type": "string"
|
|
1411
|
+
},
|
|
1412
|
+
"required": true,
|
|
1413
|
+
"description": "Runtime environment name"
|
|
1414
|
+
}
|
|
1415
|
+
],
|
|
1416
|
+
"summary": "Delete for account",
|
|
1417
|
+
"x-sdk-interface": "onPrem.runtimeEnvs.account.delete"
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1321
1420
|
"/admin/runtime-environments/default/{plan}/{name}": {
|
|
1322
1421
|
"put": {
|
|
1323
1422
|
"responses": {
|
|
@@ -8408,6 +8507,18 @@
|
|
|
8408
8507
|
}
|
|
8409
8508
|
},
|
|
8410
8509
|
"components": {
|
|
8510
|
+
"responses": {
|
|
8511
|
+
"Json": {
|
|
8512
|
+
"content": {
|
|
8513
|
+
"application/json": {
|
|
8514
|
+
"schema": {
|
|
8515
|
+
"$ref": "#/components/schemas/Json"
|
|
8516
|
+
}
|
|
8517
|
+
}
|
|
8518
|
+
},
|
|
8519
|
+
"description": "json"
|
|
8520
|
+
}
|
|
8521
|
+
},
|
|
8411
8522
|
"parameters": {
|
|
8412
8523
|
"accountName": {
|
|
8413
8524
|
"in": "path",
|
|
@@ -8523,6 +8634,9 @@
|
|
|
8523
8634
|
}
|
|
8524
8635
|
}
|
|
8525
8636
|
}
|
|
8637
|
+
},
|
|
8638
|
+
"Json": {
|
|
8639
|
+
"type": "object"
|
|
8526
8640
|
}
|
|
8527
8641
|
},
|
|
8528
8642
|
"requestBodies": {
|
|
@@ -8669,7 +8783,7 @@
|
|
|
8669
8783
|
"content": {
|
|
8670
8784
|
"application/json": {
|
|
8671
8785
|
"schema": {
|
|
8672
|
-
"$ref": "#/components/schemas/
|
|
8786
|
+
"$ref": "#/components/schemas/Json"
|
|
8673
8787
|
}
|
|
8674
8788
|
}
|
|
8675
8789
|
}
|
package/package.json
CHANGED