Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AngelGuide
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Himmel
AngelGuide
Commits
a377588d
Commit
a377588d
authored
5 years ago
by
migu
Browse files
Options
Downloads
Patches
Plain Diff
refactor pipeline
parent
cba56c3d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!7
Tagging PDFs before publishing
Pipeline
#23722
passed
5 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+17
-23
17 additions, 23 deletions
.gitlab-ci.yml
build.sh
+12
-0
12 additions, 0 deletions
build.sh
with
29 additions
and
23 deletions
.gitlab-ci.yml
+
17
−
23
View file @
a377588d
...
...
@@ -2,53 +2,47 @@ stages:
-
build
-
publish
build_tagge
d_guide
:
.template:buil
d_guide
:
stage
:
build
image
:
alpine
script
:
before_
script
:
-
apk update
-
apk add ruby asciidoctor git
-
apk add
--no-cache
ruby asciidoctor git
-
gem install asciidoctor-pdf --pre
-
export COMMIT_TIME=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
-
asciidoctor-pdf -a revnumber=$CI_COMMIT_TAG -a revdate=$COMMIT_TIME -o angelguide_en.pdf guide.adoc
-
asciidoctor-pdf -a lang=de -a revnumber=$CI_COMMIT_TAG -a revdate=$COMMIT_TIME -o angelguide_de.pdf guide.adoc
artifacts
:
paths
:
-
"
angelguide_en.pdf"
-
"
angelguide_de.pdf"
expire_in
:
12 months
build_guide_by_tag
:
extends
:
.template:build_guide
script
:
-
export COMMIT_DATE=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
-
export REVISION=$CI_COMMIT_TAG
-
asciidoctor-pdf -a revnumber=$REVISION -a revdate=$COMMIT_DATE -o angelguide_en.pdf guide.adoc
-
asciidoctor-pdf -a revnumber=$REVISION -a revdate=$COMMIT_DATE -o angelguide_de.pdf -a lang=de guide.adoc
rules
:
-
if
:
$CI_COMMIT_TAG !=
null
when
:
always
-
when
:
never
build_guide
:
stage
:
build
image
:
alpine
extends
:
.template:build_guide
script
:
-
apk update
-
apk add ruby asciidoctor git
-
gem install asciidoctor-pdf --pre
-
export COMMIT_TIME=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
-
echo $COMMIT_TIME
-
asciidoctor-pdf -a revnumber=$CI_COMMIT_SHORT_SHA -a revdate=$COMMIT_TIME -o angelguide_en.pdf guide.adoc
-
asciidoctor-pdf -a lang=de -a revnumber=$CI_COMMIT_SHORT_SHA -a revdate=$COMMIT_TIME -o angelguide_de.pdf guide.adoc
artifacts
:
paths
:
-
"
angelguide_en.pdf"
-
"
angelguide_de.pdf"
expire_in
:
12 months
-
export COMMIT_DATE=$(git show -s --format=%ci $CI_COMMIT_SHA | cut -c1-10)
-
export REVISION=$CI_COMMIT_SHORT_SHA
-
asciidoctor-pdf -a revnumber=$REVISION -a revdate=$COMMIT_DATE -o angelguide_en.pdf guide.adoc
-
asciidoctor-pdf -a revnumber=$REVISION -a revdate=$COMMIT_DATE -o angelguide_de.pdf -a lang=de guide.adoc
rules
:
-
if
:
$CI_COMMIT_TAG ==
null
when
:
always
-
when
:
never
publish_guide
:
stage
:
publish
image
:
kroniak/ssh-client
before_script
:
-
apk update
-
apk add rsync
-
apk add
--no-cache
rsync
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
eval $(ssh-agent -s)
...
...
This diff is collapsed.
Click to expand it.
build.sh
0 → 100755
+
12
−
0
View file @
a377588d
#!/bin/sh
if
[[
$#
ne 1
]]
;
then
echo
expected revision as option
>
&2
exit
1
fi
revision
=
"
$1
"
commit_date
=
$(
git show
-s
--format
=
%ci
$CI_COMMIT_SHA
|
cut
-c1-10
)
asciidoctor-pdf
-a
revnumber
=
${
revision
}
-a
revdate
=
${
commit_date
}
-o
angelguide_en.pdf guide.adoc
asciidoctor-pdf
-a
revnumber
=
${
revision
}
-a
revdate
=
${
commit_date
}
-o
angelguide_de.pdf
-a
lang
=
de guide.adoc
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