-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
68 lines (62 loc) · 1.59 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
image: comp2300/comp2300-ci:2022.0.6
stages:
- build
- test
build:
tags:
- comp2300
stage: build
script:
- make
statement-of-originality:
stage: test
tags:
- comp2300
script:
- python3 /validate.py schema ./statement-of-originality.md https://comp.anu.edu.au/courses/comp2300/assets/schemas/statement-of-originality-md.json
design-proposal-wordcount:
stage: test
tags:
- comp2300
script:
- echo "Word Count:"
- var="$(cat design-proposal.md | wc -w)"
- >
if (( $var > 25)); then
exit 0 ;
else
echo "Your proposal should be more than 25 words!";
exit 1;
fi
design-document-wordcount:
stage: test
tags:
- comp2300
script:
- echo "Word Count:"
- var="$(cat design-document.md | wc -w)"
- >
if (( $var > 50)); then
exit 0 ;
else
echo "Your report should be more than 50 words!";
exit 1;
fi
design-document:
stage: build
image:
name: pandoc/core:2.17.1.1-alpine
entrypoint: ["/bin/sh", "-c"]
tags:
- comp2300
variables:
DESIGN_DOC_OUTPUT: '$CI_PROJECT_NAME-$CI_PROJECT_NAMESPACE-designdoc.html'
ARTIFACT_URL: 'https://gitlab.cecs.anu.edu.au/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/-/jobs/artifacts/main/raw/$CI_PROJECT_NAME-$CI_PROJECT_NAMESPACE-designdoc.html?job=design-document'
script:
- pandoc --standalone --self-contained --number-sections --output=$DESIGN_DOC_OUTPUT design-document.md
- echo "Your design doc can be found at this URL"
- echo "$ARTIFACT_URL"
artifacts:
paths:
- $DESIGN_DOC_OUTPUT
allow_failure: true