In the step to install the latest gcloud version, we are seeing this when running on-prem CircleCI runners in our GKE cluster:
if grep 'docker\|lxc' /proc/1/cgroup > /dev/null 2>&1; then
if [[ $(command -v gcloud) == "" ]]; then
install
else
echo "gcloud CLI is already installed."
fi
else
echo "----------------------------------------------------------------------------------------------------"
echo "this is a machine executor job, replacing default installation of gcloud CLI"
echo "----------------------------------------------------------------------------------------------------"
sudo rm -rf /opt/google-cloud-sdk
install
fi
----------------------------------------------------------------------------------------------------
this is a machine executor job, replacing default installation of gcloud CLI
----------------------------------------------------------------------------------------------------
CircleCI received exit code 0
Expected behavior
We are using an image that has gcloud installed, so we expect it to skip this step. But the code is grepping for docker or lxc (grep 'docker\|lxc' /proc/1/cgroup). In order to work with our GKE runners, we'd need to include containerd (grep 'docker\|lxc\|containerd' /proc/1/cgroup).
Orb version
2.4.1
What happened
In the step to install the latest gcloud version, we are seeing this when running on-prem CircleCI runners in our GKE cluster:
Expected behavior
We are using an image that has gcloud installed, so we expect it to skip this step. But the code is grepping for docker or lxc (
grep 'docker\|lxc' /proc/1/cgroup
). In order to work with our GKE runners, we'd need to includecontainerd
(grep 'docker\|lxc\|containerd' /proc/1/cgroup
).