Skip to content

Commit c87101b

Browse files
elderingvmcj
authored andcommitted
Use ccs-specs repo for API check script and pin to a fixed commit.
This way, CI doesn't just break when the upstream Contest API draft specification changes. (cherry picked from commit 53ccfef)
1 parent 9557402 commit c87101b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

gitlab/ci_settings.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export GITSHA
1313
export PS4='(${BASH_SOURCE}:${LINENO}): - [$?] $ '
1414
export LOGFILE="/opt/domjudge/domserver/webapp/var/log/prod.log"
1515

16+
CCS_SPECS_PINNED_SHA1='6b11623d586500d11ec20b6c12a4908b44ff0e41'
17+
1618
# Shared storage for all artifacts
1719
export GITLABARTIFACTS="$DIR/gitlabartifacts"
1820
mkdir -p "$GITLABARTIFACTS"

gitlab/integration.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,15 @@ fi
108108
section_end judgehost
109109

110110
section_start more_setup "Remaining setup (e.g. starting judgedaemon)"
111-
# download domjudge-scripts for API check
111+
112+
# Download yajsv and ccs-specs for API check.
112113
cd $HOME
113-
composer -n require justinrainbow/json-schema
114+
curl -o yajsv https://github.com/neilpa/yajsv/releases/download/v1.4.1/yajsv.linux.amd64
115+
chmod a+x yajsv
114116
echo -e "\033[0m"
115-
PATH=${PATH}:${HOME}/vendor/bin
116-
git clone --depth=1 https://github.com/DOMjudge/domjudge-scripts.git
117-
CHECK_API=${HOME}/domjudge-scripts/contest-api/check-api.sh
117+
git clone https://github.com/icpc/ccs-specs.git
118+
( cd ccs-specs && git reset --hard $CCS_SPECS_PINNED_SHA1 )
119+
CHECK_API="${HOME}/ccs-specs/check-api.sh -j ${HOME}/yajsv"
118120

119121
# Recreate domjudge-run-0 user with random UID to prevent clashes with
120122
# existing users in the host and other CI jobs, which can lead to

0 commit comments

Comments
 (0)