Loading README.md +15 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,21 @@ In order to be able to implement some **genericity** in your scripts and templat * any [GitLab CI variable](https://docs.gitlab.com/ee/ci/variables/#predefined-environment-variables) (ex: `${CI_ENVIRONMENT_URL}` to retrieve the actual environment exposed route) > :warning: In order to be properly replaced, variables in your YAML descriptors shall be written with curly braces (ex: `${MYVAR}` and not `$MYVAR`). > :warning: > > In order to be properly replaced, variables in your YAML descriptors shall be written with curly braces (ex: `${MYVAR}` and not `$MYVAR`). > > Multiline variables must be surrounded by **double quotes** (`"`). Example: > > ```yaml > [...] > containers: > - name: restaurant-app > env: > # multiline variable > - name: MENU > value: "${APP_MENU}" > ``` ## kube-score job Loading templates/gitlab-ci-k8s.yml +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ stages: } function awkenvsubst() { awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);val=ENVIRON[var];gsub(/["\\]/,"\\\\&", val);gsub("\n", "\\n", val);gsub("\r", "\\r", val);gsub("[$]{"var"}",val)}}1' } function login() { Loading Loading
README.md +15 −1 Original line number Diff line number Diff line Loading @@ -292,7 +292,21 @@ In order to be able to implement some **genericity** in your scripts and templat * any [GitLab CI variable](https://docs.gitlab.com/ee/ci/variables/#predefined-environment-variables) (ex: `${CI_ENVIRONMENT_URL}` to retrieve the actual environment exposed route) > :warning: In order to be properly replaced, variables in your YAML descriptors shall be written with curly braces (ex: `${MYVAR}` and not `$MYVAR`). > :warning: > > In order to be properly replaced, variables in your YAML descriptors shall be written with curly braces (ex: `${MYVAR}` and not `$MYVAR`). > > Multiline variables must be surrounded by **double quotes** (`"`). Example: > > ```yaml > [...] > containers: > - name: restaurant-app > env: > # multiline variable > - name: MENU > value: "${APP_MENU}" > ``` ## kube-score job Loading
templates/gitlab-ci-k8s.yml +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ stages: } function awkenvsubst() { awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);val=ENVIRON[var];gsub(/["\\]/,"\\\\&", val);gsub("\n", "\\n", val);gsub("\r", "\\r", val);gsub("[$]{"var"}",val)}}1' } function login() { Loading