hasura / smooth-checkout-buildkite-plugin

All the things you need during a Buildkite checkout :butter: :kite:
Apache License 2.0
14 stars 12 forks source link

introduce interpolate_checkout_path option to handle env interpolation #38

Closed ananya-2410 closed 1 year ago

ananya-2410 commented 1 year ago

For security measures, parent repo sets BUILDKITE_PIPELINE_NO_INTERPOLATION to true.

If BUILDKITE_BUILD_CHECKOUT_PATH is an interpolation of variables (ex: depends on BUILDKITE_JOB_ID, BUILDKITE_STEP_ID etc), it is read as a string instead of the values.

In order to use BUILDKITE_BUILD_CHECKOUT_PATH with its variable values, this PR checks if a custom variable BUILDKITE_PLUGIN_SMOOTH_CHECKOUT_INTERPOLATE_CHECKOUT_PATH is set to true.

scriptnull commented 1 year ago

I did an experiment on this

export B="this is b"

export "C"="$B"
echo $C 
this is b

export "C"="${B}"
echo $C 
this is b

So no difference between ${var} and $var in the above test. I wonder what might be going on in our original script.