Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Include source file in errors from kubeyaml #1815

Merged
merged 1 commit into from
Mar 13, 2019
Merged
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
6 changes: 4 additions & 2 deletions release/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
"path/filepath"

"github.com/pkg/errors"

"github.com/weaveworks/flux"
"github.com/weaveworks/flux/cluster"
"github.com/weaveworks/flux/git"
Expand Down Expand Up @@ -48,11 +50,11 @@ func (rc *ReleaseContext) WriteUpdates(updates []*update.ControllerUpdate) error
for _, container := range update.Updates {
manifestBytes, err = rc.manifests.UpdateImage(manifestBytes, update.ResourceID, container.Container, container.Target)
if err != nil {
return err
return errors.Wrapf(err, "updating resource %s in %s", update.ResourceID.String(), update.Resource.Source())
}
}
if err = ioutil.WriteFile(update.ManifestPath, manifestBytes, os.FileMode(0600)); err != nil {
return err
return errors.Wrapf(err, "writing updated file %s", update.Resource.Source())
}
}
return nil
Expand Down