Doppler is a revolutionary open-source software that allows you to automate tasks easily. Whether it’s a bunch of bash scripts or just starting your car remotely, you can automate it. You can build, run, reuse and share automations with anyone around the globe.
On top of all of this life-simplifying project, we are striving to make an climate friendly software that is fast, easy and consumes as little resources as possible.
Using snap:
snap install dopplertask
Install JDK 11 and gradle.
To run as a project:
gradle clean build bootRun
Below is an example of a Dopplerfile:
{
"name": "Test Task",
"actions": [
{
"@type": "PrintAction",
"message": "This is an example task."
}
]
}
This file is used to add tasks to the system. You can do that by sending a request to the REST API:
curl -X POST http://localhost:8090/task -H "Content-Type: application/json" -d @add_task.json
To run a task, send the JSON with the task id and parameters to the REST API:
{
"taskName": "doppler-example",
"parameters": {
}
}
Example of the call:
curl -X POST http://localhost:8090/schedule/task -H "Content-Type: application/json" -d @run_task.json
- message: A message to be printed
Connects to a machine via SSH and executes a command
- hostname: hostname to connect to
- username
- password
- command: A command to execute once connected
- hostname: hostname to connect to
- username
- password
- sourceFilename: location of the file to be transferred
- destinationFilename: location of where the file will be placed in the remote host
- url
- method: GET, POST, PUT, DELETE
- body
- headers: Key-value list of headers
Executes a MySQL statement, like a SELECT statement.
- hostname: hostname to connect to
- port (Optional)
- username
- password
- database
- timezone
- command
- seconds: Amount of seconds to wait
- taskName: name of another task
Starts a browser and executes a list of UI Actions.
- url: URL to naviate to.
- headless: If set to false, it will show the web browser window. Default is true.
- actionList: A list of actions to perform.
A UI Action contains the following fields:
- fieldName: Name of the field to control. Not required when using the actions WAIT OR ACCEPT_ALERT.
- findByType: Determines how to find the field. Possible values: ID, NAME, XPATH, CSS. Not required when using the actions WAIT OR ACCEPT_ALERT.
- action: Action to perform.
Action | Description |
---|---|
PRESS | Clicks on the requested field. |
WRITE | Writes in the requested field. Useful if the field is an input text or textarea. |
SELECT | Selects an item from the requested select list / dropdown based on name. |
WAIT | Waits a certain amount of time. Amount of time is expressed in milliseconds. |
ACCEPT_ALERT | Closes an alert / confirm box. |
- value: Required only if used with the actions WRITE, SELECT and WAIT.
Reads a file from disk.
- filename: name of a file. Using ~ in the beginning of the filename will point to the home directory eg. ~/Downloads/testfile.txt
Sets or modifies a variable for the current execution.
- setVariableList: A list of key-value pairs of variables.
Executes a command on the current machine.
- command: Command to execute.
All actions have retry mechanisms to allow you to retry an action.
- retries: Amount of retries.
- failOn: Any input will cause the current action to be marked as failure.
- continueOnFailure: Lets the action continue on failure, ignoring any retry.
To run the built docker image:
docker run -p 8090:8090 -p 61617:61617 dopplertask/doppler-engine
To rebuild the docker image:
docker build -t dopplertask/doppler-engine .
- Feras Wilson
- Jack Kourie
This project is licensed under the Apache License 2.0 - see the LICENSE file for details