forked from nename0/saarctf-gameserver
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
67 lines (57 loc) · 1.69 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
image: debian:bullseye
variables:
# Initialize submodules
GIT_SUBMODULE_STRATEGY: recursive
# https://hub.docker.com/_/postgres#how-to-extend-this-image
POSTGRES_USER: saarsec
POSTGRES_PASSWORD: 123456789
POSTGRES_DB: saarctf
# https://hub.docker.com/_/rabbitmq#setting-default-user-and-password
RABBITMQ_DEFAULT_USER: saarsec
RABBITMQ_DEFAULT_PASS: 123456789
RABBITMQ_DEFAULT_VHOST: saarctf
# https://hub.docker.com/_/rabbitmq#memory-limits
RABBITMQ_VM_MEMORY_HIGH_WATERMARK: 128MB
# Ensure the docker uses utf-8
LC_ALL: C.UTF-8
LANG: C.UTF-8
# Enable caching for npm and pip
NPM_CONFIG_CACHE: $CI_PROJECT_DIR/.cache/npm
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
PWNLIB_NOTERM: 1
# Enable this variable to print pwntools log output
# DEBUG: 1
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache
services:
- name: postgres:13
- name: redis:6.0-alpine
- name: rabbitmq:3.8-management-alpine
flag-submission:
before_script:
- export PATH=$HOME/.local/bin:$PATH
- ./ci/configure_caching.sh
- ./ci/install_dependencies.sh
script:
- ./ci/test-flag-submission.sh
demo-checker:
before_script:
- export PATH=$HOME/.local/bin:$PATH
- ./ci/configure_caching.sh
- ./ci/install_dependencies.sh
variables:
FLASK_APP: controlserver/app.py
script:
- set -euxo pipefail
# Configure database credentials for container setup
- cp ./config.containers.json ./config.json
- ./ci/test-python-unittest.sh
- ./ci/test-demo-checker.py
shellcheck:
image: koalaman/shellcheck-alpine:v0.7.0
allow_failure: true
script:
# - find -iname \*.sh -exec shellcheck '{}' \;
- shellcheck --color=always --shell=bash ./ci/*.sh