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