Skip to content

Commit e503815

Browse files
committed
Fixes @vmcj's nits
1 parent 193c5fe commit e503815

File tree

2 files changed

+23
-29
lines changed

2 files changed

+23
-29
lines changed

provision-contest/ansible/EOC/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## DOMjudge EOC ansible helper
2-
This ansible playbook should automate must of the tasks DOMjudge needs to perform for the End Of Contest procedures during the ICPC WF's. It was created for the WF 2021 in Dhaka, which took place in 2022.
2+
This ansible playbook should automate most of the tasks DOMjudge needs to perform for the End Of Contest procedures during the ICPC WF's. It was created for the WF 2021 in Dhaka, which took place in 2022.
33

44
Two types of authentication are used and supported. Session based auth and basic auth.
55
- Session based auth retrieves a CSRF token and fakes a login action.
@@ -15,7 +15,7 @@ The following steps from the EOC 2022-Oct document have been automated:
1515
29. `Primary pushes results.tsv into git repo`. Tag for just this action: `results.tsv`. Note, a manual commit is still needed!
1616
32. `Compare scoreboard.json between primary and shadow`. Tag for just this action: `scoreboard`. Note, only if other (shadow or primary) credentials are provided.
1717
33. `Compare awards.json between primary and CDS`. Tag for just this action: `awards`. Note, only if CDS credentials are provided.
18-
36. `Verify that Primary and ... System Test`. Tag for just this action: `fetch`. Note, a manual commit is still needed and the `final_standings.html` is actually the static-scoreboard zip.
18+
36. `Verify that Primary and ... System Test`. Tag for just this action: `fetch`. Note, a manual commit is still needed. The static scoreboard (zip) and an export of the clarifications is also pulled from DOMjudge.
1919

2020

2121
## Setup

provision-contest/ansible/EOC/main.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
other_basic_auth: "Basic {{ (other_username+':'+other_password) | b64encode }}"
2828
when: other_available
2929

30-
3130
- name: Attempt login into DOMjudge
3231
tags: all, fetch, results.tsv
3332
block:
@@ -63,7 +62,6 @@
6362
headers:
6463
cookie: "{{ login_response.set_cookie }}"
6564

66-
6765
- name: Download results.tsv
6866
tags: all, results.tsv
6967
ansible.builtin.uri:
@@ -99,17 +97,6 @@
9997
register: other_scoreboard
10098
when: other_available
10199

102-
# - name: Convert scoreboard to nice json
103-
# block:
104-
# - name: Convert DOMjudge scoreboard to nice json
105-
# ansible.builtin.set_fact:
106-
# dj_scoreboard_nice: "{{ dj_scoreboard.json | to_nice_json }}"
107-
#
108-
# - name: Convert other scoreboard to nice json
109-
# ansible.builtin.set_fact:
110-
# other_scoreboard_nice: "{{ other_scoreboard.json | to_nice_json }}"
111-
# when: other_available
112-
113100
- name: Does Dj == other for scoreboard
114101
shell: "{{ jd_loc }} /tmp/scoreboard.dj.json /tmp/scoreboard.other.json"
115102
when: other_available
@@ -140,17 +127,6 @@
140127
register: cds_awards
141128
when: cds_available
142129

143-
# - name: Convert awards to nice json
144-
# block:
145-
# - name: Convert DOMjudge awards to nice json
146-
# ansible.builtin.set_fact:
147-
# dj_awards_nice: "{{ dj_awards.json | to_nice_json }}"
148-
#
149-
# - name: Convert cds awards to nice json
150-
# ansible.builtin.set_fact:
151-
# cds_awards_nice: "{{ cds_awards.json | to_nice_json }}"
152-
# when: cds_available
153-
154130
- name: Does Dj == CDS for awards
155131
shell: "{{ jd_loc }} /tmp/awards.dj.json /tmp/awards.cds.json"
156132
when: cds_available
@@ -190,12 +166,30 @@
190166
- scoreboard
191167
- teams
192168

193-
- name: "Store final standings (contest.zip)"
169+
- name: "Store final_standings.html (results.html)"
170+
tags: all, fetch
171+
ansible.builtin.uri:
172+
url: "{{ dj_url }}/jury/import-export/export/results.html"
173+
creates: "{{ repo }}/final_standings.html"
174+
dest: "{{ repo }}/final_standings.html"
175+
headers:
176+
cookie: "{{ login_response.set_cookie }}"
177+
178+
- name: "Store (clarifications.html)"
179+
tags: all, fetch
180+
ansible.builtin.uri:
181+
url: "{{ dj_url }}/jury/import-export/export/clarifications.html"
182+
creates: "{{ repo }}/clarifications.html"
183+
dest: "{{ repo }}/clarifications.html"
184+
headers:
185+
cookie: "{{ login_response.set_cookie }}"
186+
187+
- name: "Store final scoreboard (contest.zip)"
194188
tags: all, fetch
195189
ansible.builtin.uri:
196190
url: "{{ dj_url }}/public/scoreboard-data.zip?contest={{ contest_id }}"
197-
creates: "{{ repo }}/final_standings.zip"
198-
dest: "{{ repo }}/final_standings.zip"
191+
creates: "{{ repo }}/final_scoreboard.zip"
192+
dest: "{{ repo }}/final_scoreboard.zip"
199193
headers:
200194
cookie: "{{ login_response.set_cookie }}"
201195

0 commit comments

Comments
 (0)