@futurelastic/colab-handbook 1.20.1-rc.6 → 1.20.2-rc.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/templates/ci-laravel.yml +46 -14
- package/templates/ci-node.yml +46 -14
- package/templates/ci-python.yml +46 -14
package/package.json
CHANGED
package/templates/ci-laravel.yml
CHANGED
|
@@ -260,6 +260,22 @@ jobs:
|
|
|
260
260
|
fetch-depth: 0
|
|
261
261
|
persist-credentials: false
|
|
262
262
|
|
|
263
|
+
# Kept between jobs (#696) — GitHub-hosted only: a fresh VM has nothing on disk, so the
|
|
264
|
+
# binary comes back from here and the install step below downloads nothing.
|
|
265
|
+
# - Self-hosted → off. A persistent runner keeps its tool cache on disk already, and a
|
|
266
|
+
# remote cache on top was measured as a loss, not a saving (#512).
|
|
267
|
+
# - Keyed on the pin and the platform: a version bump is a miss. The post step saves
|
|
268
|
+
# only when the job passes, so a failed download is never what gets cached.
|
|
269
|
+
# A NEW step, skipped on self-hosted. "Install gitleaks (pinned release binary)" keeps
|
|
270
|
+
# its name: handbook-sync recognises a copy of this job by it.
|
|
271
|
+
# EDIT: self-hosted runners are already off; to turn it off everywhere, delete this step.
|
|
272
|
+
- name: Restore gitleaks cache
|
|
273
|
+
if: runner.environment == 'github-hosted'
|
|
274
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
275
|
+
with:
|
|
276
|
+
path: ${{ runner.tool_cache }}/gitleaks/${{ env.GITLEAKS_VERSION }}
|
|
277
|
+
key: gitleaks-${{ env.GITLEAKS_VERSION }}-${{ runner.os }}-${{ runner.arch }}
|
|
278
|
+
|
|
263
279
|
- name: Install gitleaks (pinned release binary)
|
|
264
280
|
run: |
|
|
265
281
|
# NOT gitleaks/gitleaks-action@v2 — it demands a paid GITLEAKS_LICENSE for
|
|
@@ -276,20 +292,36 @@ jobs:
|
|
|
276
292
|
x86_64|amd64) arch=x64 ;;
|
|
277
293
|
*) echo "unsupported arch: $(uname -m)" >&2; exit 1 ;;
|
|
278
294
|
esac
|
|
279
|
-
#
|
|
280
|
-
#
|
|
281
|
-
#
|
|
282
|
-
#
|
|
283
|
-
#
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
#
|
|
287
|
-
#
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
295
|
+
# Kept between jobs (#696): a pinned version is downloaded once per runner, not on
|
|
296
|
+
# every run. A release download can answer 504 for hours (measured: 20 of 20 tries),
|
|
297
|
+
# which outlasts any retry, so the binary has to be on the runner already.
|
|
298
|
+
# Into the runner's tool cache, not /usr/local/bin: no sudo, no global write — the
|
|
299
|
+
# per-runner directory setup-node and setup-python install into. A persistent
|
|
300
|
+
# self-hosted runner keeps it on disk; a GitHub-hosted VM gets it back from the
|
|
301
|
+
# "Restore gitleaks cache" step above. The version is in the path, so a pin bump is a
|
|
302
|
+
# miss, never a stale binary. EDIT: an ephemeral self-hosted runner keeps neither and
|
|
303
|
+
# downloads on every run.
|
|
304
|
+
dir="${RUNNER_TOOL_CACHE:-$RUNNER_TEMP}/gitleaks/${GITLEAKS_VERSION}/${os}-${arch}"
|
|
305
|
+
if [ -x "$dir/gitleaks" ]; then
|
|
306
|
+
echo "gitleaks ${GITLEAKS_VERSION} already on this runner: $dir"
|
|
307
|
+
else
|
|
308
|
+
mkdir -p "$dir"
|
|
309
|
+
tmp="$(mktemp -d "$dir.XXXXXX")"
|
|
310
|
+
trap 'rm -rf "$tmp"' EXIT
|
|
311
|
+
# --fail: on an HTTP error curl otherwise saves the error page and exits 0, and tar
|
|
312
|
+
# then fails with "not in gzip format", naming neither the download nor the host.
|
|
313
|
+
# --retry: a re-run during the same upstream error spends the one re-run branch CI
|
|
314
|
+
# allows, so a brief error is retried here first. A longer outage still fails, at
|
|
315
|
+
# curl, naming the status (#690).
|
|
316
|
+
curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors --connect-timeout 10 --max-time 120 -o "$tmp/gitleaks.tar.gz" \
|
|
317
|
+
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_${os}_${arch}.tar.gz"
|
|
318
|
+
tar -xzf "$tmp/gitleaks.tar.gz" -C "$tmp" gitleaks
|
|
319
|
+
chmod +x "$tmp/gitleaks"
|
|
320
|
+
# One rename on one filesystem: a job sharing this tool cache sees no binary or a
|
|
321
|
+
# whole one, never half of one.
|
|
322
|
+
mv -f "$tmp/gitleaks" "$dir/gitleaks"
|
|
323
|
+
fi
|
|
324
|
+
echo "$dir" >> "$GITHUB_PATH"
|
|
293
325
|
|
|
294
326
|
- name: gitleaks detect
|
|
295
327
|
run: gitleaks detect --source . --no-banner
|
package/templates/ci-node.yml
CHANGED
|
@@ -246,6 +246,22 @@ jobs:
|
|
|
246
246
|
fetch-depth: 0
|
|
247
247
|
persist-credentials: false
|
|
248
248
|
|
|
249
|
+
# Kept between jobs (#696) — GitHub-hosted only: a fresh VM has nothing on disk, so the
|
|
250
|
+
# binary comes back from here and the install step below downloads nothing.
|
|
251
|
+
# - Self-hosted → off. A persistent runner keeps its tool cache on disk already, and a
|
|
252
|
+
# remote cache on top was measured as a loss, not a saving (#512).
|
|
253
|
+
# - Keyed on the pin and the platform: a version bump is a miss. The post step saves
|
|
254
|
+
# only when the job passes, so a failed download is never what gets cached.
|
|
255
|
+
# A NEW step, skipped on self-hosted. "Install gitleaks (pinned release binary)" keeps
|
|
256
|
+
# its name: handbook-sync recognises a copy of this job by it.
|
|
257
|
+
# EDIT: self-hosted runners are already off; to turn it off everywhere, delete this step.
|
|
258
|
+
- name: Restore gitleaks cache
|
|
259
|
+
if: runner.environment == 'github-hosted'
|
|
260
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
261
|
+
with:
|
|
262
|
+
path: ${{ runner.tool_cache }}/gitleaks/${{ env.GITLEAKS_VERSION }}
|
|
263
|
+
key: gitleaks-${{ env.GITLEAKS_VERSION }}-${{ runner.os }}-${{ runner.arch }}
|
|
264
|
+
|
|
249
265
|
- name: Install gitleaks (pinned release binary)
|
|
250
266
|
run: |
|
|
251
267
|
# Deliberately NOT gitleaks/gitleaks-action@v2: that action requires a paid
|
|
@@ -266,20 +282,36 @@ jobs:
|
|
|
266
282
|
x86_64|amd64) arch=x64 ;;
|
|
267
283
|
*) echo "unsupported arch: $(uname -m)" >&2; exit 1 ;;
|
|
268
284
|
esac
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
#
|
|
272
|
-
#
|
|
273
|
-
#
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
285
|
+
# Kept between jobs (#696): a pinned version is downloaded once per runner, not on
|
|
286
|
+
# every run. A release download can answer 504 for hours (measured: 20 of 20 tries),
|
|
287
|
+
# which outlasts any retry, so the binary has to be on the runner already.
|
|
288
|
+
# Into the runner's tool cache, not /usr/local/bin: no sudo, no global write — the
|
|
289
|
+
# per-runner directory setup-node and setup-python install into. A persistent
|
|
290
|
+
# self-hosted runner keeps it on disk; a GitHub-hosted VM gets it back from the
|
|
291
|
+
# "Restore gitleaks cache" step above. The version is in the path, so a pin bump is a
|
|
292
|
+
# miss, never a stale binary. EDIT: an ephemeral self-hosted runner keeps neither and
|
|
293
|
+
# downloads on every run.
|
|
294
|
+
dir="${RUNNER_TOOL_CACHE:-$RUNNER_TEMP}/gitleaks/${GITLEAKS_VERSION}/${os}-${arch}"
|
|
295
|
+
if [ -x "$dir/gitleaks" ]; then
|
|
296
|
+
echo "gitleaks ${GITLEAKS_VERSION} already on this runner: $dir"
|
|
297
|
+
else
|
|
298
|
+
mkdir -p "$dir"
|
|
299
|
+
tmp="$(mktemp -d "$dir.XXXXXX")"
|
|
300
|
+
trap 'rm -rf "$tmp"' EXIT
|
|
301
|
+
# --fail: on an HTTP error curl otherwise saves the error page and exits 0, and tar
|
|
302
|
+
# then fails with "not in gzip format", naming neither the download nor the host.
|
|
303
|
+
# --retry: a re-run during the same upstream error spends the one re-run branch CI
|
|
304
|
+
# allows, so a brief error is retried here first. A longer outage still fails, at
|
|
305
|
+
# curl, naming the status (#690).
|
|
306
|
+
curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors --connect-timeout 10 --max-time 120 -o "$tmp/gitleaks.tar.gz" \
|
|
307
|
+
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_${os}_${arch}.tar.gz"
|
|
308
|
+
tar -xzf "$tmp/gitleaks.tar.gz" -C "$tmp" gitleaks
|
|
309
|
+
chmod +x "$tmp/gitleaks"
|
|
310
|
+
# One rename on one filesystem: a job sharing this tool cache sees no binary or a
|
|
311
|
+
# whole one, never half of one.
|
|
312
|
+
mv -f "$tmp/gitleaks" "$dir/gitleaks"
|
|
313
|
+
fi
|
|
314
|
+
echo "$dir" >> "$GITHUB_PATH"
|
|
283
315
|
|
|
284
316
|
- name: gitleaks detect
|
|
285
317
|
run: gitleaks detect --source . --no-banner
|
package/templates/ci-python.yml
CHANGED
|
@@ -257,6 +257,22 @@ jobs:
|
|
|
257
257
|
fetch-depth: 0
|
|
258
258
|
persist-credentials: false
|
|
259
259
|
|
|
260
|
+
# Kept between jobs (#696) — GitHub-hosted only: a fresh VM has nothing on disk, so the
|
|
261
|
+
# binary comes back from here and the install step below downloads nothing.
|
|
262
|
+
# - Self-hosted → off. A persistent runner keeps its tool cache on disk already, and a
|
|
263
|
+
# remote cache on top was measured as a loss, not a saving (#512).
|
|
264
|
+
# - Keyed on the pin and the platform: a version bump is a miss. The post step saves
|
|
265
|
+
# only when the job passes, so a failed download is never what gets cached.
|
|
266
|
+
# A NEW step, skipped on self-hosted. "Install gitleaks (pinned release binary)" keeps
|
|
267
|
+
# its name: handbook-sync recognises a copy of this job by it.
|
|
268
|
+
# EDIT: self-hosted runners are already off; to turn it off everywhere, delete this step.
|
|
269
|
+
- name: Restore gitleaks cache
|
|
270
|
+
if: runner.environment == 'github-hosted'
|
|
271
|
+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
272
|
+
with:
|
|
273
|
+
path: ${{ runner.tool_cache }}/gitleaks/${{ env.GITLEAKS_VERSION }}
|
|
274
|
+
key: gitleaks-${{ env.GITLEAKS_VERSION }}-${{ runner.os }}-${{ runner.arch }}
|
|
275
|
+
|
|
260
276
|
- name: Install gitleaks (pinned release binary)
|
|
261
277
|
run: |
|
|
262
278
|
# Deliberately NOT gitleaks/gitleaks-action@v2: that action requires a paid
|
|
@@ -277,20 +293,36 @@ jobs:
|
|
|
277
293
|
x86_64|amd64) arch=x64 ;;
|
|
278
294
|
*) echo "unsupported arch: $(uname -m)" >&2; exit 1 ;;
|
|
279
295
|
esac
|
|
280
|
-
#
|
|
281
|
-
#
|
|
282
|
-
#
|
|
283
|
-
#
|
|
284
|
-
#
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
#
|
|
288
|
-
#
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
296
|
+
# Kept between jobs (#696): a pinned version is downloaded once per runner, not on
|
|
297
|
+
# every run. A release download can answer 504 for hours (measured: 20 of 20 tries),
|
|
298
|
+
# which outlasts any retry, so the binary has to be on the runner already.
|
|
299
|
+
# Into the runner's tool cache, not /usr/local/bin: no sudo, no global write — the
|
|
300
|
+
# per-runner directory setup-node and setup-python install into. A persistent
|
|
301
|
+
# self-hosted runner keeps it on disk; a GitHub-hosted VM gets it back from the
|
|
302
|
+
# "Restore gitleaks cache" step above. The version is in the path, so a pin bump is a
|
|
303
|
+
# miss, never a stale binary. EDIT: an ephemeral self-hosted runner keeps neither and
|
|
304
|
+
# downloads on every run.
|
|
305
|
+
dir="${RUNNER_TOOL_CACHE:-$RUNNER_TEMP}/gitleaks/${GITLEAKS_VERSION}/${os}-${arch}"
|
|
306
|
+
if [ -x "$dir/gitleaks" ]; then
|
|
307
|
+
echo "gitleaks ${GITLEAKS_VERSION} already on this runner: $dir"
|
|
308
|
+
else
|
|
309
|
+
mkdir -p "$dir"
|
|
310
|
+
tmp="$(mktemp -d "$dir.XXXXXX")"
|
|
311
|
+
trap 'rm -rf "$tmp"' EXIT
|
|
312
|
+
# --fail: on an HTTP error curl otherwise saves the error page and exits 0, and tar
|
|
313
|
+
# then fails with "not in gzip format", naming neither the download nor the host.
|
|
314
|
+
# --retry: a re-run during the same upstream error spends the one re-run branch CI
|
|
315
|
+
# allows, so a brief error is retried here first. A longer outage still fails, at
|
|
316
|
+
# curl, naming the status (#690).
|
|
317
|
+
curl -fsSL --retry 5 --retry-delay 10 --retry-all-errors --connect-timeout 10 --max-time 120 -o "$tmp/gitleaks.tar.gz" \
|
|
318
|
+
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_${os}_${arch}.tar.gz"
|
|
319
|
+
tar -xzf "$tmp/gitleaks.tar.gz" -C "$tmp" gitleaks
|
|
320
|
+
chmod +x "$tmp/gitleaks"
|
|
321
|
+
# One rename on one filesystem: a job sharing this tool cache sees no binary or a
|
|
322
|
+
# whole one, never half of one.
|
|
323
|
+
mv -f "$tmp/gitleaks" "$dir/gitleaks"
|
|
324
|
+
fi
|
|
325
|
+
echo "$dir" >> "$GITHUB_PATH"
|
|
294
326
|
|
|
295
327
|
- name: gitleaks detect
|
|
296
328
|
run: gitleaks detect --source . --no-banner
|