Skip to content

Commit 7f4fbd8

Browse files
vmcjnickygerritsen
authored andcommitted
Address comments from Nicky+Jaap
1 parent e3cf853 commit 7f4fbd8

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

icpc-wf/ansible/group_vars/all/all.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ PHP_MAX_FILE_UPLOADS: 101
3737

3838
# Git repo URL
3939
DJ_GIT_HOST: "{{MAIN_ADMIN_IP}}"
40-
DJ_GIT_REPO: "domjudge@{{DJ_GIT_HOST}}:domjudge"
41-
DJ_GIT_REPO_UPSTREAM: "https://github.com/domjudge/domjudge.git"
42-
DJ_GIT_REPO_SCRIPTS: "domjudge@{{DJ_GIT_HOST}}:domjudge-scripts-bare"
40+
DJ_GIT_REPO: "https://github.com/domjudge/domjudge.git"
41+
DJ_GIT_REPO_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge"
42+
DJ_GIT_REPO_SCRIPTS: "https://github.com/domjudge/domjudge-scripts.git"
43+
DJ_GIT_REPO_SCRIPTS_RESTRICTED: "domjudge@{{DJ_GIT_HOST}}:domjudge-scripts-bare"
4344

4445
PHPSTORM_VERSION: 2021.2
4546
PHPSTORM_FULL_VERSION: 212.5284.49

icpc-wf/ansible/roles/domjudge_checkout/tasks/main.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,17 @@
88
owner: domjudge
99
group: domjudge
1010

11-
- name: create working copy of the domjudge repo
11+
- name: Update repo URL based on network
12+
set_fact:
13+
DJ_GIT_REPO: "{{ DJ_GIT_REPO_RESTRICTED if WF_RESTRICTED_NETWORK else DJ_GIT_REPO}}"
14+
15+
- name: Create working copy of the domjudge repo
1216
become: yes
1317
become_user: domjudge
1418
git: repo={{DJ_GIT_REPO}} dest={{DJ_DIR}} version={{DJ_BRANCH}} accept_hostkey=yes update=yes
1519
register: git_working_copy
1620
when: WF_RESTRICTED_NETWORK
1721

18-
- name: create working copy of the domjudge repo
19-
become: yes
20-
become_user: domjudge
21-
git: repo={{DJ_GIT_REPO_UPSTREAM}} dest={{DJ_DIR}} version={{DJ_BRANCH}} accept_hostkey=yes update=yes
22-
register: git_working_copy
23-
when: WF_RESTRICTED_NETWORK != true
24-
2522
- name: Check composer dependencies present
2623
become: no
2724
local_action: stat path=files/lib/vendor

0 commit comments

Comments
 (0)