build-code.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. - name: Get latest Joystream code and run setup on all hosts
  3. hosts: build,rpc
  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
  11. include_role:
  12. name: common
  13. tasks_from: run-setup
  14. - name: Build joystream-node on build host and copy binary to local
  15. hosts: build
  16. gather_facts: no
  17. tasks:
  18. - name: Run build
  19. include_role:
  20. name: common
  21. tasks_from: run-build
  22. - name: Copy joystream-node binary from build to local
  23. fetch:
  24. src: "{{ remote_code_path }}/target/release/joystream-node"
  25. dest: "{{ data_path }}/joystream-node"
  26. flat: yes
  27. - name: Copy joystream-node binary to all hosts
  28. hosts: all
  29. gather_facts: no
  30. tasks:
  31. - name: Create release directory
  32. file:
  33. path: "{{ remote_code_path }}/target/release"
  34. state: directory
  35. - name: Copying joystream-node binary to all servers
  36. copy:
  37. src: "{{ data_path }}/joystream-node"
  38. dest: "{{ remote_code_path }}/target/release/joystream-node"
  39. mode: "0775"