Uploading artifacts from Robocloud container run to own server

This functionality was questioned in Robocorp Developers Slack - possibilty to upload files from the container run into own server endpoint.

Before we have more sophisticated solution for this below steps can be used to upload files from the worker run.

Steps:

  1. modify package.yaml
  • add section environment.path, entrypoints
  • modify command section to have only ./entrypoint.sh
  1. modify entrypoints/entrypoint.sh
  • make sure that python line matches example below
  • define files you want to upload with curl

MODIFIED package.yaml

activities:
  RobotSpareBin Complete:
    output: output
    activityRoot: .
    environment:
      path:
        - entrypoints
    action:
      command:
        - ./entrypoint.sh

condaConfig: config/conda.yaml

MODIFIED entrypoint.sh

#!/bin/bash -xe

python -m robot -d output --logtitle "Task log" ./tasks/
curl -X PUT --upload-file ./output/log.html SERVER_ADDRESS
2 Likes