1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Implement OCIRepository commands

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2022-06-22 10:16:57 +03:00
parent 12a491f538
commit 2d8db4f20d
14 changed files with 681 additions and 2 deletions

View File

@@ -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

View File

@@ -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)
}