Hello,
I am having some issues with drone parsing a grep
command in my pipeline. Essentially, I am using grep to pull a version number of one of my container images in order to promote the image from dev -> stage and eventually stage->prod. I am doing this through gcloud
. My command to grab the image using gcloud
syntax is:
gcloud container images list-tags <my-image-repository> --filter="tags:latest" --format="table[noheading](tags)" | grep -o '\bv\w*.*'
This command parses the correct information when I log directly into the docker container that I am using to execute this step, however, when I run it with Drone it appears to yank the \b
from my grep command completely. I tested this with a pipeline by just running grep -o '\bv\w*.*'
against a test.txt
file that included a string v1.0.30841303
and the pipeline fails out with the last step showing the following:
+ grep -o 'v\w*.*' test.txt
Is there something I am doing wrong or is there something in Drone that would cause it to incorrectly parse the \b
in my grep syntax?
Thank you!