internal/cloudapi: add ostree options for all otree image types
b01792d9dd broke this behaviour. All
ostree image types should have an ostree resolve job.
This commit is contained in:
parent
423b4b77d7
commit
620536fd61
4 changed files with 44 additions and 30 deletions
|
|
@ -289,18 +289,19 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
|
||||
var ostreeOptions *ostree.RequestParams
|
||||
// assume it's an ostree image if the type has a default ostree ref
|
||||
if imageType.OSTreeRef() != "" && ir.Ostree != nil {
|
||||
if imageType.OSTreeRef() != "" {
|
||||
ostreeOptions = &ostree.RequestParams{}
|
||||
if ir.Ostree.Ref != nil {
|
||||
ostreeOptions.Ref = *ir.Ostree.Ref
|
||||
if ir.Ostree != nil {
|
||||
if ir.Ostree.Ref != nil {
|
||||
ostreeOptions.Ref = *ir.Ostree.Ref
|
||||
}
|
||||
if ir.Ostree.Url != nil {
|
||||
ostreeOptions.URL = *ir.Ostree.Url
|
||||
}
|
||||
if ir.Ostree.Parent != nil {
|
||||
ostreeOptions.Parent = *ir.Ostree.Parent
|
||||
}
|
||||
}
|
||||
if ir.Ostree.Url != nil {
|
||||
ostreeOptions.URL = *ir.Ostree.Url
|
||||
}
|
||||
if ir.Ostree.Parent != nil {
|
||||
ostreeOptions.Parent = *ir.Ostree.Parent
|
||||
}
|
||||
|
||||
if ostreeOptions.Ref == "" {
|
||||
ostreeOptions.Ref = imageType.OSTreeRef()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ func TestComposeDependencyError(t *testing.T) {
|
|||
"distribution": "%s",
|
||||
"image_request":{
|
||||
"architecture": "%s",
|
||||
"image_type": "aws",
|
||||
"image_type": "edge-commit",
|
||||
"ostree": {
|
||||
"url": "somerepo.org",
|
||||
"ref": "test"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue