Skip to content
Snippets Groups Projects
Commit 99a7e58d authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

feat: add extract-script job template

parent 5bf9e9b9
No related branches found
No related tags found
No related merge requests found
# this job extracts the bash script from the given template(s)
extract-script:
image: alpine
stage: .pre
script:
- echo "#!/bin/bash" > script.sh
- sed -n '/BEGSCRIPT/,/ENDSCRIPT/p' "$GITLAB_CI_FILES" | sed 's/^ //' >> script.sh
- export LC_ALL=C.UTF-8
artifacts:
when: always
name: extracted template script
expire_in: 1h
paths:
- script.sh
rules:
# exclude merge requests
- if: $CI_MERGE_REQUEST_ID
when: never
# enabled if $GITLAB_CI_FILES is set
- if: $GITLAB_CI_FILES
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment