@plexus-ms/cli-ci 0.112.0 → 0.114.0

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.
Files changed (2) hide show
  1. package/dist/plx-ci.js +21 -20
  2. package/package.json +2 -2
package/dist/plx-ci.js CHANGED
@@ -7605,9 +7605,9 @@ import { join } from "node:path";
7605
7605
  var PRIMITIVES = "primitives";
7606
7606
  var TRAIN_REPOS = [
7607
7607
  PRIMITIVES,
7608
- "preset-repo-web",
7608
+ "preset-repo-turbo",
7609
7609
  "preset-app-nextjs",
7610
- "preset-repo-platform",
7610
+ "preset-repo-operations",
7611
7611
  "compendium"
7612
7612
  ];
7613
7613
  var PHASES = [[PRIMITIVES], TRAIN_REPOS.filter((r) => r !== PRIMITIVES)];
@@ -12037,28 +12037,32 @@ write_files:
12037
12037
  REGISTRY_SECRET_KEY=@@REGISTRY_SECRET_KEY@@
12038
12038
  RUNNER_VERSION=@@RUNNER_VERSION@@
12039
12039
  RUNNER_SHA256=@@RUNNER_SHA256@@
12040
- EXO_VERSION=@@EXO_VERSION@@
12041
12040
  - path: /etc/plexus-ci/jitconfig
12042
12041
  permissions: "0600"
12043
12042
  content: "@@JITCONFIG@@"
12044
12043
 
12045
- # exo, fetched on demand so that self-delete works before runcmd got to it.
12046
- # The env file is sourced exported (set -a): exo reads the key from the
12047
- # environment, and a plain source would leave it shell-local. A timer's
12048
- # service has no HOME, and exo refuses to run without one (layers 1b and
12049
- # 2b failed on it on 2026-11-04); the runner's unit has a user.
12050
- - path: /usr/local/sbin/plexus-ci-exo
12044
+ # The cloud's API with curl, signed with the self-delete key (EXO2-HMAC-SHA256,
12045
+ # as egoscale signs: method and path, body, the query's values, the signed
12046
+ # headers, the expiry, each on a line). Nothing to download: the instance's
12047
+ # own rescue must not depend on the forge or a release server, which were
12048
+ # the ones down when twelve instances missed on 2026-11-08. The env file is
12049
+ # sourced exported (set -a), so that a timer's service without HOME or a
12050
+ # login environment has the key all the same.
12051
+ #
12052
+ # plexus-ci-exo-api METHOD /v2/<path> [BODY]
12053
+ - path: /usr/local/sbin/plexus-ci-exo-api
12051
12054
  permissions: "0755"
12052
12055
  content: |
12053
12056
  #!/bin/sh
12054
12057
  set -eu
12055
12058
  set -a; . /etc/plexus-ci/env; set +a
12056
- export HOME="\${HOME:-/root}"
12057
- if [ ! -x /usr/local/bin/exo ]; then
12058
- curl -fsSL "https://github.com/exoscale/cli/releases/download/v\${EXO_VERSION}/exoscale-cli_\${EXO_VERSION}_linux_amd64.tar.gz" \\
12059
- | tar -xz -C /usr/local/bin exo
12060
- fi
12061
- exec /usr/local/bin/exo "$@"
12059
+ method=$1 path=$2 body=\${3:-}
12060
+ expires=$(( $(date +%s) + 600 ))
12061
+ signature=$(printf '%s %s\\n%s\\n\\n\\n%s' "$method" "$path" "$body" "$expires" |
12062
+ openssl dgst -sha256 -hmac "$EXOSCALE_API_SECRET" -binary | base64 -w0)
12063
+ curl -fsS --max-time 30 -X "$method" -H "Content-Type: application/json" \\
12064
+ -H "Authorization: EXO2-HMAC-SHA256 credential=$EXOSCALE_API_KEY,expires=$expires,signature=$signature" \\
12065
+ \${body:+--data "$body"} "https://api-$ZONE.exoscale.com$path"
12062
12066
 
12063
12067
  - path: /usr/local/sbin/plexus-ci-mail
12064
12068
  permissions: "0755"
@@ -12085,7 +12089,7 @@ write_files:
12085
12089
  permissions: "0755"
12086
12090
  content: |
12087
12091
  #!/bin/sh
12088
- # Deletes this instance with the self-delete key; its id comes from the
12092
+ # Deletes this instance with the self-delete key, through the API with curl; its id comes from the
12089
12093
  # metadata service. Logged either way; a failure leaves layers 2a and 5.
12090
12094
  set -u
12091
12095
  set -a; . /etc/plexus-ci/env; set +a
@@ -12095,7 +12099,7 @@ write_files:
12095
12099
  [ "\${SELF_LAYERS:-on}" != off ] || { logger -t plexus-ci "self-delete ($1): layers off, not deleting"; exit 0; }
12096
12100
  id=$(curl -fsS --max-time 10 http://metadata.exoscale.com/latest/meta-data/instance-id) || id=
12097
12101
  logger -t plexus-ci "self-delete ($1): instance \${id:-unknown}"
12098
- [ -n "$id" ] && plexus-ci-exo compute instance delete "$id" -z "$ZONE" -f -Q 2>&1 | logger -t plexus-ci \\
12102
+ [ -n "$id" ] && plexus-ci-exo-api DELETE "/v2/instance/$id" 2>&1 | logger -t plexus-ci \\
12099
12103
  || logger -t plexus-ci "self-delete ($1) failed"
12100
12104
 
12101
12105
  - path: /usr/local/sbin/plexus-ci-no-job
@@ -12227,7 +12231,6 @@ runcmd:
12227
12231
  - useradd -m -s /bin/bash -G docker runner && echo 'runner ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/runner
12228
12232
  - cp /etc/plexus-ci/jitconfig /etc/plexus-ci/jitconfig.runner && chown runner:runner /etc/plexus-ci/jitconfig.runner && mv /etc/plexus-ci/jitconfig.runner /etc/plexus-ci/jitconfig
12229
12233
  - . /etc/plexus-ci/env && mkdir -p /opt/runner && cd /opt/runner && curl -fsSLo runner.tgz "https://github.com/actions/runner/releases/download/v\${RUNNER_VERSION}/actions-runner-linux-x64-\${RUNNER_VERSION}.tar.gz" && echo "\${RUNNER_SHA256} runner.tgz" | sha256sum -c - && tar -xzf runner.tgz && rm runner.tgz && ./bin/installdependencies.sh >/dev/null && chown -R runner:runner /opt/runner
12230
- - plexus-ci-exo version >/dev/null
12231
12234
  # The registry sidecars, when the launch named a bucket (\xA7 8 PLX-Delivery): :5000 on this month's bucket, read-write; :5001 on the previous month's, read-only. The same two containers as .github/ci/registry.sh starts on a GitHub runner.
12232
12235
  - . /etc/plexus-ci/env && if [ -n "$REGISTRY_ENDPOINT" ]; then docker run -d --name registry --restart unless-stopped -p 127.0.0.1:5000:5000 -e REGISTRY_STORAGE=s3 -e REGISTRY_STORAGE_S3_REGIONENDPOINT="$REGISTRY_ENDPOINT" -e REGISTRY_STORAGE_S3_REGION="$REGISTRY_REGION" -e REGISTRY_STORAGE_S3_BUCKET="$REGISTRY_BUCKET" -e REGISTRY_STORAGE_S3_ACCESSKEY="$REGISTRY_ACCESS_KEY" -e REGISTRY_STORAGE_S3_SECRETKEY="$REGISTRY_SECRET_KEY" -e REGISTRY_STORAGE_S3_FORCEPATHSTYLE=true -e REGISTRY_STORAGE_DELETE_ENABLED=true registry:2 >/dev/null; fi
12233
12236
  - . /etc/plexus-ci/env && if [ -n "$REGISTRY_ENDPOINT" ]; then docker run -d --name registry-previous --restart on-failure:3 -p 127.0.0.1:5001:5000 -e REGISTRY_STORAGE=s3 -e REGISTRY_STORAGE_S3_REGIONENDPOINT="$REGISTRY_ENDPOINT" -e REGISTRY_STORAGE_S3_REGION="$REGISTRY_REGION" -e REGISTRY_STORAGE_S3_BUCKET="$REGISTRY_PREVIOUS_BUCKET" -e REGISTRY_STORAGE_S3_ACCESSKEY="$REGISTRY_ACCESS_KEY" -e REGISTRY_STORAGE_S3_SECRETKEY="$REGISTRY_SECRET_KEY" -e REGISTRY_STORAGE_S3_FORCEPATHSTYLE=true -e 'REGISTRY_STORAGE_MAINTENANCE_READONLY={"enabled":true}' registry:2 >/dev/null; fi
@@ -12258,7 +12261,6 @@ var DEFAULTS = {
12258
12261
  tries: 2,
12259
12262
  runnerVersion: "2.338.2",
12260
12263
  runnerSha256: "baebf204307bac6193480852732f0aba2ae97b6c5597c244f4d5558390147c40",
12261
- exoVersion: "1.103.2",
12262
12264
  /** What the API accepts, base64 characters. */
12263
12265
  userDataLimit: 32768
12264
12266
  };
@@ -12277,7 +12279,6 @@ function renderUserData(options, jitconfig, now) {
12277
12279
  RUN: options.run.runId,
12278
12280
  RUNNER_VERSION: DEFAULTS.runnerVersion,
12279
12281
  RUNNER_SHA256: DEFAULTS.runnerSha256,
12280
- EXO_VERSION: DEFAULTS.exoVersion,
12281
12282
  JITCONFIG: jitconfig,
12282
12283
  SELF_DELETE_KEY: options.selfDelete.key,
12283
12284
  SELF_DELETE_SECRET: options.selfDelete.secret,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexus-ms/cli-ci",
3
- "version": "0.112.0",
3
+ "version": "0.114.0",
4
4
  "description": "plx-ci, the CI verbs of Plexus: throwaway runners on a cloud, a registry on object storage, reproducible image builds, and their teardown",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "node": ">=24.22.1"
24
24
  },
25
25
  "dependencies": {
26
- "@plexus-ms/lib": "0.112.0",
26
+ "@plexus-ms/lib": "0.114.0",
27
27
  "commander": "^15.0.0",
28
28
  "yaml": "^2.9.1"
29
29
  },