Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-noland committed Oct 23, 2024
1 parent f62acfa commit 04a04c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check-developer-experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

# Production artifacts are produced in a sterile environment (in another CI workflow).
name: Developer Experience
on: [ push ]
on:
- push

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
Expand Down
10 changes: 7 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ compile-env *args: fill-out-dev-env-template
declare tmp_link
tmp_link="$(mktemp -p "$(pwd)/sterile" -d --suffix=dataplane-compile-env.link)"
declare -r tmp_link
mkdir -p FAKE_HOME;
declare FAKE_HOME="$(pwd)/sterile/FAKE_HOME"
mkdir -p "${FAKE_HOME}"
cleanup() {
rm -r "${tmp_link}"
rm -r FAKE_HOME
Expand All @@ -131,7 +132,7 @@ compile-env *args: fill-out-dev-env-template
--rm \
--name dataplane-compile-env \
--tmpfs "/tmp:uid=$(id -u),gid=$(id -g),nodev,noexec,nosuid" \
--mount "type=bind,source=$(pwd)/FAKE_HOME,destination=/home/runner,bind-propagation=rprivate" \
--mount "type=bind,source=${FAKE_HOME},destination=/home/${USER:-runner},bind-propagation=rprivate" \
--mount type=bind,source="$(pwd),destination=/work,bind-propagation=rprivate" \
--mount type=bind,source="${tmp_link},destination=/work/compile-env,bind-propagation=rprivate" \
--mount type=bind,source="$(pwd)/dev-env-template/etc/passwd,destination=/etc/passwd,readonly" \
Expand Down Expand Up @@ -281,10 +282,13 @@ fake-nix refake="":
fill-out-dev-env-template:
{{ _just_debuggable_ }}
mkdir -p dev-env-template/etc
if [ -z "${UID:-}" ]; then
>&2 echo "ERROR: environment variable UID not set"
fi
declare -rxi UID
GID="$(id -g)"
declare -rxi GID
declare -rx USER=runner
declare -rx USER="${USER:-runner}"
envsubst < dev-env-template/etc.template/group.template > dev-env-template/etc/group
envsubst < dev-env-template/etc.template/passwd.template > dev-env-template/etc/passwd

Expand Down

0 comments on commit 04a04c1

Please sign in to comment.