@eui/tools 6.14.13 → 6.14.15
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/.version.properties +1 -1
- package/CHANGELOG.md +25 -0
- package/package.json +1 -1
- package/sandbox.js +67 -7
- package/scripts/csdr/config/angular.js +1 -1
- package/scripts/csdr/config/packages.js +10 -12
- package/scripts/csdr/metadata/metadata-utils.js +1 -0
- package/scripts/csdr/metadata/package-history.js +3 -2
- package/scripts/csdr/metadata/package.js +2 -2
- package/scripts/csdr/metadata/remote-package.js +36 -0
- package/scripts/csdr/release/package/build-pr-scan.js +13 -2
- package/scripts/csdr/release/package/release-old-remote.js +197 -0
- package/scripts/csdr/release/package/release-package.js +4 -0
- package/scripts/csdr/release/package/release-ui.js +22 -60
- package/scripts/csdr/release/package/release-virtual-remote.js +2 -3
- package/scripts/index.js +3 -2
- package/scripts/utils/remotes/remotes-utils.js +0 -7
- package/scripts/utils/sonar/sonar-utils.js +1 -1
- package/scripts/csdr/release/package/remote.js +0 -33
- package/scripts/csdr/release/package/ui.js +0 -33
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.14.
|
|
1
|
+
6.14.15
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## 6.14.15 (2023-12-10)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* cleanup and separated old remotes build from active virtual ones + ui pkg - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([326c5744](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/326c5744709f0b72a426cf8bf1791550da7a0f9f))
|
|
7
|
+
##### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **other:**
|
|
10
|
+
* wrong import ([79af9329](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/79af9329abc8d787f25af7c3a235d4bba860322e))
|
|
11
|
+
* wrong variable used ([da85cad7](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/da85cad719e13948a91cb9d81cedcd39fdd259a2))
|
|
12
|
+
* missing imports - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([29d1f40d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/29d1f40da882b4501a9b9ac6bfeac8ca89c5967e))
|
|
13
|
+
* remove old import - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([675b4752](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/675b4752cf5b471fe1b7e6ceac57f6ec64b8572d))
|
|
14
|
+
|
|
15
|
+
* * *
|
|
16
|
+
* * *
|
|
17
|
+
## 6.14.14 (2023-12-09)
|
|
18
|
+
|
|
19
|
+
##### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **other:**
|
|
22
|
+
* diffmetadata report for remote package - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([3ec8966a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/3ec8966ae7a509fa2683e68e8791dd1fd32935bb))
|
|
23
|
+
|
|
24
|
+
* * *
|
|
25
|
+
* * *
|
|
1
26
|
## 6.14.13 (2023-12-09)
|
|
2
27
|
|
|
3
28
|
##### Bug Fixes
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -1431,13 +1431,73 @@ const publishUtils = require('./scripts/utils/publish/publish-utils');
|
|
|
1431
1431
|
// })
|
|
1432
1432
|
|
|
1433
1433
|
|
|
1434
|
+
// Promise.resolve()
|
|
1435
|
+
// .then(() => {
|
|
1436
|
+
// const pkg = configUtils.packages.getPackage('cc-decidepoc-ui', true);
|
|
1437
|
+
// console.log(pkg);
|
|
1438
|
+
// const versions = metadataUtils.package.getPackageVersions(pkg);
|
|
1439
|
+
// console.log(JSON.stringify(versions, null, 2));
|
|
1440
|
+
// })
|
|
1441
|
+
// .catch((e) => {
|
|
1442
|
+
// console.log(e);
|
|
1443
|
+
// })
|
|
1444
|
+
|
|
1445
|
+
// Promise.resolve()
|
|
1446
|
+
// .then(() => {
|
|
1447
|
+
// const remote = configUtils.remotes.getRemote('cc-pmm-participants-eui15-remote-el-ui');
|
|
1448
|
+
// const npmInfos = metadataUtils.packageHistory.getPackageNpmInfos(remote);
|
|
1449
|
+
// console.log(npmInfos);
|
|
1450
|
+
// // return metadataUtils.packageHistory.generateDiffReport(remote, 'TST');
|
|
1451
|
+
// })
|
|
1452
|
+
// // .then((output) => { console.log(output)})
|
|
1453
|
+
// .catch((e) => {
|
|
1454
|
+
// console.log(e);
|
|
1455
|
+
// })
|
|
1456
|
+
|
|
1457
|
+
// Promise.resolve()
|
|
1458
|
+
// .then(() => {
|
|
1459
|
+
// const pkg = configUtils.packages.getPackage('mywp-shell-ui');
|
|
1460
|
+
// const fromTag = 'v3.3.2';
|
|
1461
|
+
// const toTag = 'v3.3.4';
|
|
1462
|
+
// return metadataUtils.commit.getMetadata(pkg, {fromTag, toTag});
|
|
1463
|
+
// })
|
|
1464
|
+
// .then((output) => {
|
|
1465
|
+
// console.log(output);
|
|
1466
|
+
// })
|
|
1467
|
+
|
|
1468
|
+
// Promise.resolve()
|
|
1469
|
+
// .then(() => {
|
|
1470
|
+
// const dPath = path.join(process.cwd(), 'packages', 'devops-metadata');
|
|
1471
|
+
// let files = tools.getFiles(dPath);
|
|
1472
|
+
// files = files.filter(f => f.indexOf('-lib-') > -1);
|
|
1473
|
+
// console.log(files.length);
|
|
1474
|
+
// files.forEach(f => {
|
|
1475
|
+
// console.log(f);
|
|
1476
|
+
// // tools.remove(path.join(dPath, f));
|
|
1477
|
+
// });
|
|
1478
|
+
// })
|
|
1479
|
+
|
|
1480
|
+
// test commit history gathering
|
|
1481
|
+
|
|
1482
|
+
// "name": "eac-pmm-lib-ui",
|
|
1483
|
+
// "old": "3.17.2-3",
|
|
1484
|
+
// "new": "3.18.0",
|
|
1485
|
+
|
|
1486
|
+
// "name": "eac-pmm-shared-ui",
|
|
1487
|
+
// "old": "3.25.3-0",
|
|
1488
|
+
// "new": "3.26.0",
|
|
1489
|
+
|
|
1490
|
+
// "name": "eac-pmm-lib-budget-ui",
|
|
1491
|
+
// "old": "3.15.6-0",
|
|
1492
|
+
// "new": "3.16.0",
|
|
1493
|
+
|
|
1494
|
+
// "name": "cc-pmm-participants-ui",
|
|
1495
|
+
// "old": "3.27.3-2",
|
|
1496
|
+
// "new": "3.28.0",
|
|
1497
|
+
|
|
1434
1498
|
Promise.resolve()
|
|
1435
1499
|
.then(() => {
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
console.log(JSON.stringify(versions, null, 2));
|
|
1440
|
-
})
|
|
1441
|
-
.catch((e) => {
|
|
1442
|
-
console.log(e);
|
|
1500
|
+
// const test = configUtils.packages.isRemote('sedia-mop-eui10-remote-el-ui');
|
|
1501
|
+
const test = configUtils.packages.isRemote('sedia-mop-ui');
|
|
1502
|
+
console.log(test);
|
|
1443
1503
|
})
|
|
@@ -99,7 +99,7 @@ module.exports.registerAngularPackage = (pkg, isReset) => {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
let srcRoot = '/src', srcRootTesting = '';
|
|
102
|
-
if (pkg.
|
|
102
|
+
if (!pkg.srcRootDefault) {
|
|
103
103
|
srcRoot = '';
|
|
104
104
|
srcRootTesting = '/testing'
|
|
105
105
|
}
|
|
@@ -22,8 +22,6 @@ module.exports.getCsdrPackagesFull = (flattenChildren = true) => {
|
|
|
22
22
|
try {
|
|
23
23
|
outputPackages.push(this.getPackage(p, true));
|
|
24
24
|
} catch (e) {
|
|
25
|
-
// tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
26
|
-
// console.log(e);
|
|
27
25
|
}
|
|
28
26
|
});
|
|
29
27
|
return outputPackages;
|
|
@@ -38,8 +36,6 @@ const getPackages = (module.exports.getPackages = () => {
|
|
|
38
36
|
try {
|
|
39
37
|
outputPackages.push(this.getPackage(p));
|
|
40
38
|
} catch (e) {
|
|
41
|
-
// tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
42
|
-
// console.log(e);
|
|
43
39
|
}
|
|
44
40
|
});
|
|
45
41
|
return outputPackages;
|
|
@@ -65,8 +61,6 @@ module.exports.getPackageByNpmPkg = (npmPkg, fromCsdrConfig) => {
|
|
|
65
61
|
if (pkg) {
|
|
66
62
|
return this.getPackage(pkg, fromCsdrConfig);
|
|
67
63
|
}
|
|
68
|
-
|
|
69
|
-
return;
|
|
70
64
|
};
|
|
71
65
|
|
|
72
66
|
module.exports.getPackageByRepository = (repository, fromCsdrConfig) => {
|
|
@@ -89,11 +83,9 @@ module.exports.getPackageByRepository = (repository, fromCsdrConfig) => {
|
|
|
89
83
|
if (pkg) {
|
|
90
84
|
return this.getPackage(pkg, fromCsdrConfig);
|
|
91
85
|
}
|
|
92
|
-
|
|
93
|
-
return;
|
|
94
86
|
};
|
|
95
87
|
|
|
96
|
-
|
|
88
|
+
module.exports.isLocalPackage = (npmPkg) => {
|
|
97
89
|
tools.logInfo(`Checking if ${npmPkg} is localled installed`);
|
|
98
90
|
|
|
99
91
|
const packagesFound = getPackages().filter((p) => p.npmPkg === npmPkg);
|
|
@@ -123,7 +115,7 @@ module.exports.getPackage = (pkgName, fromCsdrConfig, optional) => {
|
|
|
123
115
|
let pkg = packages[pkgName];
|
|
124
116
|
|
|
125
117
|
if (!pkg && !optional) {
|
|
126
|
-
throw 'PACKAGE_NOT_FOUND';
|
|
118
|
+
throw new Error('PACKAGE_NOT_FOUND');
|
|
127
119
|
}
|
|
128
120
|
|
|
129
121
|
// optional call should not do anything
|
|
@@ -207,8 +199,7 @@ module.exports.getPackagePaths = (pkg) => {
|
|
|
207
199
|
}
|
|
208
200
|
|
|
209
201
|
// Remotes specific, to switch install root dir to the remote folder itself (independent dependencies / angular & eUI version, etc...)
|
|
210
|
-
|
|
211
|
-
remoteNodeModules = false;
|
|
202
|
+
let repoNodeModules, remoteNodeModules = false;
|
|
212
203
|
const depsBaseFile = path.join(resolvePath(packagesPath + '/' + folder), 'dependencies-base.json');
|
|
213
204
|
const depsCompositeFile = path.join(resolvePath(packagesPath + '/' + folder), 'dependencies-composite.json');
|
|
214
205
|
if (pkg.remote && (tools.isFileExists(depsBaseFile) || tools.isFileExists(depsCompositeFile))) {
|
|
@@ -252,6 +243,13 @@ module.exports.getRemotePackages = () => {
|
|
|
252
243
|
});
|
|
253
244
|
};
|
|
254
245
|
|
|
246
|
+
module.exports.isRemote = (pkgName) => {
|
|
247
|
+
const packagesConfig = require(path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json'));
|
|
248
|
+
const packageConfig = packagesConfig[pkgName];
|
|
249
|
+
|
|
250
|
+
return packageConfig.remote || false;
|
|
251
|
+
}
|
|
252
|
+
|
|
255
253
|
module.exports.getBuildablePackagesWithDeps = () => {
|
|
256
254
|
return this.getDepGraph()
|
|
257
255
|
.overallOrder()
|
|
@@ -11,4 +11,5 @@ module.exports.package = require('./package');
|
|
|
11
11
|
module.exports.packageHistory = require('./package-history');
|
|
12
12
|
module.exports.packageEnvs = require('./package-envs');
|
|
13
13
|
module.exports.packageVersions = require('./package-versions');
|
|
14
|
+
module.exports.remotePackage = require('./remote-package');
|
|
14
15
|
module.exports.stats = require('./stats');
|
|
@@ -13,6 +13,7 @@ const configUtils = require('../config/config-utils');
|
|
|
13
13
|
|
|
14
14
|
// INNER MODULES
|
|
15
15
|
const innerPackage = require('./package');
|
|
16
|
+
const innerRemotePackage = require('./remote-package');
|
|
16
17
|
|
|
17
18
|
// FETCH ARGS
|
|
18
19
|
const { dryRun } = tools.getArgs();
|
|
@@ -246,7 +247,7 @@ const getDiffByEnvTarget = (pkg, envTarget) => {
|
|
|
246
247
|
|
|
247
248
|
return Promise.resolve()
|
|
248
249
|
.then(() => {
|
|
249
|
-
return
|
|
250
|
+
return innerRemotePackage.getPackageVersionsLatest(pkg);
|
|
250
251
|
})
|
|
251
252
|
|
|
252
253
|
.then((pkgVersions) => {
|
|
@@ -295,7 +296,7 @@ const generateDiffReport = (pkg, envTarget, fromVersion, toVersion) => {
|
|
|
295
296
|
} else {
|
|
296
297
|
return Promise.resolve()
|
|
297
298
|
.then(() => {
|
|
298
|
-
return
|
|
299
|
+
return innerRemotePackage.getPackageVersionsLatest(pkg);
|
|
299
300
|
})
|
|
300
301
|
|
|
301
302
|
.then((pkgVersions) => {
|
|
@@ -310,11 +310,11 @@ const getPackageVersionsByMajor = (pkg, major, isMaster, isDevEnvTarget) => {
|
|
|
310
310
|
if (!isDevEnvTarget) {
|
|
311
311
|
if (debug) {
|
|
312
312
|
tools.logInfo(
|
|
313
|
-
'----=>
|
|
313
|
+
'----=> excluding RC release of versions found for non-DEV build (preventing RC releases to go to another env than DEV'
|
|
314
314
|
);
|
|
315
315
|
}
|
|
316
316
|
versions = versions.filter((v) => !v.rc);
|
|
317
|
-
if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding
|
|
317
|
+
if (debug) tools.logInfo(`----> ${versions.length} metadata versions excluding RC version type`);
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
return versions;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// GLOBAL
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
// LOCAL
|
|
7
|
+
const tools = require('../../utils/tools');
|
|
8
|
+
const configUtils = require('../config/config-utils');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const getPackageVersionsJson = (pkg) => {
|
|
12
|
+
if (!pkg) {
|
|
13
|
+
tools.logWarning('provided pkg is empty...skipping');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
tools.logInfo(`Getting package versions for : ${pkg.name}...`);
|
|
18
|
+
|
|
19
|
+
const configOptions = configUtils.global.getConfigOptions();
|
|
20
|
+
|
|
21
|
+
const pkgMetadataFile = path.join(configOptions.DEVOPS_METADATA_PATH, pkg.devopsVersionsMetadataFile);
|
|
22
|
+
|
|
23
|
+
tools.logInfo(`from ${pkgMetadataFile}`);
|
|
24
|
+
|
|
25
|
+
return tools.getJsonFileContent(pkgMetadataFile);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
module.exports.getPackageVersionsLatest = (pkg) => {
|
|
29
|
+
const pkgVersionsJson = getPackageVersionsJson(pkg);
|
|
30
|
+
|
|
31
|
+
if (pkgVersionsJson && pkgVersionsJson.versions) {
|
|
32
|
+
return pkgVersionsJson.versions.filter((v) => {
|
|
33
|
+
return v.version.indexOf('snapshot') === -1;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -11,7 +11,6 @@ const configUtils = require('../../config/config-utils');
|
|
|
11
11
|
|
|
12
12
|
// INNER MODULES
|
|
13
13
|
const innerCommon = require('./common');
|
|
14
|
-
const innerUi = require('./ui');
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
module.exports.run = () => {
|
|
@@ -43,7 +42,19 @@ module.exports.run = () => {
|
|
|
43
42
|
|
|
44
43
|
// INSTALL dependencies by type
|
|
45
44
|
.then(() => {
|
|
46
|
-
return
|
|
45
|
+
return Promise.resolve()
|
|
46
|
+
// FETCHING CURRENT PACKAGES & INSTALL
|
|
47
|
+
.then(() => {
|
|
48
|
+
// fetch related project if passed as arguments
|
|
49
|
+
const prj = configUtils.projects.getProject();
|
|
50
|
+
|
|
51
|
+
// install the dependencies for current package build
|
|
52
|
+
return installUtils.buildPackage.installPackage(prj, pkg, false);
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
.catch((e) => {
|
|
56
|
+
throw e;
|
|
57
|
+
})
|
|
47
58
|
})
|
|
48
59
|
|
|
49
60
|
// BUILD PACKAGE
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// TO BE DEPRECATED AND REMOVES ONCE ALL REMOTES HAVE BEEN MIGRATED TO VIRTUAL
|
|
4
|
+
// REMAINING "OLD" REMOTES are located only in the .csdr/.euirc-csdr-packages.json file
|
|
5
|
+
// the new ones / virtual are only located in the .csdr/.euirc-csdr-remotes.json
|
|
6
|
+
|
|
7
|
+
// GLOBAL
|
|
8
|
+
const path = require('path');
|
|
9
|
+
|
|
10
|
+
// UTILS
|
|
11
|
+
const utils = require('../../../utils');
|
|
12
|
+
|
|
13
|
+
// CSDR RELATED
|
|
14
|
+
const configUtils = require('../../config/config-utils');
|
|
15
|
+
const metadataUtils = require('../../metadata/metadata-utils');
|
|
16
|
+
const installUtils = require('../../install/install-utils');
|
|
17
|
+
|
|
18
|
+
// INNER MODULES
|
|
19
|
+
const innerCommon = require('./common');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
module.exports.run = () => {
|
|
23
|
+
utils.tools.logBanner('Starting UI pipeline');
|
|
24
|
+
|
|
25
|
+
// fetching package from config based on default arg
|
|
26
|
+
const pkg = configUtils.packages.getPackage();
|
|
27
|
+
|
|
28
|
+
// checking if the package can be retrieved from args
|
|
29
|
+
if (!pkg.name) {
|
|
30
|
+
utils.tools.logError('ERROR : "package" NOT PROVIDED as argument !!!');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Get branches flags
|
|
35
|
+
const branches = innerCommon.getBranches();
|
|
36
|
+
|
|
37
|
+
// Get envTarget (used by remotes)
|
|
38
|
+
const envTarget = innerCommon.getEnvTarget();
|
|
39
|
+
|
|
40
|
+
// Get compositeType (used by remotes)
|
|
41
|
+
const compositeType = innerCommon.getCompositeType();
|
|
42
|
+
|
|
43
|
+
// local saved vars
|
|
44
|
+
let newVersion, pkgMetadata, pkgCompositeDeps;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
return Promise.resolve()
|
|
48
|
+
|
|
49
|
+
// RELEASE PACKAGE START
|
|
50
|
+
.then(() => {
|
|
51
|
+
return innerCommon.init(pkg, envTarget, compositeType);
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
// FOR UI and REMOTES clone metadata repositories
|
|
55
|
+
.then(() => {
|
|
56
|
+
return innerCommon.cloneMetadataRepos(pkg);
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
// PRE-RELEASE & COMMON CHECKS
|
|
60
|
+
.then(() => {
|
|
61
|
+
return innerCommon.preReleaseChecks(pkg);
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
// FETCHING COMMITS METADATA
|
|
65
|
+
.then(() => {
|
|
66
|
+
return metadataUtils.commit.getMetadata(pkg);
|
|
67
|
+
})
|
|
68
|
+
.then((metadata) => {
|
|
69
|
+
pkgMetadata = metadata;
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
// COMMIT METADATA CHECKS
|
|
73
|
+
.then(() => {
|
|
74
|
+
return innerCommon.commitMetadataChecks(pkg);
|
|
75
|
+
})
|
|
76
|
+
.then((metadata) => {
|
|
77
|
+
pkgMetadata = metadata;
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// EXECUTING PRE BUILD SCRIPT IF AVAILABLE
|
|
82
|
+
.then(() => {
|
|
83
|
+
return innerCommon.preBuild(pkg);
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
// INSTALL dependencies by type
|
|
88
|
+
.then(() => {
|
|
89
|
+
return Promise.resolve()
|
|
90
|
+
// FETCHING CURRENT PACKAGES & INSTALL
|
|
91
|
+
.then(() => {
|
|
92
|
+
// install the dependencies for current package build
|
|
93
|
+
return installUtils.buildPackage.installRemote(pkg, envTarget, compositeType);
|
|
94
|
+
})
|
|
95
|
+
.then((compositeDeps) => {
|
|
96
|
+
// storing for later use
|
|
97
|
+
pkgCompositeDeps = compositeDeps;
|
|
98
|
+
})
|
|
99
|
+
.catch((e) => {
|
|
100
|
+
throw e;
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
// BUILD PACKAGE
|
|
106
|
+
.then(() => {
|
|
107
|
+
return utils.buildPackage.build(pkg, branches.isMaster);
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
// GENERATE and UPDATE new version
|
|
111
|
+
.then(() => {
|
|
112
|
+
return innerCommon.updateVersion(pkg, pkgMetadata, envTarget);
|
|
113
|
+
})
|
|
114
|
+
.then((version) => {
|
|
115
|
+
// storing version for later use
|
|
116
|
+
newVersion = version;
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
// EXECUTING GLOBAL POST BUILD
|
|
122
|
+
.then(() => {
|
|
123
|
+
return innerCommon.postBuild(pkg, newVersion);
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
// STORING METADATA ASSETS
|
|
128
|
+
.then(() => {
|
|
129
|
+
return innerCommon.storeMetadataAssets(pkg, pkgCompositeDeps);
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
// PUBLISH PACKAGE
|
|
134
|
+
.then(() => {
|
|
135
|
+
return utils.publish.publish(pkg);
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
// EXECUTING POST PUBLISH SCRIPT IF AVAILABLE
|
|
140
|
+
.then(() => {
|
|
141
|
+
return utils.publish.postPublish(pkg);
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
// GIT OPERATIONS
|
|
147
|
+
.then(() => {
|
|
148
|
+
return innerCommon.runGitOperations(pkg, newVersion);
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
// STORING CENTRALIZED METADATA
|
|
152
|
+
.then(() => {
|
|
153
|
+
// get run duration
|
|
154
|
+
const duration = utils.pipeline.getTimerDuration();
|
|
155
|
+
if (branches.isMaster) {
|
|
156
|
+
return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
// STORING PACKAGE HISTORY
|
|
161
|
+
.then(() => {
|
|
162
|
+
if (branches.isMaster) {
|
|
163
|
+
return innerCommon.generateDiffReport(pkg, newVersion);
|
|
164
|
+
}
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
// COMMITING METADATA
|
|
168
|
+
.then(() => {
|
|
169
|
+
if (branches.isMaster) {
|
|
170
|
+
return innerCommon.commitMetadata(pkg, newVersion);
|
|
171
|
+
}
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
// EXPORT ADDITIONAL PIPELINE VARIABLES
|
|
175
|
+
.then(() => {
|
|
176
|
+
return innerCommon.exportPipelineVariables(pkg, compositeType);
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
// SEND SUCCESS NOTIFICATION
|
|
180
|
+
.then(() => {
|
|
181
|
+
return innerCommon.sendSuccessNotification(pkg, newVersion, pkgMetadata)
|
|
182
|
+
.then(() => {
|
|
183
|
+
return innerCommon.close(pkg);
|
|
184
|
+
});
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
// SEND ERROR NOTIFICATION
|
|
188
|
+
.catch((e) => {
|
|
189
|
+
return innerCommon.sendErrorNotification(pkg, e, pkgMetadata)
|
|
190
|
+
.then(() => {
|
|
191
|
+
return innerCommon.close(pkg);
|
|
192
|
+
})
|
|
193
|
+
.then(() => {
|
|
194
|
+
process.exit(1);
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}
|
|
@@ -7,6 +7,7 @@ const configUtils = require('../../config/config-utils');
|
|
|
7
7
|
// INNER MODULES
|
|
8
8
|
const innerReleaseVirtualRemote = require('./release-virtual-remote');
|
|
9
9
|
const innerReleaseUi = require('./release-ui');
|
|
10
|
+
const innerReleaseOldRemote = require('./release-old-remote');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
module.exports.run = () => {
|
|
@@ -29,9 +30,12 @@ module.exports.run = () => {
|
|
|
29
30
|
.then(() => {
|
|
30
31
|
const pkgName = tools.getArgs().root;
|
|
31
32
|
const isVirtualRemote = configUtils.remotes.isVirtualRemote(pkgName);
|
|
33
|
+
const isOldRemote = configUtils.packages.isRemote(pkgName);
|
|
32
34
|
|
|
33
35
|
if (isVirtualRemote) {
|
|
34
36
|
return innerReleaseVirtualRemote.run();
|
|
37
|
+
} else if (isOldRemote) {
|
|
38
|
+
return innerReleaseOldRemote.run();
|
|
35
39
|
} else {
|
|
36
40
|
return innerReleaseUi.run();
|
|
37
41
|
}
|
|
@@ -10,11 +10,10 @@ const utils = require('../../../utils');
|
|
|
10
10
|
const configUtils = require('../../config/config-utils');
|
|
11
11
|
const metadataUtils = require('../../metadata/metadata-utils');
|
|
12
12
|
const auditUtils = require('../../audit/audit-utils');
|
|
13
|
+
const installUtils = require('../../install/install-utils');
|
|
13
14
|
|
|
14
15
|
// INNER MODULES
|
|
15
16
|
const innerCommon = require('./common');
|
|
16
|
-
const innerUi = require('./ui');
|
|
17
|
-
const innerRemote = require('./remote');
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
module.exports.run = () => {
|
|
@@ -38,9 +37,8 @@ module.exports.run = () => {
|
|
|
38
37
|
// Get compositeType (used by remotes)
|
|
39
38
|
const compositeType = innerCommon.getCompositeType();
|
|
40
39
|
|
|
41
|
-
|
|
42
40
|
// local saved vars
|
|
43
|
-
|
|
41
|
+
let newVersion, pkgMetadata, pkgCompositeDeps;
|
|
44
42
|
|
|
45
43
|
|
|
46
44
|
return Promise.resolve()
|
|
@@ -85,33 +83,23 @@ module.exports.run = () => {
|
|
|
85
83
|
|
|
86
84
|
// INSTALL dependencies by type
|
|
87
85
|
.then(() => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
// AUDIT DEPENDENCIES
|
|
108
|
-
.then(() => {
|
|
109
|
-
return auditUtils.yarn.audit(pkg);
|
|
110
|
-
})
|
|
111
|
-
.catch((e) => {
|
|
112
|
-
throw e;
|
|
113
|
-
})
|
|
114
|
-
}
|
|
86
|
+
return Promise.resolve()
|
|
87
|
+
// FETCHING CURRENT PACKAGES & INSTALL
|
|
88
|
+
.then(() => {
|
|
89
|
+
// fetch related project if passed as arguments
|
|
90
|
+
const prj = configUtils.projects.getProject();
|
|
91
|
+
|
|
92
|
+
// install the dependencies for current package build
|
|
93
|
+
return installUtils.buildPackage.installPackage(prj, pkg, branches.isMaster);
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
// AUDIT DEPENDENCIES
|
|
97
|
+
.then(() => {
|
|
98
|
+
return auditUtils.yarn.audit(pkg);
|
|
99
|
+
})
|
|
100
|
+
.catch((e) => {
|
|
101
|
+
throw e;
|
|
102
|
+
})
|
|
115
103
|
})
|
|
116
104
|
|
|
117
105
|
|
|
@@ -119,10 +107,6 @@ module.exports.run = () => {
|
|
|
119
107
|
.then(() => {
|
|
120
108
|
return utils.buildPackage.build(pkg, branches.isMaster);
|
|
121
109
|
})
|
|
122
|
-
.then((report) => {
|
|
123
|
-
// storing audit styles metadata for storage
|
|
124
|
-
auditStylesReport = report;
|
|
125
|
-
})
|
|
126
110
|
|
|
127
111
|
|
|
128
112
|
// EXECUTING SONAR ANALYSIS
|
|
@@ -143,9 +127,7 @@ module.exports.run = () => {
|
|
|
143
127
|
|
|
144
128
|
// GENERATE CHANGELOG
|
|
145
129
|
.then(() => {
|
|
146
|
-
|
|
147
|
-
return innerCommon.generateChangelog(pkg, newVersion, pkgMetadata);
|
|
148
|
-
}
|
|
130
|
+
return innerCommon.generateChangelog(pkg, newVersion, pkgMetadata);
|
|
149
131
|
})
|
|
150
132
|
|
|
151
133
|
|
|
@@ -155,12 +137,6 @@ module.exports.run = () => {
|
|
|
155
137
|
})
|
|
156
138
|
|
|
157
139
|
|
|
158
|
-
// STORING METADATA ASSETS
|
|
159
|
-
.then(() => {
|
|
160
|
-
return innerCommon.storeMetadataAssets(pkg, pkgCompositeDeps);
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
|
|
164
140
|
// PUBLISH PACKAGE
|
|
165
141
|
.then(() => {
|
|
166
142
|
return utils.publish.publish(pkg);
|
|
@@ -183,32 +159,18 @@ module.exports.run = () => {
|
|
|
183
159
|
.then(() => {
|
|
184
160
|
// get run duration
|
|
185
161
|
const duration = utils.pipeline.getTimerDuration();
|
|
186
|
-
if (branches.isMaster
|
|
162
|
+
if (branches.isMaster) {
|
|
187
163
|
return innerCommon.storeMetadata(pkg, newVersion, pkgMetadata, pkgCompositeDeps, duration, envTarget);
|
|
188
164
|
}
|
|
189
165
|
})
|
|
190
166
|
|
|
191
|
-
// STORING PACKAGE HISTORY
|
|
192
|
-
.then(() => {
|
|
193
|
-
if (branches.isMaster && pkg.remote) {
|
|
194
|
-
return innerCommon.generateDiffReport(pkg, newVersion);
|
|
195
|
-
}
|
|
196
|
-
})
|
|
197
|
-
|
|
198
167
|
// COMMITING METADATA
|
|
199
168
|
.then(() => {
|
|
200
|
-
if (branches.isMaster
|
|
169
|
+
if (branches.isMaster) {
|
|
201
170
|
return innerCommon.commitMetadata(pkg, newVersion);
|
|
202
171
|
}
|
|
203
172
|
})
|
|
204
173
|
|
|
205
|
-
// EXPORT ADDITIONAL PIPELINE VARIABLES
|
|
206
|
-
.then(() => {
|
|
207
|
-
if (pkg.remote) {
|
|
208
|
-
return innerCommon.exportPipelineVariables(pkg, compositeType);
|
|
209
|
-
}
|
|
210
|
-
})
|
|
211
|
-
|
|
212
174
|
// SEND SUCCESS NOTIFICATION
|
|
213
175
|
.then(() => {
|
|
214
176
|
return innerCommon.sendSuccessNotification(pkg, newVersion, pkgMetadata)
|
|
@@ -8,11 +8,10 @@ const utils = require('../../../utils');
|
|
|
8
8
|
|
|
9
9
|
// CSDR RELATED
|
|
10
10
|
const configUtils = require('../../config/config-utils');
|
|
11
|
+
const installUtils = require('../../install/install-utils');
|
|
11
12
|
|
|
12
13
|
// INNER MODULES
|
|
13
14
|
const innerCommon = require('./common');
|
|
14
|
-
const innerRemote = require('./remote');
|
|
15
|
-
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
|
|
@@ -63,7 +62,7 @@ module.exports.run = () => {
|
|
|
63
62
|
|
|
64
63
|
// INSTALL dependencies by type
|
|
65
64
|
.then(() => {
|
|
66
|
-
return
|
|
65
|
+
return installUtils.buildPackage.installRemote(pkg, envTarget, compositeType);
|
|
67
66
|
})
|
|
68
67
|
.then((compositeDeps) => {
|
|
69
68
|
// storing for later use
|
package/scripts/index.js
CHANGED
|
@@ -149,8 +149,9 @@ module.exports.realeaseAppGroup = require('./csdr/release/app/release-app-group'
|
|
|
149
149
|
module.exports.releasePackageCommon = require('./csdr/release/package/common');
|
|
150
150
|
module.exports.releasePackage = require('./csdr/release/package/release-package');
|
|
151
151
|
module.exports.releaseBackend = require('./csdr/release/package/release-backend');
|
|
152
|
-
module.exports.
|
|
153
|
-
module.exports.
|
|
152
|
+
module.exports.releaseUi = require('./csdr/release/package/release-ui');
|
|
153
|
+
module.exports.releaseOldRemote = require('./csdr/release/package/release-old-remote');
|
|
154
|
+
module.exports.releaseVirtualRemote = require('./csdr/release/package/release-virtual-remote');
|
|
154
155
|
module.exports.buildPrScan = require('./csdr/release/package/build-pr-scan');
|
|
155
156
|
|
|
156
157
|
// csdr - sync
|
|
@@ -30,13 +30,6 @@ module.exports.concatFiles = (pkg, workingPath, euiVersionNumber = 10) => {
|
|
|
30
30
|
return concat(files, outFilePath);
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
// TODO
|
|
34
|
-
// .then(() => {
|
|
35
|
-
// tools.logInfo('Checking elements assets replacement for non-mwp app delivery (sedia, ...)');
|
|
36
|
-
|
|
37
|
-
// const mainFileContent = tools.getFileContent(path.join(workingPath, 'main.js'));
|
|
38
|
-
// })
|
|
39
|
-
|
|
40
33
|
.catch((e) => {
|
|
41
34
|
throw e;
|
|
42
35
|
})
|
|
@@ -108,7 +108,7 @@ const runUI = (pkg, isMaster) => {
|
|
|
108
108
|
return gitUtils.getShortHash(pkg.paths.root);
|
|
109
109
|
})
|
|
110
110
|
.then((gitShortHash) => {
|
|
111
|
-
const hasSubEntries = pkg.
|
|
111
|
+
const hasSubEntries = !pkg.srcRootDefault;
|
|
112
112
|
return templateUtils.generateSonarPropertiesUI(
|
|
113
113
|
pkg.name, gitShortHash, pkg.paths.root, hasSubEntries
|
|
114
114
|
);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// GLOBAL
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const installUtils = require('../../install/install-utils');
|
|
6
|
-
const tools = require('../../../utils/tools');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
module.exports.install = (pkg, envTarget, compositeType) => {
|
|
10
|
-
tools.logBanner('INSTALL');
|
|
11
|
-
|
|
12
|
-
var pkgCompositeDeps = {};
|
|
13
|
-
|
|
14
|
-
return Promise.resolve()
|
|
15
|
-
|
|
16
|
-
// FETCHING CURRENT PACKAGES & INSTALL
|
|
17
|
-
.then(() => {
|
|
18
|
-
// install the dependencies for current package build
|
|
19
|
-
return installUtils.buildPackage.installRemote(pkg, envTarget, compositeType);
|
|
20
|
-
})
|
|
21
|
-
.then((compositeDeps) => {
|
|
22
|
-
// save composite deps for later exports
|
|
23
|
-
pkgCompositeDeps = compositeDeps;
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
.then(() => {
|
|
27
|
-
return pkgCompositeDeps;
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
.catch((e) => {
|
|
31
|
-
throw e;
|
|
32
|
-
})
|
|
33
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// LOCAL
|
|
4
|
-
const installUtils = require('../../install/install-utils');
|
|
5
|
-
const configUtils = require('../../config/config-utils');
|
|
6
|
-
const tools = require('../../../utils/tools');
|
|
7
|
-
|
|
8
|
-
// ARGS
|
|
9
|
-
const { skipInstall } = tools.getArgs();
|
|
10
|
-
|
|
11
|
-
module.exports.install = (pkg, isMaster) => {
|
|
12
|
-
tools.logBanner('INSTALL');
|
|
13
|
-
|
|
14
|
-
if (skipInstall) {
|
|
15
|
-
tools.logInfo('Installation skipped...aborting');
|
|
16
|
-
return Promise.resolve;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return Promise.resolve()
|
|
20
|
-
|
|
21
|
-
// FETCHING CURRENT PACKAGES & INSTALL
|
|
22
|
-
.then(() => {
|
|
23
|
-
// fetch related project if passed as arguments
|
|
24
|
-
const prj = configUtils.projects.getProject();
|
|
25
|
-
|
|
26
|
-
// install the dependencies for current package build
|
|
27
|
-
return installUtils.buildPackage.installPackage(prj, pkg, isMaster);
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
.catch((e) => {
|
|
31
|
-
throw e;
|
|
32
|
-
})
|
|
33
|
-
}
|