deploy-pioneer.yml 1020 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. # Build Pioneer, copy build artifacts and sync to S3
  3. - name: Set ws_rpc for build node
  4. set_fact:
  5. ws_rpc: "{{ hostvars[groups['rpc'][0]].ws_rpc }}"
  6. - name: Build Pioneer code
  7. shell: "WS_URL=wss://{{ ws_rpc }} yarn && yarn workspace @joystream/types build && yarn workspace pioneer build"
  8. args:
  9. chdir: "{{ remote_code_path }}"
  10. async: 3600
  11. poll: 0
  12. register: build_result
  13. - name: Check on build async task
  14. async_status:
  15. jid: '{{ build_result.ansible_job_id }}'
  16. register: job_result
  17. until: job_result.finished
  18. # Max number of times to check for status
  19. retries: 36
  20. # Check for the status every 100s
  21. delay: 100
  22. - name: Copying build files to local
  23. synchronize:
  24. src: "{{ remote_code_path }}/pioneer/packages/apps/build"
  25. dest: "{{ data_path }}"
  26. mode: pull
  27. run_once: true
  28. - name: Run S3 Sync to upload build files to bucket
  29. community.aws.s3_sync:
  30. bucket: "{{ bucket_name }}"
  31. file_root: "{{ data_path }}/build"
  32. region: us-east-1
  33. delegate_to: localhost