-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.gitlab-ci.yml
42 lines (39 loc) · 1.41 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
stages:
- generate
- publish
generate-job:
stage: generate
tags:
- autoscale
variables:
REPO_METADATA_FILE: docs/includes/repo-metadata.md
script: >
echo "Created from: [$CI_PROJECT_NAMESPACE / $CI_PROJECT_TITLE]($CI_PROJECT_URL) Version: $(git describe --always)" > "$REPO_METADATA_FILE"
artifacts:
paths:
- "$REPO_METADATA_FILE"
mark-job:
stage: publish
only:
- devel
- master
variables:
MARK_RELEASE: https://github.com/kovetskiy/mark/releases/download/12.0.0/mark_Linux_x86_64.tar.gz
MARK_SHASUM: e3a1ee3d5da28f13731b021be03a87ca29a3683adf1642255dbd0eb4a41dba2e
MARK_ARCHIVE: mark_Linux_x86_64.tar.gz
image:
name: gitlab-registry.internal.sanger.ac.uk/isg/gitlab-ci-docker-docker:322249_master
tags:
- autoscale
before_script:
- |
apt-get update -yq
apt-get install -yq wget
wget "${MARK_RELEASE}" -O "${MARK_ARCHIVE}"
echo "$MARK_SHASUM $MARK_ARCHIVE" | sha256sum -c
tar -xzf "${MARK_ARCHIVE}" mark
script: >
for f in $(find . -name includes -type d -prune -o -name README.md -prune -o -name '*.md' -print0 | xargs -0); do
echo 'username = ""' && echo "password = '$CONFLUENCE_PERSONAL_ACCESS_TOKEN'" |
./mark -c /dev/stdin -b https://ssg-confluence.internal.sanger.ac.uk -f "$f" --log-level TRACE
done