From 523608cb6007a344ee065d2b033affbc8502bcdf Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 26 Feb 2022 19:47:11 +0200 Subject: [PATCH] Fixup to find the container ID. ns4 is now on Debian Bullseye. Which means newer Docker and Systemd's unified Cgroup hierarchy. At least I think that's why /proc/1/cpuset no longer has the cgroup path. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e504ddb..1cafbaf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ build: stage: deploy tags: ["ns4.shore.co.il"] script: - - cid="$(basename $(cat /proc/1/cpuset))" + - cid="$(basename "$(dirname "$(awk '/hostname/ {print $4}' /proc/1/mountinfo)")")" - docker pull registry.shore.co.il/ci-images:python3 - >- docker run -- GitLab