ci(deploy): stop installing ripgrep and setting sysctl from the gate
The deploy gate runs on a self-hosted runner under an unprivileged user, so the sudo apt-get install and sudo sysctl steps fail. Both are host provisioning: ripgrep is installed on the runner host and the userns restriction belongs in sysctl.d. The namespace check stays, without sudo.
This commit is contained in:
1 parent
066522cf5d
commit
3b372b4a91
1 file changed
+5
-11
@@ -84,17 +84,11 @@ jobs:
|
|||||||
git branch main origin/main
|
git branch main origin/main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install ripgrep
|
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
||||||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends ripgrep
|
# A self-hosted runner should not need sudo, and installing a package on
|
||||||
|
# every run is not the gate's job.
|
||||||
# Extensions run in an unprivileged user and network namespace, which
|
- name: Verify unprivileged user namespaces
|
||||||
# Ubuntu 24.04 runners forbid through AppArmor by default.
|
run: unshare --user --map-root-user --net true
|
||||||
- name: Allow unprivileged user namespaces
|
|
||||||
run: |
|
|
||||||
if [ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
|
|
||||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
||||||
fi
|
|
||||||
unshare --user --map-root-user --net true
|
|
||||||
|
|
||||||
# The gate's uncached `go test ./...` runs the Docker-backed tests that
|
# The gate's uncached `go test ./...` runs the Docker-backed tests that
|
||||||
# -short skips, and those start a container from alpine:3. A fresh runner
|
# -short skips, and those start a container from alpine:3. A fresh runner
|
||||||
|
|||||||
Reference in new issue
Block a user