Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The vendor dir was moved in main #156

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions provision-contest/ansible/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ default:
@echo " - make scoreboard"
@echo " - make autoanalyst"

LIBVENDORTGZ=roles/domjudge_checkout/files/lib-vendor.tgz
VENDORTGZ=roles/domjudge_checkout/files/vendor.tgz
SSHKEY=roles/ssh/files/id_ed25519
SSL_DOMSERVER=roles/ssl/files/domserver
SSL_DOMSERVER_FILES=$(addprefix $(SSL_DOMSERVER),.key .crt)
Expand All @@ -24,16 +24,16 @@ SSL_CDS_FILES=$(addprefix $(SSL_CDS),.key .crt)
SSL_GRAFANA=roles/grafana/files/ssl
SSL_GRAFANA_FILES=$(addprefix $(SSL_GRAFANA),.key .crt)

ifeq ($(wildcard $(LIBVENDORTGZ)),)
LIBVENDOR=
ifeq ($(wildcard $(VENDORTGZ)),)
VENDOR=
else
LIBVENDOR=roles/domjudge_checkout/files/lib/vendor
$(LIBVENDOR): $(LIBVENDORTGZ)
-cd roles/domjudge_checkout/files && tar xzf $(notdir $<)
VENDOR=roles/domjudge_checkout/files/webapp/vendor
$(VENDOR): $(VENDORTGZ)
-cd roles/domjudge_checkout/files/webapp && tar xzf ../$(notdir $<)
endif

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

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

clean:
rm -rf $(LIBVENDOR)
rm -rf $(VENDOR)

distclean: clean
rm -f $(SSHKEY) $(SSHKEY).pub
Expand Down
14 changes: 7 additions & 7 deletions provision-contest/ansible/roles/domjudge_checkout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
become: false
delegate_to: localhost
stat:
path: roles/domjudge_checkout/files/lib/vendor
register: libvendor
path: roles/domjudge_checkout/files/webapp/vendor
register: vendor
check_mode: no

- name: Copy in composer dependencies (if they exist locally)
synchronize:
src: files/lib/vendor/
dest: "{{ DJ_DIR }}/lib/vendor/"
src: files/webapp/vendor/
dest: "{{ DJ_DIR }}/webapp/vendor/"
owner: false
use_ssh_args: true
when: libvendor.stat.exists
when: vendor.stat.exists

- name: Fix ownership of lib/vendor
- name: Fix ownership of webapp/vendor
file:
path: "{{ DJ_DIR }}/lib/vendor"
path: "{{ DJ_DIR }}/webapp/vendor"
recurse: true
owner: domjudge
group: domjudge
Loading