-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
40 lines (36 loc) · 1.25 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
image: comp17202020/comp1720-2020-gitlab-ci:0.5.0
variables:
DEST_DIR: /srv/gitlab-ce-pages/staging/$CI_JOB_ID/$CI_COMMIT_REF_NAME/$CI_PROJECT_PATH
SCHEMA_BASE_URL: https://cs.anu.edu.au/courses/comp1720/assets/schemas
COMP1720_TEST_URL: https://comp1720.cecs.anu.edu.au/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME/
# this task copies the sketch files to the COMP1720 test webserver
page-deploy:
tags:
- comp1720
stage: deploy
only:
- master
script:
- mkdir -p $DEST_DIR
# copy the thumbnail.png file if it exists
- if [ -e thumbnail.png ]; then cp thumbnail.png $DEST_DIR; fi
# copy assets folder, and all top-level .html and .js files
- cp -r assets *.html *.js $DEST_DIR
- echo "your sketch should be visible shortly (on campus only) at the test URL"
- echo $COMP1720_TEST_URL
# have you committed & pushed your thumbnail.png file
thumbnail:
tags:
- comp1720
stage: test
allow_failure: true
script:
- python /validate.py exists thumbnail.png
# check that you've filled out your statement of originality
statement-of-originality:
tags:
- comp1720
stage: test
allow_failure: true
script:
- python /validate.py schema ./statement-of-originality.yml $SCHEMA_BASE_URL/statement-of-originality.json