Migrating your robot to use robot.yaml configuration

Why?

During the early access and general availability, we have been collecting feedback and implementing improvements to the ways of defining the robot and the terminology itself. The new robot.yaml configuration file is the result of these.

Robocorp Lab v4 will already target the new format and provide a much faster, isolated robot execution.

In Robocorp Cloud, we are planning to obsolete the support for the entry point scripts and package.yaml format after 01.11.2020 (November 1st).

Below you will find separate guides depending on the stage of your robots.

Improvements over the entry point scripts:

  • The folder structure of your robot is up to you.
  • No need to write and learn .sh or .bat or .cmd syntax; you can write your commands in the yaml file.
  • You can define PATH and PYTHONPATH items.
  • In Robocorp Cloud, you no longer need to define the command string; just select the robot and the task from the drop-down.

Improvements over the package.yaml format:

  • Environment defined only once.
  • Simplified task structure.

I'm using entry point scripts. What should I do?

  1. Copy this robot.yaml to the root of your robot folder (next to the /entrypoints -folder).
  2. The YAML file contains comments to guide what you need to do. If you have not changed the folders or the entry point scripts, robot.yaml should work as-is.
  3. You can now test drive your robot in Robocorp Lab and publish it to Robocorp Cloud.
  4. In Robocorp Cloud, the resulting robot should look something like this (you can see the tasks at the bottom): Robot in Robocorp Cloud
  5. It is easier to just redefine the steps in your processes using the new robot.
    • With the new robot, you can just select the robot and task from a drop-down and select the target environment directly. Add process step

I'm using package.yaml. What should I do?

  1. Make a copy of your package.yaml in the same folder that it is in and rename the copy to robot.yaml.
  2. Edit the robot.yaml:
    • Rename activities to tasks.
    • Move the output: line to the bottom of the file and rename it to artifactsDir:.
    • Remove the activityRoot line.
    • Remove the environment line.
    • Move PATH and PYTHONPATH -lists to the bottom of the file.
      • These attributes are case-sensitive and need to be written in ALL CAPS.
    • Remove the action: item in front of the the command.
    • Rename condaConfig to condaConfigFile. package.yaml migration
  3. Test and update to Robocorp Cloud.
    • Once you are done, you can delete the package.yaml.
    • If you didn't change the name of the task, the robot should directly work in your processes.