artifact-engine 2.275.2 → 2.279.2
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/Engine/artifactEngine.js +4 -2
- package/Engine/artifactEngineOptions.js +0 -1
- package/Engine/cilogger.js +2 -2
- package/Engine/index.js +0 -1
- package/Engine/logger.js +0 -1
- package/Engine/worker.js +0 -1
- package/Models/artifactDownloadTicket.js +0 -1
- package/Models/artifactItem.js +0 -1
- package/Models/artifactprovider.d.ts +1 -0
- package/Models/artifactprovider.js +0 -1
- package/Models/constants.js +0 -1
- package/Models/index.js +0 -1
- package/Models/itemType.js +1 -2
- package/Models/ticketState.js +1 -2
- package/Providers/filesystemProvider.d.ts +1 -0
- package/Providers/filesystemProvider.js +19 -2
- package/Providers/index.js +0 -1
- package/Providers/jenkins.handlebars +10 -10
- package/Providers/stubProvider.d.ts +1 -0
- package/Providers/stubProvider.js +0 -1
- package/Providers/teamcity.handlebars +24 -24
- package/Providers/vsts.handlebars +15 -15
- package/Providers/webClient.d.ts +1 -1
- package/Providers/webClient.js +4 -2
- package/Providers/webClientFactory.js +7 -1
- package/Providers/webProvider.d.ts +8 -1
- package/Providers/webProvider.js +0 -1
- package/Providers/zipProvider.d.ts +2 -1
- package/Providers/zipProvider.js +0 -1
- package/README.md +40 -39
- package/Store/artifactItemStore.js +0 -1
- package/Store/index.js +0 -1
- package/Strings/resources.resjson/de-DE/resources.resjson +12 -11
- package/Strings/resources.resjson/en-US/resources.resjson +12 -11
- package/Strings/resources.resjson/es-ES/resources.resjson +12 -11
- package/Strings/resources.resjson/fr-FR/resources.resjson +12 -11
- package/Strings/resources.resjson/it-IT/resources.resjson +12 -11
- package/Strings/resources.resjson/ja-JP/resources.resjson +12 -11
- package/Strings/resources.resjson/ko-KR/resources.resjson +12 -11
- package/Strings/resources.resjson/ru-RU/resources.resjson +12 -11
- package/Strings/resources.resjson/zh-CN/resources.resjson +12 -11
- package/Strings/resources.resjson/zh-TW/resources.resjson +12 -11
- package/ThirdPartyNotices.txt +925 -925
- package/lib.json +14 -13
- package/package.json +62 -64
- package/Providers/typed-rest-client/Handlers.d.ts +0 -4
- package/Providers/typed-rest-client/Handlers.js +0 -12
- package/Providers/typed-rest-client/HttpClient.d.ts +0 -76
- package/Providers/typed-rest-client/HttpClient.js +0 -328
- package/Providers/typed-rest-client/Index.d.ts +0 -1
- package/Providers/typed-rest-client/Index.js +0 -3
- package/Providers/typed-rest-client/Interfaces.d.ts +0 -39
- package/Providers/typed-rest-client/Interfaces.js +0 -4
- package/Providers/typed-rest-client/RestClient.d.ts +0 -26
- package/Providers/typed-rest-client/RestClient.js +0 -134
- package/Providers/typed-rest-client/Util.d.ts +0 -1
- package/Providers/typed-rest-client/Util.js +0 -17
- package/Providers/typed-rest-client/handlers/basiccreds.d.ts +0 -9
- package/Providers/typed-rest-client/handlers/basiccreds.js +0 -20
- package/Providers/typed-rest-client/handlers/bearertoken.d.ts +0 -8
- package/Providers/typed-rest-client/handlers/bearertoken.js +0 -19
- package/Providers/typed-rest-client/handlers/ntlm.d.ts +0 -13
- package/Providers/typed-rest-client/handlers/ntlm.js +0 -107
- package/Providers/typed-rest-client/handlers/personalaccesstoken.d.ts +0 -8
- package/Providers/typed-rest-client/handlers/personalaccesstoken.js +0 -19
- package/Providers/typed-rest-client/opensource/node-http-ntlm/ntlm.js +0 -386
package/Engine/artifactEngine.js
CHANGED
|
@@ -64,6 +64,8 @@ class ArtifactEngine {
|
|
|
64
64
|
else {
|
|
65
65
|
this.artifactItemStore.increaseRetryCount(item);
|
|
66
66
|
logger_1.Logger.logMessage(tl.loc("RetryingDownload", item.path, (retryCount + 1)));
|
|
67
|
+
// retry interval sequence 5s 15s 45s 135s
|
|
68
|
+
// 2 min is the time limit for freeing of ports
|
|
67
69
|
setTimeout(() => this
|
|
68
70
|
.processArtifactItemImplementation(sourceProvider, item, destProvider, artifactEngineOptions, resolve, reject, retryCount + 1), this.getRetryIntervalInSeconds(artifactEngineOptions.retryIntervalInSeconds, retryCount) * 1000);
|
|
69
71
|
}
|
|
@@ -71,13 +73,14 @@ class ArtifactEngine {
|
|
|
71
73
|
retryCount = retryCount ? retryCount : 0;
|
|
72
74
|
if (item.itemType === models.ItemType.File) {
|
|
73
75
|
var pathToMatch = item.path.replace(/\\/g, '/');
|
|
76
|
+
var isCaseInsensitiveArtifactMatchingFixEnabled = tl.getPipelineFeature('CaseInsensitiveArtifactMatchingFixEnabled');
|
|
74
77
|
var matchOptions = {
|
|
75
78
|
debug: false,
|
|
76
79
|
nobrace: true,
|
|
77
80
|
noglobstar: false,
|
|
78
81
|
dot: true,
|
|
79
82
|
noext: false,
|
|
80
|
-
nocase:
|
|
83
|
+
nocase: process.platform === 'win32' && isCaseInsensitiveArtifactMatchingFixEnabled,
|
|
81
84
|
nonull: false,
|
|
82
85
|
matchBase: false,
|
|
83
86
|
nocomment: false,
|
|
@@ -163,4 +166,3 @@ process.on('uncaughtException', (err) => {
|
|
|
163
166
|
logger_1.Logger.logError(tl.loc("UnhandledException", err));
|
|
164
167
|
throw err;
|
|
165
168
|
});
|
|
166
|
-
//# sourceMappingURL=artifactEngine.js.map
|
package/Engine/cilogger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.publishEvent =
|
|
3
|
+
exports.publishEvent = void 0;
|
|
4
4
|
var tl = require('azure-pipelines-task-lib');
|
|
5
5
|
var packagejson = require('../package.json');
|
|
6
6
|
const area = 'artifact-engine-v2';
|
|
@@ -42,4 +42,4 @@ function publishEvent(feature, properties) {
|
|
|
42
42
|
tl.warning("Failed to log telemetry, error: " + err);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
exports.publishEvent = publishEvent;
|
package/Engine/index.js
CHANGED
|
@@ -5,4 +5,3 @@ var artifactEngineOptions_1 = require("./artifactEngineOptions");
|
|
|
5
5
|
Object.defineProperty(exports, "ArtifactEngineOptions", { enumerable: true, get: function () { return artifactEngineOptions_1.ArtifactEngineOptions; } });
|
|
6
6
|
var artifactEngine_1 = require("./artifactEngine");
|
|
7
7
|
Object.defineProperty(exports, "ArtifactEngine", { enumerable: true, get: function () { return artifactEngine_1.ArtifactEngine; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/Engine/logger.js
CHANGED
package/Engine/worker.js
CHANGED
package/Models/artifactItem.js
CHANGED
package/Models/constants.js
CHANGED
package/Models/index.js
CHANGED
|
@@ -11,4 +11,3 @@ var ticketState_1 = require("./ticketState");
|
|
|
11
11
|
Object.defineProperty(exports, "TicketState", { enumerable: true, get: function () { return ticketState_1.TicketState; } });
|
|
12
12
|
var constants_1 = require("./constants");
|
|
13
13
|
Object.defineProperty(exports, "Constants", { enumerable: true, get: function () { return constants_1.Constants; } });
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
package/Models/itemType.js
CHANGED
|
@@ -6,5 +6,4 @@ var ItemType;
|
|
|
6
6
|
ItemType[ItemType["Any"] = "any"] = "Any";
|
|
7
7
|
ItemType[ItemType["Folder"] = "folder"] = "Folder";
|
|
8
8
|
ItemType[ItemType["File"] = "file"] = "File";
|
|
9
|
-
})(ItemType
|
|
10
|
-
//# sourceMappingURL=itemType.js.map
|
|
9
|
+
})(ItemType = exports.ItemType || (exports.ItemType = {}));
|
package/Models/ticketState.js
CHANGED
|
@@ -8,5 +8,4 @@ var TicketState;
|
|
|
8
8
|
TicketState[TicketState["Processed"] = "processed"] = "Processed";
|
|
9
9
|
TicketState[TicketState["Skipped"] = "skipped"] = "Skipped";
|
|
10
10
|
TicketState[TicketState["Failed"] = "failed"] = "Failed";
|
|
11
|
-
})(TicketState
|
|
12
|
-
//# sourceMappingURL=ticketState.js.map
|
|
11
|
+
})(TicketState = exports.TicketState || (exports.TicketState = {}));
|
|
@@ -43,10 +43,27 @@ class FilesystemProvider {
|
|
|
43
43
|
}
|
|
44
44
|
putArtifactItem(item, stream) {
|
|
45
45
|
return new Promise((resolve, reject) => {
|
|
46
|
-
|
|
46
|
+
let outputItemPath;
|
|
47
|
+
if (!tl.getPipelineFeature("EnableArtifactEnginePathValidation")) {
|
|
48
|
+
outputItemPath = path.join(this._rootLocation, item.path);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
// Feature on: reject item paths that resolve outside the download root.
|
|
52
|
+
const resolvedRoot = path.resolve(this._rootLocation);
|
|
53
|
+
const resolvedTarget = path.resolve(resolvedRoot, item.path);
|
|
54
|
+
const relative = path.relative(resolvedRoot, resolvedTarget);
|
|
55
|
+
if (relative === '..'
|
|
56
|
+
|| relative.startsWith('..' + path.sep)
|
|
57
|
+
|| path.isAbsolute(relative)) {
|
|
58
|
+
reject(new Error(tl.loc("InvalidArtifactPath", item.path)));
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
outputItemPath = resolvedTarget;
|
|
62
|
+
}
|
|
47
63
|
if (item.itemType === models.ItemType.File) {
|
|
48
64
|
const folder = path.dirname(outputItemPath);
|
|
49
65
|
try {
|
|
66
|
+
// create parent folder if it has not already been created
|
|
50
67
|
tl.mkdirP(folder);
|
|
51
68
|
logger_1.Logger.logMessage(tl.loc("DownloadingTo", item.path, outputItemPath));
|
|
52
69
|
const outputStream = fs.createWriteStream(outputItemPath);
|
|
@@ -95,6 +112,7 @@ class FilesystemProvider {
|
|
|
95
112
|
for (var index = 0; index < files.length; index++) {
|
|
96
113
|
var file = files[index];
|
|
97
114
|
var filePath = path.join(itemsPath, file);
|
|
115
|
+
// do not follow symbolic link
|
|
98
116
|
var itemStat;
|
|
99
117
|
try {
|
|
100
118
|
itemStat = fs.lstatSync(filePath);
|
|
@@ -120,4 +138,3 @@ class FilesystemProvider {
|
|
|
120
138
|
}
|
|
121
139
|
}
|
|
122
140
|
exports.FilesystemProvider = FilesystemProvider;
|
|
123
|
-
//# sourceMappingURL=filesystemProvider.js.map
|
package/Providers/index.js
CHANGED
|
@@ -9,4 +9,3 @@ var zipProvider_1 = require("./zipProvider");
|
|
|
9
9
|
Object.defineProperty(exports, "ZipProvider", { enumerable: true, get: function () { return zipProvider_1.ZipProvider; } });
|
|
10
10
|
var stubProvider_1 = require("./stubProvider");
|
|
11
11
|
Object.defineProperty(exports, "StubProvider", { enumerable: true, get: function () { return stubProvider_1.StubProvider; } });
|
|
12
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[
|
|
2
|
-
{{#artifacts}}
|
|
3
|
-
{
|
|
4
|
-
"path" : "{{this.relativePath}}",
|
|
5
|
-
"itemType": "file",
|
|
6
|
-
"metadata" : {
|
|
7
|
-
"downloadUrl": "{{../endpoint.url}}/job/{{../definition}}/{{../version}}/artifact/{{this.relativePath}}"
|
|
8
|
-
}
|
|
9
|
-
}{{#unless @last}},{{/unless}}
|
|
10
|
-
{{/artifacts}}
|
|
1
|
+
[
|
|
2
|
+
{{#artifacts}}
|
|
3
|
+
{
|
|
4
|
+
"path" : "{{this.relativePath}}",
|
|
5
|
+
"itemType": "file",
|
|
6
|
+
"metadata" : {
|
|
7
|
+
"downloadUrl": "{{../endpoint.url}}/job/{{../definition}}/{{../version}}/artifact/{{this.relativePath}}"
|
|
8
|
+
}
|
|
9
|
+
}{{#unless @last}},{{/unless}}
|
|
10
|
+
{{/artifacts}}
|
|
11
11
|
]
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
[
|
|
2
|
-
{{#file}}
|
|
3
|
-
{
|
|
4
|
-
"path": "{{this.name}}",
|
|
5
|
-
"lastModified": "{{this.modificationTime}}",
|
|
6
|
-
{{#if size}}
|
|
7
|
-
"fileLength" : "{{this.size}}",
|
|
8
|
-
{{/if}}
|
|
9
|
-
{{#if children}}
|
|
10
|
-
"itemType": "folder",
|
|
11
|
-
{{/if}}
|
|
12
|
-
{{#if content}}
|
|
13
|
-
"itemType": "file",
|
|
14
|
-
{{/if}}
|
|
15
|
-
"metadata": {
|
|
16
|
-
{{#if content}}
|
|
17
|
-
"downloadUrl" : "{{../endpoint.url}}{{content.href}}"
|
|
18
|
-
{{/if}}
|
|
19
|
-
{{#if children}}
|
|
20
|
-
"downloadUrl": "{{../endpoint.url}}{{children.href}}"
|
|
21
|
-
{{/if}}
|
|
22
|
-
}
|
|
23
|
-
}{{#unless @last}},{{/unless}}
|
|
24
|
-
{{/file}}
|
|
1
|
+
[
|
|
2
|
+
{{#file}}
|
|
3
|
+
{
|
|
4
|
+
"path": "{{this.name}}",
|
|
5
|
+
"lastModified": "{{this.modificationTime}}",
|
|
6
|
+
{{#if size}}
|
|
7
|
+
"fileLength" : "{{this.size}}",
|
|
8
|
+
{{/if}}
|
|
9
|
+
{{#if children}}
|
|
10
|
+
"itemType": "folder",
|
|
11
|
+
{{/if}}
|
|
12
|
+
{{#if content}}
|
|
13
|
+
"itemType": "file",
|
|
14
|
+
{{/if}}
|
|
15
|
+
"metadata": {
|
|
16
|
+
{{#if content}}
|
|
17
|
+
"downloadUrl" : "{{../endpoint.url}}{{content.href}}"
|
|
18
|
+
{{/if}}
|
|
19
|
+
{{#if children}}
|
|
20
|
+
"downloadUrl": "{{../endpoint.url}}{{children.href}}"
|
|
21
|
+
{{/if}}
|
|
22
|
+
}
|
|
23
|
+
}{{#unless @last}},{{/unless}}
|
|
24
|
+
{{/file}}
|
|
25
25
|
]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
[
|
|
2
|
-
{{#value}}
|
|
3
|
-
{
|
|
4
|
-
"path": "{{this.path}}",
|
|
5
|
-
"lastModified": "{{this.dateLastModified}}",
|
|
6
|
-
{{#if fileLength}}
|
|
7
|
-
"fileLength" : "{{this.fileLength}}",
|
|
8
|
-
{{/if}}
|
|
9
|
-
"itemType": "{{this.itemType}}",
|
|
10
|
-
"metadata":
|
|
11
|
-
{
|
|
12
|
-
"downloadUrl" : "{{{this.contentLocation}}}&isShallow=true"
|
|
13
|
-
}
|
|
14
|
-
}{{#unless @last}},{{/unless}}
|
|
15
|
-
{{/value}}
|
|
1
|
+
[
|
|
2
|
+
{{#value}}
|
|
3
|
+
{
|
|
4
|
+
"path": "{{this.path}}",
|
|
5
|
+
"lastModified": "{{this.dateLastModified}}",
|
|
6
|
+
{{#if fileLength}}
|
|
7
|
+
"fileLength" : "{{this.fileLength}}",
|
|
8
|
+
{{/if}}
|
|
9
|
+
"itemType": "{{this.itemType}}",
|
|
10
|
+
"metadata":
|
|
11
|
+
{
|
|
12
|
+
"downloadUrl" : "{{{this.contentLocation}}}&isShallow=true"
|
|
13
|
+
}
|
|
14
|
+
}{{#unless @last}},{{/unless}}
|
|
15
|
+
{{/value}}
|
|
16
16
|
]
|
package/Providers/webClient.d.ts
CHANGED
package/Providers/webClient.js
CHANGED
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.WebClient = void 0;
|
|
13
|
-
|
|
13
|
+
// restrict usage of typed-rest-client to this file
|
|
14
|
+
const httpm = require("typed-rest-client/HttpClient");
|
|
14
15
|
var tl = require('azure-pipelines-task-lib/task');
|
|
15
16
|
var packagejson = require('../package.json');
|
|
16
17
|
class WebClient {
|
|
@@ -43,11 +44,13 @@ class WebClient {
|
|
|
43
44
|
var msg = tl.loc("FailedRequest", statusCode);
|
|
44
45
|
err = new Error(msg);
|
|
45
46
|
err['statusCode'] = statusCode;
|
|
47
|
+
// get the result from the body
|
|
46
48
|
try {
|
|
47
49
|
let result = yield res.readBody();
|
|
48
50
|
err['result'] = result;
|
|
49
51
|
}
|
|
50
52
|
catch (error) {
|
|
53
|
+
// Invalid contents; leaving result obj null
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
if (!!err) {
|
|
@@ -57,4 +60,3 @@ class WebClient {
|
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
exports.WebClient = WebClient;
|
|
60
|
-
//# sourceMappingURL=webClient.js.map
|
|
@@ -12,6 +12,7 @@ class WebClientFactory {
|
|
|
12
12
|
return new webClient_1.WebClient(handlers, options);
|
|
13
13
|
}
|
|
14
14
|
static initializeProxy(options) {
|
|
15
|
+
// try get proxy setting from environment variable set by azure-pipelines-task-lib if there is no proxy setting in the options
|
|
15
16
|
if (!options.proxy || !options.proxy.proxyUrl) {
|
|
16
17
|
if (global['_vsts_task_lib_proxy']) {
|
|
17
18
|
let proxyFromEnv = {
|
|
@@ -23,6 +24,7 @@ class WebClientFactory {
|
|
|
23
24
|
options.proxy = proxyFromEnv;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
27
|
+
// try get cert setting from environment variable set by azure-pipelines-task-lib if there is no cert setting in the options
|
|
26
28
|
if (!options.cert) {
|
|
27
29
|
if (global['_vsts_task_lib_cert']) {
|
|
28
30
|
let certFromEnv = {
|
|
@@ -34,17 +36,22 @@ class WebClientFactory {
|
|
|
34
36
|
options.cert = certFromEnv;
|
|
35
37
|
}
|
|
36
38
|
}
|
|
39
|
+
// try get ignore SSL error setting from environment variable set by azure-pipelines-task-lib if there is no ignore SSL error setting in the options
|
|
37
40
|
if (!options.ignoreSslError) {
|
|
38
41
|
options.ignoreSslError = !!global['_vsts_task_lib_skip_cert_validation'];
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
static _readTaskLibSecrets(lookupKey) {
|
|
45
|
+
// the lookupKey should has following format
|
|
46
|
+
// base64encoded<keyFilePath>:base64encoded<encryptedContent>
|
|
42
47
|
if (lookupKey && lookupKey.indexOf(':') > 0) {
|
|
43
48
|
let lookupInfo = lookupKey.split(':', 2);
|
|
49
|
+
// file contains encryption key and IV in "key:iv" format (task-lib 5.2.4+)
|
|
44
50
|
let keyFile = Buffer.from(lookupInfo[0], 'base64').toString('utf8');
|
|
45
51
|
let keyAndIv = fs.readFileSync(keyFile, 'utf8');
|
|
46
52
|
let [keyBase64, ivBase64] = keyAndIv.split(':', 2);
|
|
47
53
|
let encryptKey = Buffer.from(keyBase64, 'base64');
|
|
54
|
+
// Use IV from file if present (task-lib 5.2.4+), fall back to zero IV for older task-lib
|
|
48
55
|
let iv = ivBase64 ? Buffer.from(ivBase64, 'base64') : Buffer.alloc(16, 0);
|
|
49
56
|
let encryptedContent = Buffer.from(lookupInfo[1], 'base64').toString('utf8');
|
|
50
57
|
let decipher = crypto.createDecipheriv("aes-256-ctr", encryptKey, iv);
|
|
@@ -55,4 +62,3 @@ class WebClientFactory {
|
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
exports.WebClientFactory = WebClientFactory;
|
|
58
|
-
//# sourceMappingURL=webClientFactory.js.map
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import * as stream from 'stream';
|
|
2
4
|
import { ArtifactItem, IArtifactProvider } from '../Models';
|
|
3
5
|
import { ArtifactItemStore } from '../Store/artifactItemStore';
|
|
4
6
|
import { WebClient } from './webClient';
|
|
5
|
-
import { IRequestHandler, IRequestOptions } from '
|
|
7
|
+
import { IRequestHandler, IRequestOptions } from 'typed-rest-client/Interfaces';
|
|
8
|
+
declare module 'typed-rest-client/Interfaces' {
|
|
9
|
+
interface IRequestOptions {
|
|
10
|
+
requestCompressionForDownloads?: boolean;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
6
13
|
export declare class WebProvider implements IArtifactProvider {
|
|
7
14
|
artifactItemStore: ArtifactItemStore;
|
|
8
15
|
constructor(rootItemsLocation: any, templateFile: string, variables: any, handler: IRequestHandler, requestOptions?: IRequestOptions);
|
package/Providers/webProvider.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { ArtifactItemStore } from '../Store/artifactItemStore';
|
|
2
3
|
import { ArtifactItem, IArtifactProvider } from '../Models';
|
|
3
4
|
import { WebClient } from './webClient';
|
|
4
|
-
import { IRequestHandler, IRequestOptions } from '
|
|
5
|
+
import { IRequestHandler, IRequestOptions } from 'typed-rest-client/Interfaces';
|
|
5
6
|
export declare class ZipProvider implements IArtifactProvider {
|
|
6
7
|
artifactItemStore: ArtifactItemStore;
|
|
7
8
|
constructor(zipLocation: any, handler: IRequestHandler, requestOptions?: IRequestOptions);
|
package/Providers/zipProvider.js
CHANGED
package/README.md
CHANGED
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
# Artifact Engine
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
Artifact engine is a generic framework which supports download of artifacts from different providers like *jenkins, teamcity, vsts,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
# Artifact Engine
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Artifact engine is a generic framework which supports download of artifacts from different providers like *jenkins, teamcity, vsts, github-releases* etc.
|
|
5
|
+
The framework is extensible and other providers can be easily plugged in the downloader.
|
|
6
|
+
|
|
7
|
+
## How to Use
|
|
8
|
+
To use Artifact engine in your tasks or app have a look at [E2E.ts](E2ETests/jenkins.e2e.ts
|
|
9
|
+
).
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## Development
|
|
18
|
+
**Build**
|
|
19
|
+
---------
|
|
20
|
+
1. Run npm install in ArtifactEngineV2 folder
|
|
21
|
+
2. Use command ctrl-shift-b to build from vscode
|
|
22
|
+
|
|
23
|
+
**Testing**
|
|
24
|
+
----------
|
|
25
|
+
*vscode*
|
|
26
|
+
----------
|
|
27
|
+
1. Install [mocha sidebar](https://marketplace.visualstudio.com/items?itemName=maty.vscode-mocha-sidebar) extension to run tests from vscode.
|
|
28
|
+
2. Optional install [node tdd](https://marketplace.visualstudio.com/items?itemName=prashaantt.node-tdd) extension to automatically run tests on build.
|
|
29
|
+
|
|
30
|
+
*gulp*
|
|
31
|
+
------
|
|
32
|
+
1. To run ArtifactEngine integration and unit tests from root directory use
|
|
33
|
+
|
|
34
|
+
`gulp test --suite=ArtifactEngineV2`
|
|
35
|
+
2. To run Performance tests update [test config file](test.config.json.example) and rename it to test.config.json and run
|
|
36
|
+
|
|
37
|
+
`gulp test --suite=ArtifactEngineV2 --perf`
|
|
38
|
+
3. To run End-to-End tests update [test config file](test.config.json.example) and rename it to test.config.json and run
|
|
39
|
+
|
|
40
|
+
`gulp test --suite=ArtifactEngineV2 --e2e`
|
package/Store/index.js
CHANGED
|
@@ -3,4 +3,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ArtifactItemStore = void 0;
|
|
4
4
|
var artifactItemStore_1 = require("./artifactItemStore");
|
|
5
5
|
Object.defineProperty(exports, "ArtifactItemStore", { enumerable: true, get: function () { return artifactItemStore_1.ArtifactItemStore; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loc.messages.DownloadSummary": "Dateien gesamt: %s, verarbeitet: %s, übersprungen: %s, fehlerhaft: %s, Downloadzeit: %s Sek., Downloadgröße: %s",
|
|
3
|
-
"loc.messages.FailedToParseResponse": "Fehler beim Analysieren des Antworttexts: %s. Erhaltener Fehler: %s",
|
|
4
|
-
"loc.messages.DownloadingTo": "Download von \"%s\" nach \"%s\" wird durchgeführt.",
|
|
5
|
-
"loc.messages.DownloadedTo": "Download von \"%s\" nach \"%s\" wurde durchgeführt.",
|
|
6
|
-
"loc.messages.
|
|
7
|
-
"loc.messages.
|
|
8
|
-
"loc.messages.
|
|
9
|
-
"loc.messages.
|
|
10
|
-
"loc.messages.
|
|
11
|
-
"loc.messages.
|
|
1
|
+
{
|
|
2
|
+
"loc.messages.DownloadSummary": "Dateien gesamt: %s, verarbeitet: %s, übersprungen: %s, fehlerhaft: %s, Downloadzeit: %s Sek., Downloadgröße: %s",
|
|
3
|
+
"loc.messages.FailedToParseResponse": "Fehler beim Analysieren des Antworttexts: %s. Erhaltener Fehler: %s",
|
|
4
|
+
"loc.messages.DownloadingTo": "Download von \"%s\" nach \"%s\" wird durchgeführt.",
|
|
5
|
+
"loc.messages.DownloadedTo": "Download von \"%s\" nach \"%s\" wurde durchgeführt.",
|
|
6
|
+
"loc.messages.InvalidArtifactPath": "Artifact path %s resolves outside the download directory.",
|
|
7
|
+
"loc.messages.UnableToReadDirectory": "Das Verzeichnis \"%s\" kann nicht gelesen werden. Fehler: %s",
|
|
8
|
+
"loc.messages.RetryingDownload": "Download von \"%s\" wird erneut versucht, Wiederholungsanzahl: %s",
|
|
9
|
+
"loc.messages.SkippingItem": "Die Verarbeitung des Elements \"%s\" wird übersprungen.",
|
|
10
|
+
"loc.messages.UnhandledRejection": "artifact-engine-v2: nicht verarbeitete Zurückweisung %s",
|
|
11
|
+
"loc.messages.UnhandledException": "artifact-engine-v2: Ausnahmefehler %s",
|
|
12
|
+
"loc.messages.FailedRequest": "Fehlerhafte Anforderung: (statusCode)"
|
|
12
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loc.messages.DownloadSummary": "Total Files: %s, Processed: %s, Skipped: %s, Failed: %s, Download time: %s secs, Download size: %s",
|
|
3
|
-
"loc.messages.FailedToParseResponse": "Failed to parse response body: %s, got error : %s",
|
|
4
|
-
"loc.messages.DownloadingTo": "Downloading %s to %s",
|
|
5
|
-
"loc.messages.DownloadedTo": "Downloaded %s to %s",
|
|
6
|
-
"loc.messages.
|
|
7
|
-
"loc.messages.
|
|
8
|
-
"loc.messages.
|
|
9
|
-
"loc.messages.
|
|
10
|
-
"loc.messages.
|
|
11
|
-
"loc.messages.
|
|
1
|
+
{
|
|
2
|
+
"loc.messages.DownloadSummary": "Total Files: %s, Processed: %s, Skipped: %s, Failed: %s, Download time: %s secs, Download size: %s",
|
|
3
|
+
"loc.messages.FailedToParseResponse": "Failed to parse response body: %s, got error : %s",
|
|
4
|
+
"loc.messages.DownloadingTo": "Downloading %s to %s",
|
|
5
|
+
"loc.messages.DownloadedTo": "Downloaded %s to %s",
|
|
6
|
+
"loc.messages.InvalidArtifactPath": "Artifact path %s resolves outside the download directory.",
|
|
7
|
+
"loc.messages.UnableToReadDirectory": "Unable to read directory %s. Error: %s",
|
|
8
|
+
"loc.messages.RetryingDownload": "Retrying download of %s, retry count: %s",
|
|
9
|
+
"loc.messages.SkippingItem": "Skipped processing item %s",
|
|
10
|
+
"loc.messages.UnhandledRejection": "artifact-engine-v2: unhandled rejection %s",
|
|
11
|
+
"loc.messages.UnhandledException": "artifact-engine-v2: unhandled exception %s",
|
|
12
|
+
"loc.messages.FailedRequest": "Failed request: (statusCode)"
|
|
12
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loc.messages.DownloadSummary": "Total de archivos: %s, procesados: %s, omitidos: %s, con errores: %s, tiempo de descarga: %s segundos, tamaño de descarga: %s",
|
|
3
|
-
"loc.messages.FailedToParseResponse": "No se pudo analizar el cuerpo de la respuesta: %s. Error: %s",
|
|
4
|
-
"loc.messages.DownloadingTo": "Descargando %s en %s",
|
|
5
|
-
"loc.messages.DownloadedTo": "%s descargado en %s",
|
|
6
|
-
"loc.messages.
|
|
7
|
-
"loc.messages.
|
|
8
|
-
"loc.messages.
|
|
9
|
-
"loc.messages.
|
|
10
|
-
"loc.messages.
|
|
11
|
-
"loc.messages.
|
|
1
|
+
{
|
|
2
|
+
"loc.messages.DownloadSummary": "Total de archivos: %s, procesados: %s, omitidos: %s, con errores: %s, tiempo de descarga: %s segundos, tamaño de descarga: %s",
|
|
3
|
+
"loc.messages.FailedToParseResponse": "No se pudo analizar el cuerpo de la respuesta: %s. Error: %s",
|
|
4
|
+
"loc.messages.DownloadingTo": "Descargando %s en %s",
|
|
5
|
+
"loc.messages.DownloadedTo": "%s descargado en %s",
|
|
6
|
+
"loc.messages.InvalidArtifactPath": "Artifact path %s resolves outside the download directory.",
|
|
7
|
+
"loc.messages.UnableToReadDirectory": "No se puede leer el directorio %s. Error: %s",
|
|
8
|
+
"loc.messages.RetryingDownload": "Reintentando la descarga de %s, número de reintentos: %s",
|
|
9
|
+
"loc.messages.SkippingItem": "Procesamiento de %s omitido",
|
|
10
|
+
"loc.messages.UnhandledRejection": "artifact-engine-v2: rechazo no controlado: %s",
|
|
11
|
+
"loc.messages.UnhandledException": "artifact-engine-v2: excepción no controlada: %s",
|
|
12
|
+
"loc.messages.FailedRequest": "Error en la solicitud: (statusCode)"
|
|
12
13
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loc.messages.DownloadSummary": "Fichiers totaux : %s, Traités : %s, Ignorés : %s, En échec : %s, Durée du téléchargement : %s s, Taille du téléchargement : %s",
|
|
3
|
-
"loc.messages.FailedToParseResponse": "Échec d’analyse du corps de la réponse : %s, erreur : %s",
|
|
4
|
-
"loc.messages.DownloadingTo": "Téléchargement de %s à %s",
|
|
5
|
-
"loc.messages.DownloadedTo": "Téléchargé de %s à %s",
|
|
6
|
-
"loc.messages.
|
|
7
|
-
"loc.messages.
|
|
8
|
-
"loc.messages.
|
|
9
|
-
"loc.messages.
|
|
10
|
-
"loc.messages.
|
|
11
|
-
"loc.messages.
|
|
1
|
+
{
|
|
2
|
+
"loc.messages.DownloadSummary": "Fichiers totaux : %s, Traités : %s, Ignorés : %s, En échec : %s, Durée du téléchargement : %s s, Taille du téléchargement : %s",
|
|
3
|
+
"loc.messages.FailedToParseResponse": "Échec d’analyse du corps de la réponse : %s, erreur : %s",
|
|
4
|
+
"loc.messages.DownloadingTo": "Téléchargement de %s à %s",
|
|
5
|
+
"loc.messages.DownloadedTo": "Téléchargé de %s à %s",
|
|
6
|
+
"loc.messages.InvalidArtifactPath": "Artifact path %s resolves outside the download directory.",
|
|
7
|
+
"loc.messages.UnableToReadDirectory": "Impossible de lire le répertoire %s. Erreur : %s",
|
|
8
|
+
"loc.messages.RetryingDownload": "Nouvelle tentative de téléchargement de %s, nombre de tentatives : %s",
|
|
9
|
+
"loc.messages.SkippingItem": "Traitement de l’élément ignoré %s",
|
|
10
|
+
"loc.messages.UnhandledRejection": "artifact-engine-v2 : rejet non géré %s",
|
|
11
|
+
"loc.messages.UnhandledException": "artifact-engine-v2 : exception non gérée %s",
|
|
12
|
+
"loc.messages.FailedRequest": "Échec de la demande : (statusCode)"
|
|
12
13
|
}
|