mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-20 18:45:43 +00:00
Implement OCIRepository commands
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
12a491f538
commit
2d8db4f20d
14 changed files with 681 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue