You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/job.md
+20-27Lines changed: 20 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,9 +98,9 @@ The resource supports the following arguments:
98
98
*`timeout_seconds` - (Optional) (Integer) An optional timeout applied to each run of this job. The default behavior is to have no timeout.
99
99
*`min_retry_interval_millis` - (Optional) (Integer) An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried.
100
100
*`max_concurrent_runs` - (Optional) (Integer) An optional maximum allowed number of concurrent runs of the job. Defaults to *1*.
101
-
*`email_notifications` - (Optional) (List) An optional set of email addresses notified when runs of this job begins, completes or fails. The default behavior is to not send any emails. This field is a block and is [documented below](#job-level-email_notifications-configuration-block).
101
+
*`email_notifications` - (Optional) (List) An optional set of email addresses notified when runs of this job begins, completes or fails. The default behavior is to not send any emails. This field is a block and is [documented below](#email_notifications-configuration-block).
102
102
*`webhook_notifications` - (Optional) (List) An optional set of system destinations (for example, webhook destinations or Slack) to be notified when runs of this job begins, completes or fails. The default behavior is to not send any notifications. This field is a block and is documented below.
103
-
*`notification_settings` - (Optional) An optional block controlling the notification settings on the job level (described below).
103
+
*`notification_settings` - (Optional) An optional block controlling the notification settings on the job level [documented below](#notification_settings-configuration-block).
104
104
*`schedule` - (Optional) (List) An optional periodic schedule for this job. The default behavior is that the job runs when triggered by clicking Run Now in the Jobs UI or sending an API request to runNow. This field is a block and is documented below.
105
105
*`health` - (Optional) An optional block that specifies the health conditions for the job (described below).
106
106
*`tags` - (Optional) An optional map of the tags associated with the job. See [tags Configuration Map](#tags-configuration-map)
@@ -132,7 +132,7 @@ This block describes individual tasks:
132
132
*`max_retries` - (Optional) (Integer) An optional maximum number of times to retry an unsuccessful run. A run is considered to be unsuccessful if it completes with a `FAILED` or `INTERNAL_ERROR` lifecycle state. The value -1 means to retry indefinitely and the value 0 means to never retry. The default behavior is to never retry. A run can have the following lifecycle state: `PENDING`, `RUNNING`, `TERMINATING`, `TERMINATED`, `SKIPPED` or `INTERNAL_ERROR`.
133
133
*`timeout_seconds` - (Optional) (Integer) An optional timeout applied to each run of this job. The default behavior is to have no timeout.
134
134
*`min_retry_interval_millis` - (Optional) (Integer) An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried.
135
-
*`email_notifications` - (Optional) (List) An optional set of email addresses notified when this task begins, completes or fails. The default behavior is to not send any emails. This field is a block and is [documented below](#task-level-email_notifications-configuration-block).
135
+
*`email_notifications` - (Optional) (List) An optional set of email addresses notified when this task begins, completes or fails. The default behavior is to not send any emails. This field is a block and is [documented below](#email_notifications-configuration-block).
136
136
*`webhook_notifications` - (Optional) (List) An optional set of system destinations (for example, webhook destinations or Slack) to be notified when runs of this task begins, completes or fails. The default behavior is to not send any notifications. This field is a block and is documented below.
137
137
*`health` - (Optional) block described below that specifies health conditions for a given task.
138
138
@@ -375,21 +375,27 @@ This block is used to specify Git repository information & branch/tag/commit tha
375
375
*`tag` - name of the Git branch to use. Conflicts with `branch` and `commit`.
376
376
*`commit` - hash of Git commit to use. Conflicts with `branch` and `tag`.
*`on_start` - (Optional) (List) list of emails to notify when the run starts.
381
-
*`on_success` - (Optional) (List) list of emails to notify when the run completes successfully.
382
-
*`on_failure` - (Optional) (List) list of emails to notify when the run fails.
383
-
*`on_duration_warning_threshold_exceeded` - (Optional) (List) list of emails to notify when the duration of a run exceeds the threshold specified by the `RUN_DURATION_SECONDS` metric in the `health` block.
384
-
*`no_alert_for_skipped_runs` - (Optional) (Bool) don't send alert for skipped runs. (It's recommended to use the corresponding setting in the `notification_settings` configuration block).
380
+
This block defines a job-level parameter for the job. You can define several job-level parameters for the job. Supported options are:
*`name` - (Required) The name of the defined parameter. May only contain alphanumeric characters, `_`, `-`, and `.`.
383
+
*`default` - (Required) Default value of the parameter.
384
+
385
+
*You can use this block only together with `task` blocks, not with the legacy tasks specification!*
386
+
387
+
### email_notifications Configuration Block
388
+
389
+
This block can be configured on both job and task levels for corresponding effect.
387
390
388
391
*`on_start` - (Optional) (List) list of emails to notify when the run starts.
389
392
*`on_success` - (Optional) (List) list of emails to notify when the run completes successfully.
390
393
*`on_failure` - (Optional) (List) list of emails to notify when the run fails.
391
394
*`on_duration_warning_threshold_exceeded` - (Optional) (List) list of emails to notify when the duration of a run exceeds the threshold specified by the `RUN_DURATION_SECONDS` metric in the `health` block.
392
395
396
+
The following parameter is only available for the job level configuration.
397
+
*`no_alert_for_skipped_runs` - (Optional) (Bool) don't send alert for skipped runs. (It's recommended to use the corresponding setting in the `notification_settings` configuration block).
398
+
393
399
### webhook_notifications Configuration Block
394
400
395
401
Each entry in `webhook_notification` block takes a list `webhook` blocks. The field is documented below.
@@ -417,28 +423,15 @@ webhook_notifications {
417
423
418
424
-> **Note** The following configuration blocks can be standalone or nested inside a `task` block
This block controls notification settings for both email & webhook notifications on a task level:
439
-
440
-
*`no_alert_for_skipped_runs` - (Optional) (Bool) don't send alert for skipped runs.
441
-
*`no_alert_for_canceled_runs` - (Optional) (Bool) don't send alert for cancelled runs.
434
+
The following parameter is only available on task level.
442
435
*`alert_on_last_attempt` - (Optional) (Bool) do not send notifications to recipients specified in `on_start` for the retried runs and do not send notifications to recipients specified in `on_failure` until the last retry of the run.
0 commit comments