polyci 0.1.7 → 0.1.9
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 +5 -3
- package/package.json +1 -1
- package/readme.md +19 -0
package/dist/main.js
CHANGED
|
@@ -194,6 +194,7 @@ function appendModuleBuildJob(lines, module) {
|
|
|
194
194
|
lines.push(` artifacts:`);
|
|
195
195
|
lines.push(` paths:`);
|
|
196
196
|
lines.push(` - ${module.modulePath}/dist`);
|
|
197
|
+
lines.push(` - ${module.modulePath}/node_modules`);
|
|
197
198
|
lines.push(` - ${module.modulePath}/polyci.env`);
|
|
198
199
|
lines.push(` expire_in: 1 day`);
|
|
199
200
|
lines.push(``);
|
|
@@ -216,7 +217,7 @@ function appendModuleTestJob(lines, module) {
|
|
|
216
217
|
lines.push(` - source "ci/${module.moduleType}/test.sh"`);
|
|
217
218
|
lines.push(` artifacts:`);
|
|
218
219
|
lines.push(` paths:`);
|
|
219
|
-
lines.push(` - ${module.modulePath}/dist`);
|
|
220
|
+
// lines.push(` - ${module.modulePath}/dist`);
|
|
220
221
|
lines.push(` - ${module.modulePath}/polyci.env`);
|
|
221
222
|
lines.push(``);
|
|
222
223
|
}
|
|
@@ -268,7 +269,7 @@ function appendModuleReleaseJob(lines, module, tagPattern, branchTagPattern, mai
|
|
|
268
269
|
lines.push(` fi`);
|
|
269
270
|
lines.push(` artifacts:`);
|
|
270
271
|
lines.push(` paths:`);
|
|
271
|
-
lines.push(` - ${module.modulePath}/dist`);
|
|
272
|
+
// lines.push(` - ${module.modulePath}/dist`);
|
|
272
273
|
lines.push(` - ${module.modulePath}/polyci.env`);
|
|
273
274
|
lines.push(` expire_in: 1 day`);
|
|
274
275
|
lines.push(``);
|
|
@@ -326,7 +327,7 @@ function appendGlobalReleaseJob(lines, modules) {
|
|
|
326
327
|
lines.push(` artifacts:`);
|
|
327
328
|
lines.push(` paths:`);
|
|
328
329
|
for (const module of modules) {
|
|
329
|
-
lines.push(` - ${module.modulePath}/dist`);
|
|
330
|
+
// lines.push(` - ${module.modulePath}/dist`);
|
|
330
331
|
lines.push(` - ${module.modulePath}/polyci.env`);
|
|
331
332
|
lines.push(` - ${module.modulePath}/package.json`);
|
|
332
333
|
}
|
|
@@ -340,6 +341,7 @@ function appendModulePublishJob(lines, module) {
|
|
|
340
341
|
lines.push(` - changes:`);
|
|
341
342
|
lines.push(` - ${module.modulePath}/**/*`);
|
|
342
343
|
lines.push(` needs:`);
|
|
344
|
+
lines.push(` - job: ${module.moduleName}-build`);
|
|
343
345
|
lines.push(` - job: release`);
|
|
344
346
|
lines.push(` image: $IMAGE_NODE`);
|
|
345
347
|
lines.push(` script:`);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -48,7 +48,26 @@ If there is no new version, publish and deploy finish successfuly doing nothing.
|
|
|
48
48
|
|
|
49
49
|
For **docker-service** deploy type: a Docker host with Traefik 3.
|
|
50
50
|
|
|
51
|
+
## PLI_ variables
|
|
52
|
+
|
|
53
|
+
Jobs receive module context via `PLI_`-prefixed variables, written to `polyci.env` and sourced between stages.
|
|
54
|
+
|
|
55
|
+
| Variable | Set by | Description |
|
|
56
|
+
|----------|--------|-------------|
|
|
57
|
+
| `PLI_MODULE_NAME` | build | Module name (directory name under modules-root) |
|
|
58
|
+
| `PLI_MODULE_PATH` | build | Path to the module directory |
|
|
59
|
+
| `PLI_MODULE_TYPE` | build | Module type (e.g. `node-vite`, `node-express`, `docker-service`) |
|
|
60
|
+
| `PLI_MODULE_VERSION` | release | Version string; set only when there is a new release |
|
|
61
|
+
| `PLI_MODULE_TAG` | release | Git tag for the module (e.g. `module-name-v1.0.0`) |
|
|
62
|
+
| `PLI_PACKAGE_NAME` | deploy scripts | `name` from `package.json` (used by node-docker deploy) |
|
|
63
|
+
| `PLI_INSTANCE_CONTAINER` | deploy scripts | `{PLI_PACKAGE_NAME}-{CI_COMMIT_BRANCH}` for docker-service |
|
|
64
|
+
| `PLI_INSTANCE_DOMAIN` | deploy scripts | Domain(s) from `package.json`; branch-prefixed for non-main |
|
|
65
|
+
|
|
51
66
|
## Recommendations
|
|
52
67
|
|
|
53
68
|
- **Do not modify the built-in module types** (`node-vite`, `node-express`, `npm-package`). Copy and customize a new type under `ci/` instead.
|
|
54
69
|
- **Avoid heavy setup in `release.sh`** — Module releases run sequentially in a single container; installing extra packages or changing the environment can slow or break the job.
|
|
70
|
+
|
|
71
|
+
## Usage
|
|
72
|
+
|
|
73
|
+
When a polyci branch is merged into main branch the latest commit is often a polyci release commit. As a result the merge itself is ignored by polyci and the main branch is not published and deployed. To avoid this, just add an ampty commit after merge before you push to the repository.
|