polyci 0.1.1 → 0.1.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/dist/main.js +10 -3
- package/package.json +1 -1
- package/readme.md +4 -0
package/dist/main.js
CHANGED
|
@@ -341,7 +341,6 @@ function appendModulePublishJob(lines, module) {
|
|
|
341
341
|
lines.push(` - changes:`);
|
|
342
342
|
lines.push(` - ${module.modulePath}/**/*`);
|
|
343
343
|
lines.push(` needs:`);
|
|
344
|
-
lines.push(` - job: ${module.moduleName}-test`);
|
|
345
344
|
lines.push(` - job: release`);
|
|
346
345
|
lines.push(` image: $IMAGE_NODE`);
|
|
347
346
|
lines.push(` script:`);
|
|
@@ -350,7 +349,11 @@ function appendModulePublishJob(lines, module) {
|
|
|
350
349
|
lines.push(` - cd ${module.modulePath}`);
|
|
351
350
|
lines.push(` - cat polyci.env`);
|
|
352
351
|
lines.push(` - source polyci.env`);
|
|
353
|
-
lines.push(` -
|
|
352
|
+
lines.push(` - if [ -n "\${PLI_MODULE_VERSION:-}" ]; then`);
|
|
353
|
+
lines.push(` source "ci/${module.moduleType}/publish.sh"`);
|
|
354
|
+
lines.push(` else`);
|
|
355
|
+
lines.push(` echo "No new version. Skipping publish."`);
|
|
356
|
+
lines.push(` fi`);
|
|
354
357
|
lines.push(` artifacts:`);
|
|
355
358
|
lines.push(` paths:`);
|
|
356
359
|
lines.push(` - ${module.modulePath}/polyci.env`);
|
|
@@ -372,7 +375,11 @@ function appendModuleDeployJob(lines, module) {
|
|
|
372
375
|
lines.push(` - cd ${module.modulePath}`);
|
|
373
376
|
lines.push(` - cat polyci.env`);
|
|
374
377
|
lines.push(` - source polyci.env`);
|
|
375
|
-
lines.push(` -
|
|
378
|
+
lines.push(` - if [ -n "\${PLI_MODULE_VERSION:-}" ]; then`);
|
|
379
|
+
lines.push(` source "ci/${module.moduleType}/deploy.sh"`);
|
|
380
|
+
lines.push(` else`);
|
|
381
|
+
lines.push(` echo "No new version. Skipping deploy."`);
|
|
382
|
+
lines.push(` fi`);
|
|
376
383
|
lines.push(``);
|
|
377
384
|
}
|
|
378
385
|
function buildPipeline(modules, mainBranch, versionTemplate, branchVersionTemplate, tagTemplate, tagPattern, branchTagPattern) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -37,6 +37,10 @@ npx polyci --modules-root modules polyci-pipeline.yml
|
|
|
37
37
|
| `--branch-tag-pattern <pattern>` | Tag regex for non-main branches (with `?<increment>`) | — |
|
|
38
38
|
| `--cwd <path>` | Working directory | current directory |
|
|
39
39
|
|
|
40
|
+
## Description
|
|
41
|
+
|
|
42
|
+
If there is no new version, publish and deploy finish successfuly doing nothing.
|
|
43
|
+
|
|
40
44
|
## Requirements
|
|
41
45
|
|
|
42
46
|
- **POLYCI_TOKEN** — GitLab OAuth token for pushing tags; must be defined in GitLab CI/CD variables and available to jobs that run the release stage.
|