artifact-engine 2.275.2 → 2.279.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.
Files changed (66) hide show
  1. package/Engine/artifactEngine.js +2 -1
  2. package/Engine/artifactEngineOptions.js +0 -1
  3. package/Engine/cilogger.js +2 -2
  4. package/Engine/index.js +0 -1
  5. package/Engine/logger.js +0 -1
  6. package/Engine/worker.js +0 -1
  7. package/Models/artifactDownloadTicket.js +0 -1
  8. package/Models/artifactItem.js +0 -1
  9. package/Models/artifactprovider.d.ts +1 -0
  10. package/Models/artifactprovider.js +0 -1
  11. package/Models/constants.js +0 -1
  12. package/Models/index.js +0 -1
  13. package/Models/itemType.js +1 -2
  14. package/Models/ticketState.js +1 -2
  15. package/Providers/filesystemProvider.d.ts +1 -0
  16. package/Providers/filesystemProvider.js +19 -2
  17. package/Providers/index.js +0 -1
  18. package/Providers/jenkins.handlebars +10 -10
  19. package/Providers/stubProvider.d.ts +1 -0
  20. package/Providers/stubProvider.js +0 -1
  21. package/Providers/teamcity.handlebars +24 -24
  22. package/Providers/vsts.handlebars +15 -15
  23. package/Providers/webClient.d.ts +1 -1
  24. package/Providers/webClient.js +4 -2
  25. package/Providers/webClientFactory.js +7 -1
  26. package/Providers/webProvider.d.ts +8 -1
  27. package/Providers/webProvider.js +0 -1
  28. package/Providers/zipProvider.d.ts +2 -1
  29. package/Providers/zipProvider.js +0 -1
  30. package/README.md +40 -39
  31. package/Store/artifactItemStore.js +0 -1
  32. package/Store/index.js +0 -1
  33. package/Strings/resources.resjson/de-DE/resources.resjson +12 -11
  34. package/Strings/resources.resjson/en-US/resources.resjson +12 -11
  35. package/Strings/resources.resjson/es-ES/resources.resjson +12 -11
  36. package/Strings/resources.resjson/fr-FR/resources.resjson +12 -11
  37. package/Strings/resources.resjson/it-IT/resources.resjson +12 -11
  38. package/Strings/resources.resjson/ja-JP/resources.resjson +12 -11
  39. package/Strings/resources.resjson/ko-KR/resources.resjson +12 -11
  40. package/Strings/resources.resjson/ru-RU/resources.resjson +12 -11
  41. package/Strings/resources.resjson/zh-CN/resources.resjson +12 -11
  42. package/Strings/resources.resjson/zh-TW/resources.resjson +12 -11
  43. package/ThirdPartyNotices.txt +925 -925
  44. package/lib.json +14 -13
  45. package/package.json +62 -64
  46. package/Providers/typed-rest-client/Handlers.d.ts +0 -4
  47. package/Providers/typed-rest-client/Handlers.js +0 -12
  48. package/Providers/typed-rest-client/HttpClient.d.ts +0 -76
  49. package/Providers/typed-rest-client/HttpClient.js +0 -328
  50. package/Providers/typed-rest-client/Index.d.ts +0 -1
  51. package/Providers/typed-rest-client/Index.js +0 -3
  52. package/Providers/typed-rest-client/Interfaces.d.ts +0 -39
  53. package/Providers/typed-rest-client/Interfaces.js +0 -4
  54. package/Providers/typed-rest-client/RestClient.d.ts +0 -26
  55. package/Providers/typed-rest-client/RestClient.js +0 -134
  56. package/Providers/typed-rest-client/Util.d.ts +0 -1
  57. package/Providers/typed-rest-client/Util.js +0 -17
  58. package/Providers/typed-rest-client/handlers/basiccreds.d.ts +0 -9
  59. package/Providers/typed-rest-client/handlers/basiccreds.js +0 -20
  60. package/Providers/typed-rest-client/handlers/bearertoken.d.ts +0 -8
  61. package/Providers/typed-rest-client/handlers/bearertoken.js +0 -19
  62. package/Providers/typed-rest-client/handlers/ntlm.d.ts +0 -13
  63. package/Providers/typed-rest-client/handlers/ntlm.js +0 -107
  64. package/Providers/typed-rest-client/handlers/personalaccesstoken.d.ts +0 -8
  65. package/Providers/typed-rest-client/handlers/personalaccesstoken.js +0 -19
  66. package/Providers/typed-rest-client/opensource/node-http-ntlm/ntlm.js +0 -386
@@ -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
  }
@@ -163,4 +165,3 @@ process.on('uncaughtException', (err) => {
163
165
  logger_1.Logger.logError(tl.loc("UnhandledException", err));
164
166
  throw err;
165
167
  });
166
- //# sourceMappingURL=artifactEngine.js.map
@@ -12,4 +12,3 @@ class ArtifactEngineOptions {
12
12
  }
13
13
  }
14
14
  exports.ArtifactEngineOptions = ArtifactEngineOptions;
15
- //# sourceMappingURL=artifactEngineOptions.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.publishEvent = 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
- //# sourceMappingURL=cilogger.js.map
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
@@ -109,4 +109,3 @@ class Logger {
109
109
  }
110
110
  }
111
111
  exports.Logger = Logger;
112
- //# sourceMappingURL=logger.js.map
package/Engine/worker.js CHANGED
@@ -48,4 +48,3 @@ class Worker {
48
48
  }
49
49
  }
50
50
  exports.Worker = Worker;
51
- //# sourceMappingURL=worker.js.map
@@ -4,4 +4,3 @@ exports.ArtifactDownloadTicket = void 0;
4
4
  class ArtifactDownloadTicket {
5
5
  }
6
6
  exports.ArtifactDownloadTicket = ArtifactDownloadTicket;
7
- //# sourceMappingURL=artifactDownloadTicket.js.map
@@ -7,4 +7,3 @@ class ArtifactItem {
7
7
  }
8
8
  }
9
9
  exports.ArtifactItem = ArtifactItem;
10
- //# sourceMappingURL=artifactItem.js.map
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { ArtifactItem } from "./artifactItem";
2
3
  import { ArtifactItemStore } from '../Store/artifactItemStore';
3
4
  export interface IArtifactProvider {
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=artifactprovider.js.map
@@ -5,4 +5,3 @@ class Constants {
5
5
  }
6
6
  exports.Constants = Constants;
7
7
  Constants.DestinationUrlKey = "destinationUrl";
8
- //# sourceMappingURL=constants.js.map
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
@@ -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 || (exports.ItemType = ItemType = {}));
10
- //# sourceMappingURL=itemType.js.map
9
+ })(ItemType = exports.ItemType || (exports.ItemType = {}));
@@ -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 || (exports.TicketState = TicketState = {}));
12
- //# sourceMappingURL=ticketState.js.map
11
+ })(TicketState = exports.TicketState || (exports.TicketState = {}));
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import * as models from '../Models';
2
3
  import { ArtifactItemStore } from '../Store/artifactItemStore';
3
4
  export declare class FilesystemProvider implements models.IArtifactProvider {
@@ -43,10 +43,27 @@ class FilesystemProvider {
43
43
  }
44
44
  putArtifactItem(item, stream) {
45
45
  return new Promise((resolve, reject) => {
46
- const outputItemPath = path.join(this._rootLocation, item.path);
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
@@ -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,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import * as models from '../Models';
2
3
  import { ItemType } from '../Models';
3
4
  import { ArtifactItemStore } from '../Store/artifactItemStore';
@@ -85,4 +85,3 @@ class StubProvider {
85
85
  }
86
86
  }
87
87
  exports.StubProvider = StubProvider;
88
- //# sourceMappingURL=stubProvider.js.map
@@ -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
  ]
@@ -1,4 +1,4 @@
1
- import * as httpm from './typed-rest-client/HttpClient';
1
+ import * as httpm from 'typed-rest-client/HttpClient';
2
2
  export declare class WebClient {
3
3
  private httpc;
4
4
  constructor(handlers: any, options: any);
@@ -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
- const httpm = require("./typed-rest-client/HttpClient");
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 './typed-rest-client/Interfaces';
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);
@@ -132,4 +132,3 @@ class WebProvider {
132
132
  }
133
133
  }
134
134
  exports.WebProvider = WebProvider;
135
- //# sourceMappingURL=webProvider.js.map
@@ -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 './typed-rest-client/Interfaces';
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);
@@ -52,4 +52,3 @@ class ZipProvider {
52
52
  }
53
53
  }
54
54
  exports.ZipProvider = ZipProvider;
55
- //# sourceMappingURL=zipProvider.js.map
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, circleci, github-releases* e.t.c. The framework is extensible and other providers can be easily plugged in the downloader.
5
-
6
- ## How to Use
7
- To use Artifact engine in your tasks or app have a look at [E2E.ts](E2ETests/jenkins.e2e.ts
8
- ).
9
-
10
- ## Usage
11
- ![Daily downloads using artifact engine](https://github.com/Microsoft/azure-pipelines-extensions/blob/master/Extensions/ArtifactEngine/usage.png)
12
-
13
- ## Architecture
14
- ![Architecture](https://github.com/Microsoft/azure-pipelines-extensions/blob/master/Extensions/ArtifactEngine/sequence.svg)
15
-
16
- ## Development
17
- **Build**
18
- ---------
19
- 1. Run npm install in ArtifactEngineV2 folder
20
- 2. Use command ctrl-shift-b to build from vscode
21
-
22
- **Testing**
23
- ----------
24
- *vscode*
25
- ----------
26
- 1. Install [mocha sidebar](https://marketplace.visualstudio.com/items?itemName=maty.vscode-mocha-sidebar) extension to run tests from vscode.
27
- 2. Optional install [node tdd](https://marketplace.visualstudio.com/items?itemName=prashaantt.node-tdd) extension to automatically run tests on build.
28
-
29
- *gulp*
30
- ------
31
- 1. To run ArtifactEngine integration and unit tests from root directory use
32
-
33
- `gulp test --suite=ArtifactEngineV2`
34
- 2. To run Performance tests update [test config file](test.config.json.example) and rename it to test.config.json and run
35
-
36
- `gulp test --suite=ArtifactEngineV2 --perf`
37
- 3. To run End-to-End tests update [test config file](test.config.json.example) and rename it to test.config.json and run
38
-
39
- `gulp test --suite=ArtifactEngineV2 --e2e`
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
+ ![Daily downloads using artifact engine](https://github.com/Microsoft/azure-pipelines-extensions/blob/master/Extensions/ArtifactEngine/usage.png)
13
+
14
+ ## Architecture
15
+ ![Architecture](https://github.com/Microsoft/azure-pipelines-extensions/blob/master/Extensions/ArtifactEngine/sequence.svg)
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`
@@ -93,4 +93,3 @@ class ArtifactItemStore {
93
93
  }
94
94
  }
95
95
  exports.ArtifactItemStore = ArtifactItemStore;
96
- //# sourceMappingURL=artifactItemStore.js.map
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.UnableToReadDirectory": "Das Verzeichnis \"%s\" kann nicht gelesen werden. Fehler: %s",
7
- "loc.messages.RetryingDownload": "Download von \"%s\" wird erneut versucht, Wiederholungsanzahl: %s",
8
- "loc.messages.SkippingItem": "Die Verarbeitung des Elements \"%s\" wird übersprungen.",
9
- "loc.messages.UnhandledRejection": "artifact-engine-v2: nicht verarbeitete Zurückweisung %s",
10
- "loc.messages.UnhandledException": "artifact-engine-v2: Ausnahmefehler %s",
11
- "loc.messages.FailedRequest": "Fehlerhafte Anforderung: (statusCode)"
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.UnableToReadDirectory": "Unable to read directory %s. Error: %s",
7
- "loc.messages.RetryingDownload": "Retrying download of %s, retry count: %s",
8
- "loc.messages.SkippingItem": "Skipped processing item %s",
9
- "loc.messages.UnhandledRejection": "artifact-engine-v2: unhandled rejection %s",
10
- "loc.messages.UnhandledException": "artifact-engine-v2: unhandled exception %s",
11
- "loc.messages.FailedRequest": "Failed request: (statusCode)"
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.UnableToReadDirectory": "No se puede leer el directorio %s. Error: %s",
7
- "loc.messages.RetryingDownload": "Reintentando la descarga de %s, número de reintentos: %s",
8
- "loc.messages.SkippingItem": "Procesamiento de %s omitido",
9
- "loc.messages.UnhandledRejection": "artifact-engine-v2: rechazo no controlado: %s",
10
- "loc.messages.UnhandledException": "artifact-engine-v2: excepción no controlada: %s",
11
- "loc.messages.FailedRequest": "Error en la solicitud: (statusCode)"
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.UnableToReadDirectory": "Impossible de lire le répertoire %s. Erreur : %s",
7
- "loc.messages.RetryingDownload": "Nouvelle tentative de téléchargement de %s, nombre de tentatives : %s",
8
- "loc.messages.SkippingItem": "Traitement de l’élément ignoré %s",
9
- "loc.messages.UnhandledRejection": "artifact-engine-v2 : rejet non géré %s",
10
- "loc.messages.UnhandledException": "artifact-engine-v2 : exception non gérée %s",
11
- "loc.messages.FailedRequest": "Échec de la demande : (statusCode)"
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
  }