mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
Diff mode test
This commit is contained in:
parent
d92ffb07bb
commit
b27611e565
@ -1448,6 +1448,8 @@ paths:
|
||||
type: boolean
|
||||
dry_run:
|
||||
type: boolean
|
||||
diff:
|
||||
type: boolean
|
||||
playbook:
|
||||
type: string
|
||||
environment:
|
||||
|
@ -25,6 +25,7 @@ type Task struct {
|
||||
Debug bool `db:"debug" json:"debug"`
|
||||
|
||||
DryRun bool `db:"dry_run" json:"dry_run"`
|
||||
Diff bool `db:"diff" json:"diff"`
|
||||
|
||||
// override variables
|
||||
Playbook string `db:"playbook" json:"playbook"`
|
||||
|
1
db/sql/migrations/v2.8.58.sql
Normal file
1
db/sql/migrations/v2.8.58.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE task ADD diff boolean NOT NULL DEFAULT false;
|
@ -707,6 +707,10 @@ func (t *TaskRunner) getPlaybookArgs() (args []string, err error) {
|
||||
args = append(args, "-vvvv")
|
||||
}
|
||||
|
||||
if t.task.Diff {
|
||||
args = append(args, "--diff")
|
||||
}
|
||||
|
||||
if t.task.DryRun {
|
||||
args = append(args, "--check")
|
||||
}
|
||||
|
@ -123,6 +123,10 @@ Example:
|
||||
v-model="item.dry_run"
|
||||
label="Dry Run"
|
||||
></v-checkbox>
|
||||
<v-checkbox
|
||||
v-model="item.diff"
|
||||
label="Diff Mode"
|
||||
></v-checkbox>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user