From 5acb65abbe3bac2828129c03ad139391155425e1 Mon Sep 17 00:00:00 2001 From: Henrik Jess Root Date: Wed, 27 May 2026 09:50:39 +0200 Subject: [PATCH] fix: use \K grep pattern for volume id extraction Replace variable-length lookbehind with \K which GNU grep supports. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitea/workflows/deploy.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index edb196d..11c164a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,12 +16,10 @@ jobs: git pull - name: Deploy controller - run: | - nomad job run /opt/nomad-csi/csi/controller.nomad + run: nomad job run /opt/nomad-csi/csi/controller.nomad - name: Deploy node plugin - run: | - nomad job run /opt/nomad-csi/csi/node.nomad + run: nomad job run /opt/nomad-csi/csi/node.nomad - name: Verify CSI plugin healthy run: | @@ -31,9 +29,8 @@ jobs: - name: Provision volumes run: | for vol in /opt/nomad-csi/csi/volumes/*.hcl; do - # Skip example/template files [[ "$vol" == *example* ]] && continue - vol_id=$(grep -Po '(?<=id\s{1,10}=\s{1,10}")[^"]+' "$vol" | head -1) + vol_id=$(grep -oP 'id\s*=\s*"\K[^"]+' "$vol" | head -1) if nomad volume status "$vol_id" > /dev/null 2>&1; then echo "Volume $vol_id already exists, skipping" else