build-code.yml 1022 B

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. - name: Get latest Joystream code, build it and copy binary to local
  3. hosts: build
  4. gather_facts: no
  5. tasks:
  6. - name: Get code from local or git repo
  7. include_role:
  8. name: common
  9. tasks_from: "{{ 'get-code-local' if build_local_code|bool else 'get-code-git' }}"
  10. - name: Run setup and build
  11. include_role:
  12. name: common
  13. tasks_from: run-setup-build
  14. - name: Copy joystream-node binary from build to local
  15. fetch:
  16. src: "{{ remote_code_path }}/target/release/joystream-node"
  17. dest: "{{ data_path }}/joystream-node"
  18. flat: yes
  19. - name: Copy binary to remote servers
  20. hosts: all
  21. gather_facts: no
  22. tasks:
  23. - name: Create release directory
  24. file:
  25. path: "{{ remote_code_path }}/target/release"
  26. state: directory
  27. - name: Copying joystream-node binary to all servers
  28. copy:
  29. src: "{{ data_path }}/joystream-node"
  30. dest: "{{ remote_code_path }}/target/release/joystream-node"
  31. mode: "0775"