diff --git a/build-pipeline-yocto.yml.jinja2 b/build-pipeline-yocto.yml.jinja2 index 5020b20502e1bb137e8113d14436d96cc4503ce8..b23e689a295d636c1ebcf9b47faa7b8a55cf6f7e 100644 --- a/build-pipeline-yocto.yml.jinja2 +++ b/build-pipeline-yocto.yml.jinja2 @@ -37,8 +37,25 @@ build:pass: needs: [] timeout: 2m image: {{ CI_IMAGE_PYTHON }} + variables: + FILTER_LIST: "TOKEN KEY" script: - - printenv + # Mask the value of environment variables if their names match any substring in FILTER_LIST + - | + printenv | awk -F= -v filters="$FILTER_LIST" ' + BEGIN { + IGNORECASE = 1; + split(filters, filter_array, " "); + } + { + for (i in filter_array) { + if (index(toupper($1), toupper(filter_array[i])) > 0) { + print $1 "=[MASKED]"; + next; + } + } + print; + }' - echo "Build successful" - echo "This is the value of the MANUAL_BUILD variable '${MANUAL_BUILD}'"