Implement OCIRepository commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/fluxcd/flux2/internal/utils"
|
||||
)
|
||||
|
||||
var supportedKustomizationSourceKinds = []string{sourcev1.GitRepositoryKind, sourcev1.BucketKind}
|
||||
var supportedKustomizationSourceKinds = []string{sourcev1.OCIRepositoryKind, sourcev1.GitRepositoryKind, sourcev1.BucketKind}
|
||||
|
||||
type KustomizationSource struct {
|
||||
Kind string
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
|
||||
// Build archives the given directory as a tarball to the given local path.
|
||||
// While archiving, any environment specific data (for example, the user and group name) is stripped from file headers.
|
||||
func Build(artifactPath, sourceDir string) error {
|
||||
func Build(artifactPath, sourceDir string) (err error) {
|
||||
if f, err := os.Stat(sourceDir); os.IsNotExist(err) || !f.IsDir() {
|
||||
return fmt.Errorf("invalid source dir path: %s", sourceDir)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user