Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theatre-classique.fr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mathias Goebel
theatre-classique.fr
Merge requests
!2
Feature/
#7
prologue
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/
#7
prologue
feature/#7-prologue
into
develop
Overview
0
Commits
29
Pipelines
1
Changes
5
Merged
Mathias Goebel
requested to merge
feature/#7-prologue
into
develop
4 years ago
Overview
0
Commits
29
Pipelines
1
Changes
5
Expand
closes
#7 (closed)
#6 (closed)
#4 (closed)
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
73598ec6
29 commits,
4 years ago
5 files
+
157
−
46
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
.gitlab-ci.yml
+
39
−
30
Options
stages
:
-
load
-
preprocess
-
process
-
test
-
deploy
before_script
:
-
source functions.sh
load
:
image
:
docker.gitlab.gwdg.de/
fontane-notizbuecher/build
:latest
image
:
docker.gitlab.gwdg.de/
mgoebel/swiss_knife/fedora
:latest
stage
:
load
services
:
-
name
:
existdb/existdb:release
alias
:
exist
cache
:
paths
:
-
data/*.xml
script
:
-
./load.sh -e exist:8080 -f load.xq
-
if [[ ! -d data/ ]]; then
./load.sh -e exist:8080 -f load.xq
; fi
artifacts
:
paths
:
-
load.txt
-
list.txt
-
data/
# when a git flow release is made, a tag will be pushed starting this job. it
# will keep the resulting artifact from job number one and it will set up a
# Gitlab release at the repo. therefore the merge message starting at the release
# branch should be written in markdown.
release
:
stage
:
deploy
only
:
-
tags
replacements
:
image
:
docker.gitlab.gwdg.de/mgoebel/swiss_knife/fedora:latest
stage
:
preprocess
script
:
-
cd data
# prologue
-
sed --in-place --expression '1i<?xml version="1.0" encoding="UTF-8"?>' *.xml
-
sed --in-place --expression '2i<?xml-stylesheet type="text/css" href="../css/tei.css"?>' *.xml
# fix TEI.2
-
sed --in-place --expression 's*TEI.2*TEI*g' *.xml
# namespace (when missing)
-
sed --in-place --expression 's*<TEI*<TEI xmlns="http://www.tei-c.org/ns/1.0"*g' $(grep --files-without-match "xmlns" *.xml)
# misspelled elemets
-
sed --in-place --expression 's*SourceDesc*sourceDesc*g' *.xml
-
cd ..
artifacts
:
paths
:
-
data/
validation
:
image
:
docker.gitlab.gwdg.de/mgoebel/swiss_knife/fedora:latest
stage
:
test
script
:
# get number of first job in pipeline (assuming that this will create the needed artifact)
# it is also possible to query for a job name by altering the jq filter
-
'
curl
--output
jobs.json
--header
"PRIVATE-TOKEN:
$GITLAB_TOKEN"
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs"'
-
CI_JOB_TARGET=$(jq ".[0].id" < jobs.json)
-
echo $CI_JOB_TARGET
# keep artifact (release will link there)
-
'
curl
--request
POST
--header
"PRIVATE-TOKEN:
$GITLAB_TOKEN"
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$CI_JOB_TARGET/artifacts/keep"'
# create release data
# parse commit message (markdown, lines starting with “\”)
-
MARKDOWN=$(echo "$CI_COMMIT_MESSAGE" | sed 's=^\\==g')
# prepare the json file
-
'
jq
".name
=
\"$CI_PROJECT_PATH
$CI_COMMIT_TAG\"
|
.tag_name
=
\"$CI_COMMIT_TAG\"
|
.description
=
\"$MARKDOWN\"
|
.assets.links[0].name
=
\"package\"
|
.assets.links[0].url
=
\"https://gitlab.gwdg.de/$CI_PROJECT_PATH/-/jobs/$CI_JOB_TARGET/artifacts/download\"
"
<
.gitlab/gitlab-release.json.tmpl
>
gitlab-release.json'
-
'
curl
--header
"Content-Type:
application/json"
--header
"PRIVATE-TOKEN:
$GITLAB_TOKEN"
--data
@gitlab-release.json
--request
POST
$CI_API_V4_URL/projects/$CI_PROJECT_ID/releases'
-
curl https://repo1.maven.org/maven2/com/thaiopensource/jing/20091111/jing-20091111.jar --output jing.jar
-
curl https://tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng --output tei_all.rng
-
java -jar jing.jar tei_all.rng tei/*.xml > validation-report.log ||
true
-
grep "error" validation-report.log --count
artifacts
:
paths
:
-
gitlab-release.json
\ No newline at end of file
-
validation-report.log
when
:
always
Loading