Export Tasks
All your tasks can be exported into a .json
file, this file can be then imported to Gaucho, this is useful for backup,
syncing or sharing tasks.
caution
Note that exporting will only export tasks, suites and global env variables it won't export your settings.
#
Export all tasksTo export all tasks and suites into a file (e.g for a backup):
- Go to settings->actions
- Click on Export tasks.
- A dialog will appear asking you to save a file in your system. This file will contain all tasks, suites and global env in JSON format.
#
Import all tasksThis process will remove all tasks, suites and global env variables, and load those in a file previously exported. To do this:
- Go to settings->actions
- Click on Import tasks.
- A dialog will appear asking you to select a file in your system. This file should contains all tasks, suites and global env in JSON format.
tip
If the file is not valid, or there is a problem. Tasks won't be loaded and existing tasks will be kept.
#
Export suiteInstead of exporting all the tasks, a single suite can be exported into a file:
- Right-click into the suite name.
- In the context menu, select "Export".
- A dialog asking you to save a file will appear.
#
Import suiteTo import a suite:
- Go to settings->actions
- Click on Import suite.
- A dialog will appear asking you to select a file in your system.
- The new suite will be available with all its tasks.
tip
To import a suite you must have less than the maximum number of suites (6 by default).
#
File formatRegardless of what you export (all tasks or a single suite), the resulting file is going to be a JSON file with the following fields:
- suites: An array of suites each item containing an object representing a suite.
- title: The name of the suite.
- tasks: An array containing the objects representing each task.
- title: The task name
- command: The task command or script
- env (optional): Array containing pairs (array) of key-value for each env variable.
- path (optional): Path of the task
- version: The version of Gaucho app that exported the tasks.
- globalEnv (optional): An array of pairs representing the global env variables
tip
While not recommended, it is possible to manually create or edit these files.
#
ExamplesA file exporting all tasks:
{ "suites": [{ "title": "Suite 1", "tasks": [{ "title": "Task 1", "command": "echo hello" }, { "title": "Another task", "command": "ls", "env": [ ["testvar", "value"] ], "path": "~" }] }, { "title": "another suite", "tasks": [{ "title": "sleep", "command": "sleep" }] }], "version": "1.0.0", "globalEnv": [ ["globalenv", "value"] ]}
A file exporting a single suite:
{ "suites": [{ "title": "Suite 1", "tasks": [{ "title": "Task 1", "command": "echo hello" }, { "title": "Another task", "command": "ls", "env": [ ["testvar", "value"] ], "path": "~" }] }], "version": "1.0.0"}
note
When exporting tasks, the resulting file will be minified to take less space.