deploy-pioneer.yml 817 B

123456789101112131415161718192021222324252627282930
  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. retries: 3
  11. delay: 5
  12. register: result
  13. until: result is not failed
  14. - name: Copying build files to local
  15. synchronize:
  16. src: "{{ remote_code_path }}/pioneer/packages/apps/build"
  17. dest: "{{ data_path }}"
  18. mode: pull
  19. run_once: true
  20. - name: Run S3 Sync to upload build files to bucket
  21. community.aws.s3_sync:
  22. bucket: "{{ bucket_name }}"
  23. file_root: "{{ data_path }}/build"
  24. profile: joystream-user
  25. region: us-east-1
  26. delegate_to: localhost