@adinsure-ops/ops-cli 4.0.0-rc9 → 4.2.0
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/CHANGELOGS.md +9 -0
- package/README.md +23 -13
- package/lib/commands/download/studio.js +3 -0
- package/lib/commands/gitlab/get-tag-pipeline.d.ts +23 -0
- package/lib/commands/gitlab/get-tag-pipeline.js +143 -0
- package/lib/commands/gitlab/next-nightly-tag.d.ts +1 -10
- package/lib/commands/gitlab/next-nightly-tag.js +34 -74
- package/lib/lib/gitlab.d.ts +17 -0
- package/lib/lib/gitlab.js +96 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/CHANGELOGS.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelogs
|
|
2
2
|
|
|
3
|
+
## 4.2.0: 2022-07-15
|
|
4
|
+
|
|
5
|
+
- added command `gitlab:get-tag-pipeline` to track pipeline status and wait for pipeline to finish
|
|
6
|
+
- added `--outputVersionOnly` to `gitlab:next-nightly-tag` to output only version
|
|
7
|
+
|
|
8
|
+
## 4.1.0: 2022-06-15
|
|
9
|
+
|
|
10
|
+
- `vsix` file is removed after installation when `-i` flag is used
|
|
11
|
+
|
|
3
12
|
## 4.0.0: 2021-05-31
|
|
4
13
|
|
|
5
14
|
- new auth options
|
package/README.md
CHANGED
|
@@ -2,22 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Operations CLI for supporting AdInsure development processes.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
4.0.0
|
|
5
|
+
https://www.npmjs.com/package/@adinsure-ops/ops-cli
|
|
8
6
|
|
|
9
7
|
## Install
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
For versions check [tags](https://git.adacta-fintech.com/ops/ops-cli/-/tags)
|
|
13
|
-
or [download a JSON](https://adinsure.blob.core.windows.net/ops-cli/version) containing version and other information.
|
|
14
|
-
|
|
15
|
-
| Platform| Link|
|
|
16
|
-
|:---|:---|
|
|
17
|
-
|Windows 64-bit|https://adinsure.blob.core.windows.net/ops-cli/win/ops-v4.0.0-x64.exe|
|
|
18
|
-
|Debian 64-bit |https://adinsure.blob.core.windows.net/ops-cli/deb/ops_4.0.0-1_amd64.deb|
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
`npm install -g @adinsure-ops/ops-cli`
|
|
21
10
|
|
|
22
11
|
## CLI development
|
|
23
12
|
|
|
@@ -45,6 +34,7 @@ You can run and debug commands directly from terminal by running `ops [command]`
|
|
|
45
34
|
* [`ops download:scheduler <flags>`](#ops-download-scheduler-flags)
|
|
46
35
|
* [`ops download:server <flags>`](#ops-download-server-flags)
|
|
47
36
|
* [`ops download:studio <flags>`](#ops-download-studio-flags)
|
|
37
|
+
* [`ops gitlab:get-tag-pipeline`](#ops-gitlab-get-tag-pipeline)
|
|
48
38
|
* [`ops gitlab:next-nightly-tag`](#ops-gitlab-next-nightly-tag)
|
|
49
39
|
* [`ops log <component> <issue> [options]`](#ops-log-component-issue-options)
|
|
50
40
|
* [`ops log:gen [options]`](#ops-loggen-options)
|
|
@@ -210,6 +200,26 @@ EXAMPLES
|
|
|
210
200
|
$ ops download:studio -v 15.0.0 -i
|
|
211
201
|
```
|
|
212
202
|
|
|
203
|
+
## `ops gitlab:get-tag-pipeline`
|
|
204
|
+
|
|
205
|
+
get pipeline status for tag
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
USAGE
|
|
209
|
+
$ ops gitlab:get-tag-pipeline <tag>
|
|
210
|
+
|
|
211
|
+
ARGUMENTS
|
|
212
|
+
TAG Tag
|
|
213
|
+
|
|
214
|
+
OPTIONS
|
|
215
|
+
--delay=delay [default: 5] Delay of check in seconds (defaults to 5 seconds)
|
|
216
|
+
--host=host (required) [default: https://git.adacta-fintech.com] Server hostname
|
|
217
|
+
--pat=pat (required) Token from user that has permissions to list and create tags
|
|
218
|
+
--project=project (required) [default: 413] Project ID
|
|
219
|
+
--timeout=timeout [default: 120] Timeout for wait command in seconds (defaults to 120 seconds)
|
|
220
|
+
--wait Wait for pipeline to finish
|
|
221
|
+
```
|
|
222
|
+
|
|
213
223
|
## `ops gitlab:next-nightly-tag`
|
|
214
224
|
|
|
215
225
|
creates new gitlab tag
|
|
@@ -46,6 +46,9 @@ class DownloadStudio extends command_base_1.default {
|
|
|
46
46
|
cli_ux_1.default.action.start(`Installing into VSCode`, undefined, { stdout: true });
|
|
47
47
|
await this.installExtension(filePath);
|
|
48
48
|
cli_ux_1.default.action.stop(`${chalk_1.default.green('Done')}`);
|
|
49
|
+
cli_ux_1.default.action.start(`Removing VSIX file`, undefined, { stdout: true });
|
|
50
|
+
fs.removeSync(filePath);
|
|
51
|
+
cli_ux_1.default.action.stop(`${chalk_1.default.green('Done')}`);
|
|
49
52
|
this.log(`${chalk_1.default.yellow('Use \'CRTL + SHIFT + P\' and select reload windows to apply this studio version.')}`);
|
|
50
53
|
}
|
|
51
54
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { flags } from '@oclif/command';
|
|
2
|
+
import CommandBase from '../../command.base';
|
|
3
|
+
import GitLab from '../../lib/gitlab';
|
|
4
|
+
export default class GitlabGetTagPipeline extends CommandBase {
|
|
5
|
+
static description: string;
|
|
6
|
+
static usage: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static args: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
static flags: {
|
|
14
|
+
pat: flags.IOptionFlag<string>;
|
|
15
|
+
host: flags.IOptionFlag<string>;
|
|
16
|
+
project: flags.IOptionFlag<string>;
|
|
17
|
+
wait: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
18
|
+
timeout: flags.IOptionFlag<string>;
|
|
19
|
+
delay: flags.IOptionFlag<string>;
|
|
20
|
+
};
|
|
21
|
+
waitPipelineStatus(gitlab: GitLab, tag: string, timeout: number, delay: number): Promise<string>;
|
|
22
|
+
run(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@oclif/command");
|
|
4
|
+
const chalk_1 = require("chalk");
|
|
5
|
+
const command_base_1 = require("../../command.base");
|
|
6
|
+
const gitlab_1 = require("../../lib/gitlab");
|
|
7
|
+
class GitlabGetTagPipeline extends command_base_1.default {
|
|
8
|
+
async waitPipelineStatus(gitlab, tag, timeout, delay) {
|
|
9
|
+
return new Promise(async (resolve, reject) => {
|
|
10
|
+
let time = 0;
|
|
11
|
+
try {
|
|
12
|
+
let status = await gitlab.getTagPipelineStatus(tag);
|
|
13
|
+
switch (status) {
|
|
14
|
+
case 'unknown': {
|
|
15
|
+
reject(new Error(`Pipeline or tag does not exist!`));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
case 'failed': {
|
|
19
|
+
reject(new Error(`Pipeline failed!`));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
case 'canceled': {
|
|
23
|
+
reject(new Error(`Pipeline canceled!`));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
case 'skipped': {
|
|
27
|
+
reject(new Error(`Pipeline skipped!`));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
case 'success': {
|
|
31
|
+
resolve(`Pipeline passed successfully!`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
reject(new Error(err.message));
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const interval = setInterval(async () => {
|
|
41
|
+
if (time >= timeout) {
|
|
42
|
+
reject(new Error('Timeout waiting pipeline'));
|
|
43
|
+
clearInterval(interval);
|
|
44
|
+
}
|
|
45
|
+
time += delay;
|
|
46
|
+
try {
|
|
47
|
+
let status = await gitlab.getTagPipelineStatus(tag);
|
|
48
|
+
switch (status) {
|
|
49
|
+
case 'unknown': {
|
|
50
|
+
reject(new Error(`Pipeline or tag does not exist!`));
|
|
51
|
+
clearInterval(interval);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
case 'failed': {
|
|
55
|
+
reject(new Error(`Pipeline failed!`));
|
|
56
|
+
clearInterval(interval);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 'canceled': {
|
|
60
|
+
reject(new Error(`Pipeline canceled!`));
|
|
61
|
+
clearInterval(interval);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case 'skipped': {
|
|
65
|
+
reject(new Error(`Pipeline skipped!`));
|
|
66
|
+
clearInterval(interval);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case 'success': {
|
|
70
|
+
resolve(`Pipeline passed successfully!`);
|
|
71
|
+
clearInterval(interval);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
reject(new Error(err.message));
|
|
77
|
+
clearInterval(interval);
|
|
78
|
+
}
|
|
79
|
+
}, delay * 1000);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async run() {
|
|
83
|
+
const { args, flags } = this.parse(GitlabGetTagPipeline);
|
|
84
|
+
const gitlab = new gitlab_1.default(flags.host, flags.project, flags.pat);
|
|
85
|
+
if (!flags.wait) {
|
|
86
|
+
let status = await gitlab.getTagPipelineStatus(args.tag);
|
|
87
|
+
return this.log(`${chalk_1.default.green(status)}`);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
try {
|
|
91
|
+
let status = await this.waitPipelineStatus(gitlab, args.tag, parseInt(flags.timeout, 10), parseInt(flags.delay, 10));
|
|
92
|
+
this.log(status);
|
|
93
|
+
}
|
|
94
|
+
catch (err) {
|
|
95
|
+
this.error(err.message);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.default = GitlabGetTagPipeline;
|
|
101
|
+
GitlabGetTagPipeline.description = 'get pipeline status for tag';
|
|
102
|
+
GitlabGetTagPipeline.usage = 'gitlab:get-tag-pipeline <tag>';
|
|
103
|
+
GitlabGetTagPipeline.examples = [
|
|
104
|
+
`$ ops gitlab:get-tag-pipeline 17.0.0`
|
|
105
|
+
];
|
|
106
|
+
GitlabGetTagPipeline.args = [
|
|
107
|
+
{
|
|
108
|
+
name: 'tag',
|
|
109
|
+
description: 'Tag',
|
|
110
|
+
required: true
|
|
111
|
+
}
|
|
112
|
+
];
|
|
113
|
+
GitlabGetTagPipeline.flags = {
|
|
114
|
+
pat: command_1.flags.string({
|
|
115
|
+
required: true,
|
|
116
|
+
env: 'PRIVATE_TOKEN',
|
|
117
|
+
description: 'Token from user that has permissions to list and create tags'
|
|
118
|
+
}),
|
|
119
|
+
host: command_1.flags.string({
|
|
120
|
+
required: true,
|
|
121
|
+
default: 'https://git.adacta-fintech.com',
|
|
122
|
+
env: 'CI_SERVER_URL',
|
|
123
|
+
description: 'Server hostname'
|
|
124
|
+
}),
|
|
125
|
+
project: command_1.flags.string({
|
|
126
|
+
required: true,
|
|
127
|
+
default: '413',
|
|
128
|
+
env: 'CI_PROJECT_ID',
|
|
129
|
+
description: 'Project ID'
|
|
130
|
+
}),
|
|
131
|
+
wait: command_1.flags.boolean({
|
|
132
|
+
description: 'Wait for pipeline to finish',
|
|
133
|
+
default: false
|
|
134
|
+
}),
|
|
135
|
+
timeout: command_1.flags.string({
|
|
136
|
+
default: '120',
|
|
137
|
+
description: 'Timeout for wait command in seconds (defaults to 120 seconds)'
|
|
138
|
+
}),
|
|
139
|
+
delay: command_1.flags.string({
|
|
140
|
+
default: '5',
|
|
141
|
+
description: 'Delay of check in seconds (defaults to 5 seconds)'
|
|
142
|
+
})
|
|
143
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { flags } from '@oclif/command';
|
|
2
|
-
import * as semver from 'semver';
|
|
3
2
|
import CommandBase from '../../command.base';
|
|
4
3
|
export default class GitlabNextNightlyTag extends CommandBase {
|
|
5
4
|
static description: string;
|
|
@@ -14,16 +13,8 @@ export default class GitlabNextNightlyTag extends CommandBase {
|
|
|
14
13
|
host: flags.IOptionFlag<string>;
|
|
15
14
|
project: flags.IOptionFlag<string>;
|
|
16
15
|
reference: flags.IOptionFlag<string>;
|
|
16
|
+
outputVersionOnly: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
17
17
|
dryRun: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
18
18
|
};
|
|
19
|
-
private readonly apiBase;
|
|
20
|
-
/**
|
|
21
|
-
* Try to figure out latest available version already created
|
|
22
|
-
*/
|
|
23
|
-
createNewTag(url: string, pat: string, tag_name: string, ref: string): Promise<void>;
|
|
24
|
-
/**
|
|
25
|
-
* Try to figure out latest available version already created
|
|
26
|
-
*/
|
|
27
|
-
getLatestVersion(url: string, pat: string, searchVersion: string, prefix?: string): Promise<semver.SemVer>;
|
|
28
19
|
run(): Promise<undefined>;
|
|
29
20
|
}
|
|
@@ -1,81 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@oclif/command");
|
|
4
|
-
const axios_1 = require("axios");
|
|
5
4
|
const chalk_1 = require("chalk");
|
|
6
5
|
const cli_ux_1 = require("cli-ux");
|
|
7
6
|
const semver = require("semver");
|
|
8
7
|
const command_base_1 = require("../../command.base");
|
|
8
|
+
const gitlab_1 = require("../../lib/gitlab");
|
|
9
9
|
class GitlabNextNightlyTag extends command_base_1.default {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.apiBase = '/api/v4/projects';
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Try to figure out latest available version already created
|
|
16
|
-
*/
|
|
17
|
-
async createNewTag(url, pat, tag_name, ref) {
|
|
18
|
-
try {
|
|
19
|
-
await axios_1.default.post(`${url}`, {
|
|
20
|
-
tag_name,
|
|
21
|
-
ref
|
|
22
|
-
}, {
|
|
23
|
-
headers: {
|
|
24
|
-
Authorization: `Bearer ${pat}`,
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
catch (err) {
|
|
29
|
-
throw new Error(err);
|
|
30
|
-
}
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Try to figure out latest available version already created
|
|
35
|
-
*/
|
|
36
|
-
async getLatestVersion(url, pat, searchVersion, prefix = '') {
|
|
37
|
-
let versions = [];
|
|
38
|
-
try {
|
|
39
|
-
let page = 1;
|
|
40
|
-
let totalPages = 1;
|
|
41
|
-
do {
|
|
42
|
-
let response = await axios_1.default.get(`${url}`, {
|
|
43
|
-
headers: {
|
|
44
|
-
Authorization: `Bearer ${pat}`,
|
|
45
|
-
},
|
|
46
|
-
params: {
|
|
47
|
-
search: `^${prefix}v${searchVersion}`,
|
|
48
|
-
per_page: 100,
|
|
49
|
-
page
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
response.data.forEach((tag) => {
|
|
53
|
-
const regex = new RegExp(`${prefix}(.*)`);
|
|
54
|
-
let searchTag = tag;
|
|
55
|
-
let match = tag.name.match(regex);
|
|
56
|
-
if (match[1]) {
|
|
57
|
-
searchTag = match[1];
|
|
58
|
-
}
|
|
59
|
-
let semanticVersion = semver.parse(searchTag, { includePrerelease: true });
|
|
60
|
-
if (semanticVersion && semanticVersion.prerelease.length === 0) {
|
|
61
|
-
versions.push(semanticVersion);
|
|
62
|
-
// ignore versions that that doesn't have number for prerelease identifier (skip qa and test prereleases)
|
|
63
|
-
}
|
|
64
|
-
else if (semanticVersion && semanticVersion.prerelease.length === 2 && /^[0-9]+$/.test(semanticVersion.prerelease[1].toString())) {
|
|
65
|
-
versions.push(semanticVersion);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
totalPages = parseInt(response.headers['x-total-pages'], 10);
|
|
69
|
-
page++;
|
|
70
|
-
} while (page <= totalPages);
|
|
71
|
-
}
|
|
72
|
-
catch (err) {
|
|
73
|
-
this.error(err.message);
|
|
74
|
-
}
|
|
75
|
-
return semver.rsort(versions)[0];
|
|
76
|
-
}
|
|
77
10
|
async run() {
|
|
78
11
|
const { args, flags } = this.parse(GitlabNextNightlyTag);
|
|
12
|
+
const gitlab = new gitlab_1.default(flags.host, flags.project, flags.pat);
|
|
79
13
|
const re = /^release\/(\w+\-)?((\d+)(\.\d+)?)$/;
|
|
80
14
|
let prefix = '';
|
|
81
15
|
let inputVersion = args.version;
|
|
@@ -86,12 +20,16 @@ class GitlabNextNightlyTag extends command_base_1.default {
|
|
|
86
20
|
}
|
|
87
21
|
inputVersion = match[2];
|
|
88
22
|
}
|
|
89
|
-
const urlPath = `${this.apiBase}/${flags.project}/repository/tags`;
|
|
90
23
|
let version = semver.parse(inputVersion);
|
|
91
24
|
let nextVersion = null;
|
|
92
25
|
// if version is not parsable try to find something that starts with this version
|
|
93
26
|
if (!version) {
|
|
94
|
-
|
|
27
|
+
try {
|
|
28
|
+
version = await gitlab.getLatestVersion(inputVersion, prefix);
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
this.error(err.message);
|
|
32
|
+
}
|
|
95
33
|
}
|
|
96
34
|
// still version does not exists we will try to parse it with additional 0 as patch version
|
|
97
35
|
if (!version) {
|
|
@@ -105,10 +43,18 @@ class GitlabNextNightlyTag extends command_base_1.default {
|
|
|
105
43
|
if (!version) {
|
|
106
44
|
return this.error(`${chalk_1.default.red('Version in incorrect format')}`);
|
|
107
45
|
}
|
|
108
|
-
|
|
46
|
+
if (!flags.outputVersionOnly) {
|
|
47
|
+
cli_ux_1.default.action.start('Calculating next prerelease test version', undefined, { stdout: true });
|
|
48
|
+
}
|
|
109
49
|
const date = new Date();
|
|
110
50
|
const prereleaseDate = `${date.getFullYear()}${('0' + (date.getMonth() + 1)).slice(-2)}`;
|
|
111
|
-
let lastVersion =
|
|
51
|
+
let lastVersion = null;
|
|
52
|
+
try {
|
|
53
|
+
lastVersion = await gitlab.getLatestVersion(version.version, prefix);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
this.error(err.message);
|
|
57
|
+
}
|
|
112
58
|
if (lastVersion) {
|
|
113
59
|
nextVersion = `v${semver.inc(lastVersion, 'prerelease', prereleaseDate)}`;
|
|
114
60
|
}
|
|
@@ -118,9 +64,19 @@ class GitlabNextNightlyTag extends command_base_1.default {
|
|
|
118
64
|
if (prefix) {
|
|
119
65
|
nextVersion = `${prefix}${nextVersion}`;
|
|
120
66
|
}
|
|
121
|
-
|
|
67
|
+
if (!flags.outputVersionOnly) {
|
|
68
|
+
cli_ux_1.default.action.stop(`${chalk_1.default.green(nextVersion)}`);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.log(`${nextVersion}`);
|
|
72
|
+
}
|
|
122
73
|
if (!flags.dryRun) {
|
|
123
|
-
|
|
74
|
+
try {
|
|
75
|
+
await gitlab.createNewTag(nextVersion, flags.reference);
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
this.error(err.message);
|
|
79
|
+
}
|
|
124
80
|
}
|
|
125
81
|
else {
|
|
126
82
|
this.warn(`This is only dry run. no new tag will was created!`);
|
|
@@ -162,6 +118,10 @@ GitlabNextNightlyTag.flags = {
|
|
|
162
118
|
env: 'CI_COMMIT_REF_NAME',
|
|
163
119
|
description: 'Reference to create tag on (branch, commit, tag)'
|
|
164
120
|
}),
|
|
121
|
+
outputVersionOnly: command_1.flags.boolean({
|
|
122
|
+
description: `output only version instead of pretty output`,
|
|
123
|
+
default: false
|
|
124
|
+
}),
|
|
165
125
|
dryRun: command_1.flags.boolean({
|
|
166
126
|
description: `Only printout version and don't create it`,
|
|
167
127
|
default: false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as semver from 'semver';
|
|
2
|
+
export default class GitLab {
|
|
3
|
+
private readonly pat;
|
|
4
|
+
private readonly host;
|
|
5
|
+
private readonly project;
|
|
6
|
+
private readonly apiBase;
|
|
7
|
+
constructor(host: string, project: string, pat: string);
|
|
8
|
+
/**
|
|
9
|
+
* Try to figure out latest available version already created
|
|
10
|
+
*/
|
|
11
|
+
getLatestVersion(searchVersion: string, prefix?: string): Promise<semver.SemVer>;
|
|
12
|
+
/**
|
|
13
|
+
* Try to figure out latest available version already created
|
|
14
|
+
*/
|
|
15
|
+
createNewTag(tag_name: string, ref: string): Promise<void>;
|
|
16
|
+
getTagPipelineStatus(tag: string): Promise<string>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axios_1 = require("axios");
|
|
4
|
+
const semver = require("semver");
|
|
5
|
+
class GitLab {
|
|
6
|
+
constructor(host, project, pat) {
|
|
7
|
+
this.apiBase = '/api/v4/projects';
|
|
8
|
+
this.pat = pat;
|
|
9
|
+
this.host = host;
|
|
10
|
+
this.project = project;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Try to figure out latest available version already created
|
|
14
|
+
*/
|
|
15
|
+
async getLatestVersion(searchVersion, prefix = '') {
|
|
16
|
+
let versions = [];
|
|
17
|
+
try {
|
|
18
|
+
let page = 1;
|
|
19
|
+
let totalPages = 1;
|
|
20
|
+
do {
|
|
21
|
+
let response = await axios_1.default.get(`${this.host}${this.apiBase}/${this.project}/repository/tags`, {
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: `Bearer ${this.pat}`,
|
|
24
|
+
},
|
|
25
|
+
params: {
|
|
26
|
+
search: `^${prefix}v${searchVersion}`,
|
|
27
|
+
per_page: 100,
|
|
28
|
+
page
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
response.data.forEach((tag) => {
|
|
32
|
+
const regex = new RegExp(`${prefix}(.*)`);
|
|
33
|
+
let searchTag = tag;
|
|
34
|
+
let match = tag.name.match(regex);
|
|
35
|
+
if (match[1]) {
|
|
36
|
+
searchTag = match[1];
|
|
37
|
+
}
|
|
38
|
+
let semanticVersion = semver.parse(searchTag, { includePrerelease: true });
|
|
39
|
+
if (semanticVersion && semanticVersion.prerelease.length === 0) {
|
|
40
|
+
versions.push(semanticVersion);
|
|
41
|
+
// ignore versions that that doesn't have number for prerelease identifier (skip qa and test prereleases)
|
|
42
|
+
}
|
|
43
|
+
else if (semanticVersion && semanticVersion.prerelease.length === 2 && /^[0-9]+$/.test(semanticVersion.prerelease[1].toString())) {
|
|
44
|
+
versions.push(semanticVersion);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
totalPages = parseInt(response.headers['x-total-pages'], 10);
|
|
48
|
+
page++;
|
|
49
|
+
} while (page <= totalPages);
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
throw new Error(err);
|
|
53
|
+
}
|
|
54
|
+
return semver.rsort(versions)[0];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Try to figure out latest available version already created
|
|
58
|
+
*/
|
|
59
|
+
async createNewTag(tag_name, ref) {
|
|
60
|
+
try {
|
|
61
|
+
await axios_1.default.post(`${this.host}${this.apiBase}/${this.project}/repository/tags`, {
|
|
62
|
+
tag_name,
|
|
63
|
+
ref
|
|
64
|
+
}, {
|
|
65
|
+
headers: {
|
|
66
|
+
Authorization: `Bearer ${this.pat}`,
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
throw new Error(err);
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
async getTagPipelineStatus(tag) {
|
|
76
|
+
let pipelines = null;
|
|
77
|
+
tag = tag.replace(/^v/g, ''); // trim if tag starts with v because already include it in search
|
|
78
|
+
try {
|
|
79
|
+
pipelines = await axios_1.default.get(`${this.host}${this.apiBase}/${this.project}/pipelines?ref=v${tag}`, {
|
|
80
|
+
headers: {
|
|
81
|
+
Authorization: `Bearer ${this.pat}`,
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
throw new Error(err);
|
|
87
|
+
}
|
|
88
|
+
if (pipelines.data.length > 0) {
|
|
89
|
+
return pipelines.data[0].status;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return 'unknown';
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.default = GitLab;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.0-rc9","commands":{"doctor":{"id":"doctor","description":"check if everyting is installed","usage":"doctor","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops doctor"],"flags":{"fix":{"name":"fix","type":"boolean","char":"p","description":"try to install missing packages","allowNo":false}},"args":[]},"login":{"id":"login","description":"log in to use ops services","usage":"login","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops login","$ ops login --npm","$ ops login --skipCi CI","$ ops login --deviceFlow"],"flags":{"servicePrincipal":{"name":"servicePrincipal","type":"boolean","description":"authenticate using service principal credentials","allowNo":false},"deviceFlow":{"name":"deviceFlow","type":"boolean","description":"authenticate using device flow","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"[DEPRECATED] (application) client id"},"secret":{"name":"secret","type":"option","char":"s","description":"[DEPRECATED] client secret"},"npm":{"name":"npm","type":"boolean","description":"register also for npm","allowNo":false},"skipCI":{"name":"skipCI","type":"option","description":"Skip login if environment variables is set"}},"args":[]},"prepare-content":{"id":"prepare-content","description":"copies files as described in .opsprepare which is at root of source directory","usage":"prepare-content -d <destination> [-s <source>]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops prepare-content -d .\\my_workspace","$ ops prepare-content -d .\\my_workspace -s .\\my_repository","$ ops prepare-content -d C:\\git\\my_workspace","$ ops prepare-content -d C:\\git\\my_workspace -s C:\\git\\my_repository\\my_repository"],"flags":{"destination":{"name":"destination","type":"option","char":"d","description":"where to copy the workspace files","required":true},"source":{"name":"source","type":"option","char":"s","description":"[optional] source directory, default: current dir","required":false,"default":"."}},"args":[]},"sql":{"id":"sql","description":"creates a new database script","usage":"sql <type> <module> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops sql schema ","$ ops sql data shared --layer basic"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating database script"},"layer":{"name":"layer","type":"option","char":"l","description":"name of the configuration layer for which you are generating database script"}},"args":[{"name":"type","description":"Type of database scripts","options":["schema","data","migration"]},{"name":"module","description":"Module of data database scripts","options":["acc","claims","core","pas","reins","shared"]}]},"translate":{"id":"translate","description":"downloads translate from AdDictionary service","usage":"translate <language> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f json -m \"Client business accounting;Client business base;\"","$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f xml -o translationDestination"],"flags":{"format":{"name":"format","type":"option","char":"f","description":"translations format [xml - server translations, json - client translations]","required":true,"options":["json","xml"]},"module":{"name":"module","type":"option","char":"m","description":"module name you want to download. Values must be semi-colon (;) separated."},"output":{"name":"output","type":"option","char":"o","description":"absolute or relative destination path to a folder where translations are extracted.","default":"."},"filename":{"name":"filename","type":"option","description":"specify filename of output (XML only)."},"respectServerFilename":{"name":"respectServerFilename","type":"boolean","description":"respect filename that is returned from AdDictionary server (XML only).","allowNo":false}},"args":[{"name":"language","description":"language id you want to download. Values must be semi-colon (;) separated.","required":true}]},"version":{"id":"version","description":"release new version","usage":"version <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops version patch","$ ops version prerelease -i","$ ops version new -v 3.4.3"],"flags":{"independent":{"name":"independent","type":"boolean","char":"i","description":"increment npm packages independent of VERSION file","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"force version"},"script-prefix":{"name":"script-prefix","type":"option","description":"prefix for db script version creation. (default: 7.10)","default":"7.10"},"no-deps":{"name":"no-deps","type":"boolean","description":"skip dependency update","allowNo":false},"no-script":{"name":"no-script","type":"boolean","description":"skip creation of script","allowNo":false},"only-npm-packages":{"name":"only-npm-packages","type":"option","description":"regular expression for which NPM packages to include","default":".*"},"exclude-dir":{"name":"exclude-dir","type":"option","description":"exclude directories where to search for package.json"}},"args":[{"name":"type","description":"Type of release","required":true,"options":["patch","minor","major","prerelease","preminor","premajor","new"]}]},"download:client":{"id":"download:client","description":"download AdInsure Client zip from Azure storage","usage":"download:client <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:client -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:identity-server":{"id":"download:identity-server","description":"download AdInsure Identity Server zip from Azure storage","usage":"download:identity-server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:identity-server -v 3.0.3 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:platform":{"id":"download:platform","description":"download AdInsure Platform bundle containing zip of Client, Server and IdentityServer from azure storage","usage":"download <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["download"],"examples":["$ ops download -v 6.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:scheduler":{"id":"download:scheduler","description":"download AdInsure Scheduler zip from azure storage","usage":"download:scheduler <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:scheduler -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:server":{"id":"download:server","description":"download AdInsure Server zip from Azure storage","usage":"download:server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:server -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:studio":{"id":"download:studio","description":"download AdInsure Studio vsix from azure storage","usage":"download:studio <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:studio -v 15.0.0 -o ~/Downloads","$ ops download:studio -v 15.0.0 -i"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"},"install":{"name":"install","type":"boolean","char":"i","description":"install plugin to vscode. save to temp folder and remove vsix after.","allowNo":false}},"args":[]},"gitlab:next-nightly-tag":{"id":"gitlab:next-nightly-tag","description":"creates new gitlab tag","usage":"gitlab:next-nightly-tag <version>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:next-nightly-tag 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"reference":{"name":"reference","type":"option","description":"Reference to create tag on (branch, commit, tag)","required":true},"dryRun":{"name":"dryRun","type":"boolean","description":"Only printout version and don't create it","allowNo":false}},"args":[{"name":"version","description":"Tag version"}]},"jira:issue":{"id":"jira:issue","description":"get Jira issue","usage":"jira:issue <issue>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:issue LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"jira:labels":{"id":"jira:labels","description":"list or edit labels on Jira issue","usage":"jira:labels <issue> -a [label] -r [label]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:labels LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"},"add":{"name":"add","type":"option","char":"a","description":"add label"},"remove":{"name":"remove","type":"option","char":"r","description":"remove label"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"log:add":{"id":"log:add","description":"creates a new changelog entry","usage":"log <issue> -t [type] -c [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log","log:add"],"examples":["$ ops log LJADIRD-1234 -t feature","$ ops log LJADIRD-5678 -t fixed","$ ops log LJADIRD-8765 -t breaking -c Platform","$ ops log LJADIRD-4321 -t improve -c Configuration"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of changelog","options":["feature","fixed","improve","breaking"]},"component":{"name":"component","type":"option","char":"c","description":"Component for which new changelog should be generated","default":""}},"args":[{"name":"issue","description":"Jira issue number"}]},"log:generate":{"id":"log:generate","description":"generates final changelog from unreleased notes","usage":"log:gen [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:gen"],"examples":["$ ops log:gen","$ ops log:gen -p","$ ops log:gen -c Platform","$ ops log:gen -c Platform,Configuration","$ ops log:gen -c Implementation -f CHANGELOG.Implementation.md"],"flags":{"components":{"name":"components","type":"option","char":"c","description":"components separated by comma (,) to process for final changelog","default":""},"file":{"name":"file","type":"option","char":"f","description":"file to update with new changelogs","default":"CHANGELOG.md"},"force":{"name":"force","type":"boolean","description":"update target file without prompting for confirmation","allowNo":false},"preview":{"name":"preview","type":"boolean","char":"p","description":"generates a preview markdown of current unreleased changelogs","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating changelogs"},"ignore-no-changelogs":{"name":"ignore-no-changelogs","type":"boolean","description":"generate final changelog even if no unreleased changelogs exist","allowNo":false}},"args":[]},"log:validate":{"id":"log:validate","description":"validates formatting of all unreleased changelogs","usage":"log:validate [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:validate"],"examples":["$ ops log:validate"],"flags":{},"args":[]},"npm:check-publish":{"id":"npm:check-publish","description":"check if npm packages were published","usage":"npm:check-publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:check-publish -v 6.0.1","$ ops npm:check-publish -p @adinsure/* -v 6.0.0","$ ops npm:check-publish -p @adinsure/* -x @adisure/demo -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"npm:publish":{"id":"npm:publish","description":"Publish npm packages","usage":"npm:publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:publish -v 15.0.0","$ ops npm:publish -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -x @adisure-tooling/studio-services -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]}}}
|
|
1
|
+
{"version":"4.2.0","commands":{"doctor":{"id":"doctor","description":"check if everyting is installed","usage":"doctor","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops doctor"],"flags":{"fix":{"name":"fix","type":"boolean","char":"p","description":"try to install missing packages","allowNo":false}},"args":[]},"login":{"id":"login","description":"log in to use ops services","usage":"login","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops login","$ ops login --npm","$ ops login --skipCi CI","$ ops login --deviceFlow"],"flags":{"servicePrincipal":{"name":"servicePrincipal","type":"boolean","description":"authenticate using service principal credentials","allowNo":false},"deviceFlow":{"name":"deviceFlow","type":"boolean","description":"authenticate using device flow","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"[DEPRECATED] (application) client id"},"secret":{"name":"secret","type":"option","char":"s","description":"[DEPRECATED] client secret"},"npm":{"name":"npm","type":"boolean","description":"register also for npm","allowNo":false},"skipCI":{"name":"skipCI","type":"option","description":"Skip login if environment variables is set"}},"args":[]},"prepare-content":{"id":"prepare-content","description":"copies files as described in .opsprepare which is at root of source directory","usage":"prepare-content -d <destination> [-s <source>]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops prepare-content -d .\\my_workspace","$ ops prepare-content -d .\\my_workspace -s .\\my_repository","$ ops prepare-content -d C:\\git\\my_workspace","$ ops prepare-content -d C:\\git\\my_workspace -s C:\\git\\my_repository\\my_repository"],"flags":{"destination":{"name":"destination","type":"option","char":"d","description":"where to copy the workspace files","required":true},"source":{"name":"source","type":"option","char":"s","description":"[optional] source directory, default: current dir","required":false,"default":"."}},"args":[]},"sql":{"id":"sql","description":"creates a new database script","usage":"sql <type> <module> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops sql schema ","$ ops sql data shared --layer basic"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating database script"},"layer":{"name":"layer","type":"option","char":"l","description":"name of the configuration layer for which you are generating database script"}},"args":[{"name":"type","description":"Type of database scripts","options":["schema","data","migration"]},{"name":"module","description":"Module of data database scripts","options":["acc","claims","core","pas","reins","shared"]}]},"translate":{"id":"translate","description":"downloads translate from AdDictionary service","usage":"translate <language> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f json -m \"Client business accounting;Client business base;\"","$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f xml -o translationDestination"],"flags":{"format":{"name":"format","type":"option","char":"f","description":"translations format [xml - server translations, json - client translations]","required":true,"options":["json","xml"]},"module":{"name":"module","type":"option","char":"m","description":"module name you want to download. Values must be semi-colon (;) separated."},"output":{"name":"output","type":"option","char":"o","description":"absolute or relative destination path to a folder where translations are extracted.","default":"."},"filename":{"name":"filename","type":"option","description":"specify filename of output (XML only)."},"respectServerFilename":{"name":"respectServerFilename","type":"boolean","description":"respect filename that is returned from AdDictionary server (XML only).","allowNo":false}},"args":[{"name":"language","description":"language id you want to download. Values must be semi-colon (;) separated.","required":true}]},"version":{"id":"version","description":"release new version","usage":"version <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops version patch","$ ops version prerelease -i","$ ops version new -v 3.4.3"],"flags":{"independent":{"name":"independent","type":"boolean","char":"i","description":"increment npm packages independent of VERSION file","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"force version"},"script-prefix":{"name":"script-prefix","type":"option","description":"prefix for db script version creation. (default: 7.10)","default":"7.10"},"no-deps":{"name":"no-deps","type":"boolean","description":"skip dependency update","allowNo":false},"no-script":{"name":"no-script","type":"boolean","description":"skip creation of script","allowNo":false},"only-npm-packages":{"name":"only-npm-packages","type":"option","description":"regular expression for which NPM packages to include","default":".*"},"exclude-dir":{"name":"exclude-dir","type":"option","description":"exclude directories where to search for package.json"}},"args":[{"name":"type","description":"Type of release","required":true,"options":["patch","minor","major","prerelease","preminor","premajor","new"]}]},"download:client":{"id":"download:client","description":"download AdInsure Client zip from Azure storage","usage":"download:client <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:client -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:identity-server":{"id":"download:identity-server","description":"download AdInsure Identity Server zip from Azure storage","usage":"download:identity-server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:identity-server -v 3.0.3 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:platform":{"id":"download:platform","description":"download AdInsure Platform bundle containing zip of Client, Server and IdentityServer from azure storage","usage":"download <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["download"],"examples":["$ ops download -v 6.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:scheduler":{"id":"download:scheduler","description":"download AdInsure Scheduler zip from azure storage","usage":"download:scheduler <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:scheduler -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:server":{"id":"download:server","description":"download AdInsure Server zip from Azure storage","usage":"download:server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:server -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:studio":{"id":"download:studio","description":"download AdInsure Studio vsix from azure storage","usage":"download:studio <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:studio -v 15.0.0 -o ~/Downloads","$ ops download:studio -v 15.0.0 -i"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"},"install":{"name":"install","type":"boolean","char":"i","description":"install plugin to vscode. save to temp folder and remove vsix after.","allowNo":false}},"args":[]},"gitlab:get-tag-pipeline":{"id":"gitlab:get-tag-pipeline","description":"get pipeline status for tag","usage":"gitlab:get-tag-pipeline <tag>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:get-tag-pipeline 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"wait":{"name":"wait","type":"boolean","description":"Wait for pipeline to finish","allowNo":false},"timeout":{"name":"timeout","type":"option","description":"Timeout for wait command in seconds (defaults to 120 seconds)","default":"120"},"delay":{"name":"delay","type":"option","description":"Delay of check in seconds (defaults to 5 seconds)","default":"5"}},"args":[{"name":"tag","description":"Tag","required":true}]},"gitlab:next-nightly-tag":{"id":"gitlab:next-nightly-tag","description":"creates new gitlab tag","usage":"gitlab:next-nightly-tag <version>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:next-nightly-tag 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"reference":{"name":"reference","type":"option","description":"Reference to create tag on (branch, commit, tag)","required":true},"outputVersionOnly":{"name":"outputVersionOnly","type":"boolean","description":"output only version instead of pretty output","allowNo":false},"dryRun":{"name":"dryRun","type":"boolean","description":"Only printout version and don't create it","allowNo":false}},"args":[{"name":"version","description":"Tag version"}]},"jira:issue":{"id":"jira:issue","description":"get Jira issue","usage":"jira:issue <issue>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:issue LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"jira:labels":{"id":"jira:labels","description":"list or edit labels on Jira issue","usage":"jira:labels <issue> -a [label] -r [label]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:labels LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"},"add":{"name":"add","type":"option","char":"a","description":"add label"},"remove":{"name":"remove","type":"option","char":"r","description":"remove label"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"log:add":{"id":"log:add","description":"creates a new changelog entry","usage":"log <issue> -t [type] -c [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log","log:add"],"examples":["$ ops log LJADIRD-1234 -t feature","$ ops log LJADIRD-5678 -t fixed","$ ops log LJADIRD-8765 -t breaking -c Platform","$ ops log LJADIRD-4321 -t improve -c Configuration"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of changelog","options":["feature","fixed","improve","breaking"]},"component":{"name":"component","type":"option","char":"c","description":"Component for which new changelog should be generated","default":""}},"args":[{"name":"issue","description":"Jira issue number"}]},"log:generate":{"id":"log:generate","description":"generates final changelog from unreleased notes","usage":"log:gen [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:gen"],"examples":["$ ops log:gen","$ ops log:gen -p","$ ops log:gen -c Platform","$ ops log:gen -c Platform,Configuration","$ ops log:gen -c Implementation -f CHANGELOG.Implementation.md"],"flags":{"components":{"name":"components","type":"option","char":"c","description":"components separated by comma (,) to process for final changelog","default":""},"file":{"name":"file","type":"option","char":"f","description":"file to update with new changelogs","default":"CHANGELOG.md"},"force":{"name":"force","type":"boolean","description":"update target file without prompting for confirmation","allowNo":false},"preview":{"name":"preview","type":"boolean","char":"p","description":"generates a preview markdown of current unreleased changelogs","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating changelogs"},"ignore-no-changelogs":{"name":"ignore-no-changelogs","type":"boolean","description":"generate final changelog even if no unreleased changelogs exist","allowNo":false}},"args":[]},"log:validate":{"id":"log:validate","description":"validates formatting of all unreleased changelogs","usage":"log:validate [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:validate"],"examples":["$ ops log:validate"],"flags":{},"args":[]},"npm:check-publish":{"id":"npm:check-publish","description":"check if npm packages were published","usage":"npm:check-publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:check-publish -v 6.0.1","$ ops npm:check-publish -p @adinsure/* -v 6.0.0","$ ops npm:check-publish -p @adinsure/* -x @adisure/demo -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"npm:publish":{"id":"npm:publish","description":"Publish npm packages","usage":"npm:publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:publish -v 15.0.0","$ ops npm:publish -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -x @adisure-tooling/studio-services -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]}}}
|