Skip to content

Commit

Permalink
gitlab input parameter with functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuett committed Jun 8, 2024
1 parent 107cc75 commit 356fb23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test-input/.gitlab-ci-with-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ $[[ inputs.dest_env ]]-trigger:
image: $CI_REGISTRY/pipeline-components/helperimages:alpine-utils
script:
- |
curl --location $[[ inputs.target ]]
curl --location $[[ inputs.target | expand_vars | truncate(5,8) ]]
2 changes: 1 addition & 1 deletion yaml_shellcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def flatten_nested_string_lists(data):
script = data[jobkey][section]
script = flatten_nested_string_lists(script)
# replace inputs interpolation with dummy variable
script = re.sub(r'\$\[\[\s*(inputs\.[^\s>]*)\s*]]', r'$INPUT_PARAMETER', script)
script = re.sub(r'\$\[\[\s*(inputs\.[^]]*)\s*]]', r'$INPUT_PARAMETER', script)
result[f"{jobkey}/{section}"] = flatten_nested_string_lists(script)
return result

Expand Down

0 comments on commit 356fb23

Please sign in to comment.