Files
kitchenos/ci/download-workspace.sh
Dustin C. Hatch 9f143fd5b7
Some checks failed
dustin/kitchenos/pipeline/head There was a failure building this commit
wip: ci: Keep workspace between builds
When building Buildroot projects, especially ones with packages that
take a very long time to compile like WebkitGTK in this one, we usually
want to keep the workspace around between builds to avoid rebuilding
everything every time the job runs.  Historically, I've done this by
allocating a persistent volume for the workspace, however, this is
problematic for a few reasons.  First, the configuration is external to
the CI pipeline.  More importantly, jobs that run on cloud workers do
not have access to the iSCSI target.  As such, an alternative solution
is to use a local path, but store the contents in the artifact
repository at the end of the run.  The next run can then download the
archive from the artifact repository and extract it into the workspace
before beginning the build.  This mostly achieves the same effect, but
is completely self-contained within the CI pipeline definition, and does
not rely on persistent storage at all.
2025-11-13 11:57:11 -06:00

6 lines
92 B
Bash

#!/bin/sh
rm -rf _build
mkdir _build
curl -fL "${SAVED_WORKSPACE_URL}" | tar -C _build -xz