polyci 0.0.34 → 0.0.36

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 CHANGED
@@ -7,7 +7,7 @@ const log = pino(pretty());
7
7
  const DEFAULT_TAG_TEMPLATE = "{module}-v{version}";
8
8
  const DEFAULT_VERSION_TEMPLATE = "{version}";
9
9
  const DEFAULT_BRANCH_VERSION_TEMPLATE = "{version}-{branch}-{increment}";
10
- const DEFAULT_TAG_PATTERN = "^$MODULE_NAME-v(?<version>\\d+(\\.\\d+)*)-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*)$";
10
+ const DEFAULT_TAG_PATTERN = "^$PLI_MODULE_NAME-v(?<version>\\d+(\\.\\d+)*)(-$CI_COMMIT_BRANCH-(?<increment>\\d+(\\.\\d+)*))?$";
11
11
  const ALLOWED_TAG_PLACEHOLDERS = new Set(["module", "version"]);
12
12
  const ALLOWED_VERSION_PLACEHOLDERS = new Set(["branch", "version", "increment"]);
13
13
  function applyVersionTemplate(template) {
@@ -230,6 +230,8 @@ function appendModuleReleaseJob(lines, module, tagPattern, mainBranch, versionTe
230
230
  lines.push(` script:`);
231
231
  lines.push(` - apk update`);
232
232
  lines.push(` - apk add $GIT_PACKAGE`);
233
+ lines.push(` - cat "${module.modulePath}/polyci.env"`);
234
+ lines.push(` - source "${module.modulePath}/polyci.env"`);
233
235
  lines.push(` - npx semalease --cwd "${module.modulePath}" --tag-pattern "${tagPattern}" ${module.modulePath}/semalease.env`);
234
236
  lines.push(` - |`);
235
237
  lines.push(` if [ -f "${module.modulePath}/semalease.env" ]; then`);
@@ -329,7 +331,7 @@ function appendModulePublishJob(lines, module) {
329
331
  lines.push(` needs:`);
330
332
  lines.push(` - job: ${module.moduleName}-test`);
331
333
  lines.push(` - job: release`);
332
- lines.push(` image: $IMAGE_DOCKER`);
334
+ lines.push(` image: $IMAGE_NODE`);
333
335
  lines.push(` script:`);
334
336
  lines.push(` - cp -r ci "${module.modulePath}/ci"`);
335
337
  lines.push(` - cd ${module.modulePath}`);
@@ -350,7 +352,7 @@ function appendModuleDeployJob(lines, module) {
350
352
  lines.push(` - ${module.modulePath}/**/*`);
351
353
  lines.push(` needs:`);
352
354
  lines.push(` - job: ${module.moduleName}-publish`);
353
- lines.push(` image: $IMAGE_COMPOSE`);
355
+ lines.push(` image: $IMAGE_NODE`);
354
356
  lines.push(` script:`);
355
357
  lines.push(` - cp -r ci "${module.modulePath}/ci"`);
356
358
  lines.push(` - cd ${module.modulePath}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "polyci",
3
3
  "description": "Monorepo CI/CD utilities.",
4
- "version": "0.0.34",
4
+ "version": "0.0.36",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "author": "Alexander Tsarev",
package/readme.md CHANGED
@@ -4,6 +4,7 @@ usage
4
4
 
5
5
  recommedations
6
6
  do not change the provided module types and scripts. instead, copy and customise your own type.
7
+ be careful changin environment in release.sh (eg install packages) as the module releases run in one job in one container.
7
8
 
8
9
  requirements
9
10
  POLYCI_TOKEN variable must be defined in GitLab and accessible in the jobs that match the rule in the root .gitlab-ci.yml.