File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test contest deployment (ansible scripts)
2+
3+ on : [push,pull_request]
4+
5+ jobs :
6+ test_judgedaemon_role :
7+ strategy :
8+ matrix :
9+ os : [ubuntu-latest, ubuntu-20.04]
10+ role : [domserver,judgehost]
11+ runs-on : ${{ matrix.os }}
12+ steps :
13+ - name : Checkout repo
14+ uses : actions/checkout@v2
15+ - name : Install ansible lint tools
16+ run : sudo apt update; sudo apt install ansible
17+ - name : Setup the hosts file
18+ working-directory : ./icpc-wf/ansible
19+ run : sed -i 's/\[${{ matrix.role }}\]/[removed]/g' hosts; printf '\n[${{ matrix.role }}]\ngithub-action\tansible_host=localhost ansible_connection=local' >> hosts
20+ - name : Generate insecure credentials
21+ working-directory : ./icpc-wf/ansible
22+ run : mv group_vars/all/secret.yml{.example,}
23+ - name : Run the default deployment method
24+ working-directory : ./icpc-wf/ansible
25+ run : make ${{ matrix.role }}
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ DOMSERVER_URL: "{{DOMSERVER}}"
1818DOMSERVER_SSL_CERT : /etc/ssl/certs/domserver.crt
1919DOMSERVER_SSL_KEY : /etc/ssl/private/domserver.key
2020
21+ # Set this to true when you are using an image with a graphical desktop
22+ GRAPHICAL : false
23+
2124# Set this to true when you are using the ICPC World Finals Contest Image
2225ICPC_IMAGE : false
2326
Original file line number Diff line number Diff line change 4141 tags : prometheus_target_all
4242 when : GRAFANA_MONITORING
4343 pre_tasks :
44+ - name : Get current services
45+ service_facts :
4446 - name : Disable all cores
4547 service :
4648 name="domjudge-judgedaemon@{{item}}"
4749 state=stopped
4850 with_sequence : start=0 end={{ ansible_processor_vcpus }} format=domjudge-judgedaemon@%1x
51+ when : ' "domjudge-judgedaemon@0.service" in services'
4952 tasks :
5053 - name : add autostart shortcuts
5154 template :
Original file line number Diff line number Diff line change 2828 - name : Force enable alt-tab for switching windows
2929 copy : src=dconf/ dest=/etc/dconf/
3030 notify : update dconf
31+ when : GRAPHICAL
You can’t perform that action at this time.
0 commit comments