Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gitlab Ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SmartDataLab
public
CI-CD components
Gitlab Ci
Commits
99a7e58d
Commit
99a7e58d
authored
2 years ago
by
Pierre Smeyers
Browse files
Options
Downloads
Patches
Plain Diff
feat: add extract-script job template
parent
5bf9e9b9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/extract.yml
+20
-0
20 additions, 0 deletions
templates/extract.yml
with
20 additions
and
0 deletions
templates/extract.yml
0 → 100644
+
20
−
0
View file @
99a7e58d
# 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment