nitor 1.7.0 → 1.7.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.
- package/package.json +1 -1
- package/services/utils.js +14 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitor",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "A comprehensive CLI toolkit for automating GitLab operations, AI-powered code review, build/deploy automation, MongoDB backup/restore, and developer productivity tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Nithin V <mails2nithin@gmail.com>",
|
package/services/utils.js
CHANGED
|
@@ -188,7 +188,7 @@ const generateBuildConfigs = (values = {}) => {
|
|
|
188
188
|
variables_attributes.push({
|
|
189
189
|
variable_type: 'env_var',
|
|
190
190
|
key: 'TAG',
|
|
191
|
-
|
|
191
|
+
value: values.instance,
|
|
192
192
|
});
|
|
193
193
|
|
|
194
194
|
if (!values.branch) {
|
|
@@ -208,7 +208,7 @@ const generateBuildConfigs = (values = {}) => {
|
|
|
208
208
|
// Client config
|
|
209
209
|
if (values.components.includes('client')) {
|
|
210
210
|
configs.client.config = makeConfig(`${gitlabConfig.url}/cxd/${project}-client/-/pipelines`, {
|
|
211
|
-
...dataBase,
|
|
211
|
+
pipeline: { ...dataBase },
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -227,16 +227,15 @@ const generateBuildConfigs = (values = {}) => {
|
|
|
227
227
|
{
|
|
228
228
|
variable_type: 'env_var',
|
|
229
229
|
key: 'APPS',
|
|
230
|
-
|
|
230
|
+
value: apps.join(' '),
|
|
231
231
|
},
|
|
232
232
|
]
|
|
233
233
|
: []),
|
|
234
234
|
],
|
|
235
235
|
};
|
|
236
|
-
configs.backend.config = makeConfig(
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
);
|
|
236
|
+
configs.backend.config = makeConfig(`${gitlabConfig.url}/cxd/${project}-backend/-/pipelines`, {
|
|
237
|
+
pipeline: backendData,
|
|
238
|
+
});
|
|
240
239
|
}
|
|
241
240
|
|
|
242
241
|
return { configs: removeEmpty(configs, true) };
|
|
@@ -275,7 +274,7 @@ const generateDeployConfigs = (values = {}) => {
|
|
|
275
274
|
variables_attributes.push({
|
|
276
275
|
variable_type: 'env_var',
|
|
277
276
|
key: 'IMAGE_TAG',
|
|
278
|
-
|
|
277
|
+
value: values.instance,
|
|
279
278
|
});
|
|
280
279
|
}
|
|
281
280
|
|
|
@@ -283,7 +282,7 @@ const generateDeployConfigs = (values = {}) => {
|
|
|
283
282
|
variables_attributes.push({
|
|
284
283
|
variable_type: 'env_var',
|
|
285
284
|
key: 'INSTANCE',
|
|
286
|
-
|
|
285
|
+
value: imageTagMap[values.instance] || values.instance,
|
|
287
286
|
});
|
|
288
287
|
}
|
|
289
288
|
|
|
@@ -291,20 +290,22 @@ const generateDeployConfigs = (values = {}) => {
|
|
|
291
290
|
variables_attributes.push({
|
|
292
291
|
variable_type: 'env_var',
|
|
293
292
|
key: 'COMPONENT',
|
|
294
|
-
|
|
293
|
+
value: 'client-pilot',
|
|
295
294
|
});
|
|
296
295
|
} else {
|
|
297
296
|
variables_attributes.push({
|
|
298
297
|
variable_type: 'env_var',
|
|
299
298
|
key: 'COMPONENT',
|
|
300
|
-
|
|
299
|
+
value: values.components || 'client',
|
|
301
300
|
});
|
|
302
301
|
}
|
|
303
302
|
|
|
304
303
|
const project = projectMap[values.project] || projectMap.portal;
|
|
305
304
|
const configs = makeConfig(`${gitlabConfig.url}/cxd/${project}-deployment/-/pipelines`, {
|
|
306
|
-
|
|
307
|
-
|
|
305
|
+
pipeline: {
|
|
306
|
+
ref: `refs/heads/${deploymentBranchMap[values.instance]}`,
|
|
307
|
+
variables_attributes,
|
|
308
|
+
},
|
|
308
309
|
});
|
|
309
310
|
|
|
310
311
|
return { configs: removeEmpty(configs, true) };
|