@eui/tools 6.20.5 → 6.20.7
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.20.
|
|
1
|
+
6.20.7
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.20.7 (2024-08-07)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* add authenticate git option for standalone pkg - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([ad7b09ab](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ad7b09ab47c955b25467d3fe18b69e95e155b03e))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.20.6 (2024-08-07)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* add debugGitUpdates option in case of git failure pipeline side - EUI-9788 [EUI-9788](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-9788) ([d0a40904](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d0a40904f4666d008484e5c0dc7600521b8fd39b))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.20.5 (2024-08-07)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -255,6 +255,7 @@ module.exports.updateConfig = (args = { project, projects, packages, packagesBra
|
|
|
255
255
|
|
|
256
256
|
const getConvertedOptions = (config) => {
|
|
257
257
|
let configOptions = {
|
|
258
|
+
GIT_HOST_REMOTE: null,
|
|
258
259
|
DEVOPS_METADATA_REPOSITORY: null,
|
|
259
260
|
DEVOPS_METADATA_LOCKS_REPOSITORY: null,
|
|
260
261
|
DEVOPS_METADATA_PATH: null,
|
|
@@ -282,6 +283,16 @@ const getConvertedOptions = (config) => {
|
|
|
282
283
|
AUDIT_STYLES_GATES: null
|
|
283
284
|
}
|
|
284
285
|
|
|
286
|
+
// getting issues manager options
|
|
287
|
+
const gitHost = config && config.git;
|
|
288
|
+
|
|
289
|
+
if (gitHost) {
|
|
290
|
+
if (gitHost.remote) {
|
|
291
|
+
configOptions.GIT_HOST_REMOTE = gitHost.remote;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
285
296
|
// getting devops metadata options
|
|
286
297
|
const devopsMetadata = config && config.devopsMetadata;
|
|
287
298
|
|
|
@@ -234,6 +234,11 @@ module.exports.getPackagePaths = (pkg) => {
|
|
|
234
234
|
|
|
235
235
|
module.exports.getStandalonePackage = () => {
|
|
236
236
|
const basePath = path.join(process.cwd());
|
|
237
|
+
const { pkgName } = tools.getArgs();
|
|
238
|
+
|
|
239
|
+
if (!pkgName) {
|
|
240
|
+
throw new Error('pkgName not provided as pipeline argument');
|
|
241
|
+
}
|
|
237
242
|
|
|
238
243
|
const packageJsonPath = path.join(basePath, 'package.json');
|
|
239
244
|
|
|
@@ -241,13 +246,14 @@ module.exports.getStandalonePackage = () => {
|
|
|
241
246
|
throw new Error('PACKAGE_JSON_NOT_FOUND');
|
|
242
247
|
}
|
|
243
248
|
|
|
244
|
-
// get package.json information (
|
|
249
|
+
// get package.json information (current version)
|
|
245
250
|
const packageJson = require(packageJsonPath);
|
|
246
251
|
|
|
247
252
|
const pkg = {
|
|
248
253
|
csdr: false,
|
|
249
254
|
standalone: true,
|
|
250
|
-
|
|
255
|
+
name: pkgName,
|
|
256
|
+
version: packageJson.version,
|
|
251
257
|
paths: {
|
|
252
258
|
root: basePath,
|
|
253
259
|
dist: path.join(basePath, 'dist'),
|
|
@@ -520,6 +520,11 @@ module.exports.runGitOperations = (pkg, version) => {
|
|
|
520
520
|
|
|
521
521
|
console.log(branches);
|
|
522
522
|
|
|
523
|
+
// authenticate for standalone pkg
|
|
524
|
+
if (pkg.standalone) {
|
|
525
|
+
utils.git.authenticate(pkg, pkg.paths.root);
|
|
526
|
+
}
|
|
527
|
+
|
|
523
528
|
if (pkg.remote && pkg.build && pkg.build.envTargetActive) {
|
|
524
529
|
utils.tools.logInfo('Remote - with envTargetActive set - commit package only');
|
|
525
530
|
|
|
@@ -11,7 +11,7 @@ const { getPackageConfig } = require('./notification/config');
|
|
|
11
11
|
// const versionUtils = require('./version-utils');
|
|
12
12
|
|
|
13
13
|
// FETCH ARGS
|
|
14
|
-
const { dryRun, git, debug, build, skipGitUpdates } = tools.getArgs();
|
|
14
|
+
const { dryRun, git, debug, debugGitUpdates, build, skipGitUpdates } = tools.getArgs();
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
const getLastTag = (folder) => {
|
|
@@ -103,9 +103,9 @@ const commitAndPush = (branch, message, folder) => {
|
|
|
103
103
|
} catch (e2) {
|
|
104
104
|
tools.logError('ERROR');
|
|
105
105
|
console.log('ERROR!!!');
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
if (debugGitUpdates) {
|
|
107
|
+
console.log(e2);
|
|
108
|
+
}
|
|
109
109
|
|
|
110
110
|
try {
|
|
111
111
|
tools.logInfo('Commit and push - second try - retrying pull & push');
|
|
@@ -113,7 +113,7 @@ const commitAndPush = (branch, message, folder) => {
|
|
|
113
113
|
execa.sync('git', ['push', 'origin', branch], { cwd: folder });
|
|
114
114
|
|
|
115
115
|
} catch (e3) {
|
|
116
|
-
if (
|
|
116
|
+
if (debugGitUpdates) {
|
|
117
117
|
console.log(e3);
|
|
118
118
|
}
|
|
119
119
|
throw new Error(`Failed to push ${message} to ${folder}`);
|
|
@@ -264,6 +264,21 @@ const getGitHost = (externalRepo) => {
|
|
|
264
264
|
return '';
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
const authenticate = (pkg, folder) => {
|
|
268
|
+
tools.logTitle('GIT authentication');
|
|
269
|
+
|
|
270
|
+
const auth = process.env.gituser && process.env.gitpassword ? `${process.env.gituser}:${process.env.gitpassword}@` : '';
|
|
271
|
+
const gitHost = configUtils.global.getConfigOptionsStandalone().GIT_HOST_REMOTE;
|
|
272
|
+
|
|
273
|
+
if (skipGitUpdates) {
|
|
274
|
+
tools.logInfo('DRY RUN - skipping');
|
|
275
|
+
tools.logInfo(`executing : for host: ${gitHost} - auth: ${auth} - pkgName: ${pkg.name}`);
|
|
276
|
+
} else {
|
|
277
|
+
execa.sync('git', ['remote', '--push', 'origin', `https://${auth}${gitHost}${pkg.name}.git`], { cwd: folder, stdio: 'inherit'});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
|
|
267
282
|
|
|
268
283
|
const cloneRepo = (repoUri, folder, forced = false, shallow = false, externalRepo = false) => {
|
|
269
284
|
if (!repoUri) {
|
|
@@ -428,6 +443,7 @@ module.exports.tagVersion = tagVersion;
|
|
|
428
443
|
module.exports.mergeMasterToDevelop = mergeMasterToDevelop;
|
|
429
444
|
module.exports.mergeSupportToSupportDevelop = mergeSupportToSupportDevelop;
|
|
430
445
|
module.exports.cloneRepo = cloneRepo;
|
|
446
|
+
module.exports.authenticate = authenticate;
|
|
431
447
|
module.exports.checkout = checkout;
|
|
432
448
|
module.exports.cloneAndCheckout = cloneAndCheckout;
|
|
433
449
|
module.exports.getLastCommitAuthor = getLastCommitAuthor;
|