-
Notifications
You must be signed in to change notification settings - Fork 12
/
task.go
39 lines (30 loc) · 1.02 KB
/
task.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package dog
// Task represents a task described in the Dogfile format.
type Task struct {
// Name of the task.
Name string
// Description of the task.
Description string
// The code that will be executed.
Code string
// Defaults to operating system main shell.
Runner string
// Pre-hooks execute other tasks before starting the current one.
Pre []string
// Post-hooks are analog to pre-hooks but they are executed after
// current task finishes its execution.
Post []string
// Default values for environment variables can be provided in the Dogfile.
// They can be modified at execution time.
Env []string
// Sets the working directory for the task. Relative paths are
// considered relative to the location of the Dogfile.
Workdir string
// Register stores the output of the task so it can be accessed by
// other tasks in the task chain.
//
// When present, a new environment variable is injected in future
// task chain runners using the register name as key and the output
// as value.
Register string
}