Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ func (d *SSLDeployerProvider) deployViaSslService(ctx context.Context, cloudCert
}

if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ func (d *SSLDeployerProvider) Deploy(ctx context.Context, certPEM string, privke
}

if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return nil, fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ func (d *SSLDeployerProvider) Deploy(ctx context.Context, certPEM string, privke
}

if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return nil, fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ func (d *SSLDeployerProvider) executeUpdateCertificateInstance(ctx context.Conte
return fmt.Errorf("failed to execute sdk request 'ssl.UpdateCertificateInstance': %w", err)
}

if updateCertificateInstanceResp.Response.DeployStatus == nil {
if updateCertificateInstanceResp.Response.DeployStatus == nil || updateCertificateInstanceResp.Response.DeployRecordId == nil {
return errors.New("unexpected deployment job status")
} else if *updateCertificateInstanceResp.Response.DeployStatus == 1 {
} else if *updateCertificateInstanceResp.Response.DeployRecordId > 0 {
deployRecordId = fmt.Sprintf("%d", *updateCertificateInstanceResp.Response.DeployRecordId)
break
}
Expand Down Expand Up @@ -175,6 +175,9 @@ func (d *SSLDeployerProvider) executeUpdateCertificateInstance(ctx context.Conte
}

if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}
Expand Down Expand Up @@ -257,6 +260,9 @@ func (d *SSLDeployerProvider) executeUploadUpdateCertificateInstance(ctx context
}

if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}
Expand Down