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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Show more breadcrumbs
Xu
AngelGuide
Commits
2dcdeabf
Commit
2dcdeabf
authored
5 years ago
by
Chessmaster
Browse files
Options
Downloads
Plain Diff
Merge branch 'version_ci' into 'master'
Tagging PDFs before publishing See merge request
!7
parents
679b03b7
8fc56a4e
Branches
master
Branches containing commit
Tags
36c3-v1.0.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+21
-7
21 additions, 7 deletions
.gitlab-ci.yml
build.sh
+12
-0
12 additions, 0 deletions
build.sh
with
33 additions
and
7 deletions
.gitlab-ci.yml
+
21
−
7
View file @
2dcdeabf
...
...
@@ -2,27 +2,41 @@ stages:
-
build
-
publish
build_guide
:
.template:
build_guide
:
stage
:
build
image
:
alpine
script
:
before_
script
:
-
apk update
-
apk add ruby asciidoctor
-
apk add
--no-cache
ruby asciidoctor
git
-
gem install asciidoctor-pdf --pre
-
asciidoctor-pdf -o angelguide_en.pdf guide.adoc
-
asciidoctor-pdf -a lang=de -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
:
-
./build.sh $CI_COMMIT_TAG
rules
:
-
if
:
$CI_COMMIT_TAG !=
null
when
:
always
build_guide
:
extends
:
.template:build_guide
script
:
-
./build.sh $CI_COMMIT_SHORT_SHA
rules
:
-
if
:
$CI_COMMIT_TAG ==
null
when
:
always
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)
...
...
@@ -32,6 +46,6 @@ publish_guide:
script
:
-
'
rsync
-av
angelguide_*.pdf
$PUBLISH_USER@$PUBLISH_HOST:$PUBLISH_PATH'
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
"master"'
-
if
:
'
$CI_COMMIT_REF_NAME
==
"master"
&&
$CI_COMMIT_TAG
!=
null
'
when
:
on_success
-
when
:
never
This diff is collapsed.
Click to expand it.
build.sh
0 → 100755
+
12
−
0
View file @
2dcdeabf
#!/bin/sh
if
[[
$#
-ne
1
]]
;
then
echo
expected revision as option
>
&2
exit
1
fi
revision
=
"
$1
"
commit_date
=
$(
git show
-s
--format
=
%ci
${
revision
}
|
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