Skip to content

Commit

Permalink
Add retry field to Job and Defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
draoncc committed Jan 17, 2023
1 parent a0ee5d0 commit 21f9283
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions GitLab/Defaults/Type.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ in { image : Optional Text
, after_script : List Text
, services : List Service
, cache : Optional CacheSpec
, retry : Optional Natural
}
1 change: 1 addition & 0 deletions GitLab/Defaults/default.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ in { image = None Text
, after_script = [] : List Text
, services = [] : List Service
, cache = None CacheSpec
, retry = None Natural
}
: Defaults
2 changes: 2 additions & 0 deletions GitLab/Defaults/toJSON.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ let Defaults/toJSON
JSON.Type
CacheSpec.toJSON
defaults.cache
, retry =
Optional/map Natural JSON.Type JSON.natural defaults.retry
}

in JSON.object (dropNones Text JSON.Type everything)
Expand Down
1 change: 1 addition & 0 deletions GitLab/Job/Type.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in { stage : Optional Text
, cache : Optional (List CacheSpec)
, artifacts : Optional ArtifactsSpec
, resource_group : Optional Text
, retry : Optional Natural
, environment : Optional Environment
, trigger : Optional Trigger
, timeout : Optional Text
Expand Down
1 change: 1 addition & 0 deletions GitLab/Job/append.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ let append
b.artifacts
, resource_group =
mergeOptionalRight Text a.resource_group b.resource_group
, retry = mergeOptionalRight Natural a.retry b.retry
, environment =
mergeOptional
Environment.Type
Expand Down
1 change: 1 addition & 0 deletions GitLab/Job/default.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in { stage = None Text
, cache = None (List CacheSpec)
, artifacts = None ArtifactsSpec
, resource_group = None Text
, retry = None Natural
, environment = None Environment
, trigger = None Trigger
, timeout = None Text
Expand Down
2 changes: 2 additions & 0 deletions GitLab/Job/toJSON.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ in let Job/toJSON
JSON.Type
JSON.string
job.resource_group
, retry =
Optional/map Natural JSON.Type JSON.natural job.retry
, environment =
Optional/map
Environment.Type
Expand Down

0 comments on commit 21f9283

Please sign in to comment.