Skip to content

Commit 11b27a1

Browse files
committed
The vendor dir was moved in main
This requires a new way of creating the archive, in the past vendor was the only thing of reasonable size in lib, for webapp we have other files there also. For now we should just archive the vendor only from within webapp.
1 parent dd55f81 commit 11b27a1

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

provision-contest/ansible/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ default:
1111
@echo " - make scoreboard"
1212
@echo " - make autoanalyst"
1313

14-
LIBVENDORTGZ=roles/domjudge_checkout/files/lib-vendor.tgz
14+
VENDORTGZ=roles/domjudge_checkout/files/vendor.tgz
1515
SSHKEY=roles/ssh/files/id_ed25519
1616
SSL_DOMSERVER=roles/ssl/files/domserver
1717
SSL_DOMSERVER_FILES=$(addprefix $(SSL_DOMSERVER),.key .crt)
@@ -24,16 +24,16 @@ SSL_CDS_FILES=$(addprefix $(SSL_CDS),.key .crt)
2424
SSL_GRAFANA=roles/grafana/files/ssl
2525
SSL_GRAFANA_FILES=$(addprefix $(SSL_GRAFANA),.key .crt)
2626

27-
ifeq ($(wildcard $(LIBVENDORTGZ)),)
28-
LIBVENDOR=
27+
ifeq ($(wildcard $(VENDORTGZ)),)
28+
VENDOR=
2929
else
30-
LIBVENDOR=roles/domjudge_checkout/files/lib/vendor
31-
$(LIBVENDOR): $(LIBVENDORTGZ)
32-
-cd roles/domjudge_checkout/files && tar xzf $(notdir $<)
30+
VENDOR=roles/domjudge_checkout/files/webapp/vendor
31+
$(VENDOR): $(VENDORTGZ)
32+
-cd roles/domjudge_checkout/files/webapp && tar xzf ../$(notdir $<)
3333
endif
3434

3535
ROLES=domserver judgehost admin grafana cds presclient presadmin scoreboard mgmt autoanalyst
36-
$(ROLES): %: %.yml hosts group_vars/all/secret.yml $(LIBVENDOR) $(SSHKEY) $(SSHKEY).pub
36+
$(ROLES): %: %.yml hosts group_vars/all/secret.yml $(VENDOR) $(SSHKEY) $(SSHKEY).pub
3737
ansible-playbook -i hosts $<
3838

3939
FAILED_ROLES=$(addprefix failed-,$(ROLES))
@@ -87,7 +87,7 @@ $(SSL_GRAFANA_FILES):
8787
-sha256 -days 365 -keyout $(SSL_GRAFANA).key -out $(SSL_GRAFANA).crt
8888

8989
clean:
90-
rm -rf $(LIBVENDOR)
90+
rm -rf $(VENDOR)
9191

9292
distclean: clean
9393
rm -f $(SSHKEY) $(SSHKEY).pub

provision-contest/ansible/roles/domjudge_checkout/tasks/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@
4040
become: false
4141
delegate_to: localhost
4242
stat:
43-
path: roles/domjudge_checkout/files/lib/vendor
44-
register: libvendor
43+
path: roles/domjudge_checkout/files/webapp/vendor
44+
register: vendor
4545
check_mode: no
4646

4747
- name: Copy in composer dependencies (if they exist locally)
4848
synchronize:
49-
src: files/lib/vendor/
50-
dest: "{{ DJ_DIR }}/lib/vendor/"
49+
src: files/webapp/vendor/
50+
dest: "{{ DJ_DIR }}/webapp/vendor/"
5151
owner: false
5252
use_ssh_args: true
53-
when: libvendor.stat.exists
53+
when: vendor.stat.exists
5454

55-
- name: Fix ownership of lib/vendor
55+
- name: Fix ownership of webapp/vendor
5656
file:
57-
path: "{{ DJ_DIR }}/lib/vendor"
57+
path: "{{ DJ_DIR }}/webapp/vendor"
5858
recurse: true
5959
owner: domjudge
6060
group: domjudge

0 commit comments

Comments
 (0)