Hi, I’m using .drone.star
as my pipeline script:
Variables in my starlark file:
microservices_targets_regex = "^//services/(.*?)/cmd/senna-\\\\1:senna-\\\\1$"
impacted_targets_path = "/tmp/impacted_targets.txt"
filtered_targets_path = "/tmp/filtered_targets.txt"
Pipeline step (in my .drone.star file) which uses these variables:
'grep -E "{microservices_target_regex}" {impacted_targets_path} > {filtered_targets_path} || true'.format(
microservices_target_regex = microservices_targets_regex,
impacted_targets_path = impacted_targets_path,
filtered_targets_path = filtered_targets_path,
),
generated step in yaml file:
grep -E "^//services/(.*?)/cmd/senna-:senna-$" /tmp/impacted_targets.txt > /tmp/filtered_targets.txt || true
But I expect to be:
grep -E "^//services/(.*?)/cmd/senna-\\1:senna-\\1$" /tmp/impacted_targets.txt > /tmp/filtered_targets.txt || true
I got a space char instead of \\1
in the result! do I’m doing something wrong?