I have declared some variables in Gitlab -> Settings -> CI/CD -> Variables.
I want to access these variables in ruby (.rb) files for chef cookbook recipes.
I have declared a variable named "TEST_VARIABLE" in settings as: Gitlab -> Settings -> CI/CD -> Variables :- Key = TEST_VARIABLE, Value = TEST_VALUE
I have tried accessing them in the below format in the ruby(.rb) recipes. $TEST_VARIABLE, ${TEST_VARIABLE},TEST_VARIABLE, #{TEST_VARIABLE} and ENV['TEST_VARIABLE'] But nothing works, all returns blank or nil value.
Please let me know how to access these variables in the .rb file.