-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ Implement publish command `csmctl publish` will generate the release similar to create command but additionally it will push the generated release to the oci repository. For this, we implemented the generic interface for assetsclients that we have in the CSO as well and that is fulfilled both by Github and OCI clients. Signed-off-by: janiskemper <[email protected]> * Add basic auth option for the oci client (#148) Signed-off-by: Roman Hros <[email protected]> --------- Signed-off-by: janiskemper <[email protected]> Signed-off-by: Roman Hros <[email protected]> Co-authored-by: Roman Hros <[email protected]>
- Loading branch information
1 parent
be4643f
commit a743d0c
Showing
82 changed files
with
11,095 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
Copyright 2024 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package assetsclient contains interface for talking to assets repositories. | ||
package assetsclient | ||
|
||
import ( | ||
"context" | ||
) | ||
|
||
// Client contains functions to talk to list and download assets. | ||
type Client interface { | ||
DownloadReleaseAssets(ctx context.Context, tag, path string) error | ||
ListRelease(ctx context.Context) ([]string, error) | ||
} | ||
|
||
// Factory is a factory to generate assets clients. | ||
type Factory interface { | ||
NewClient(ctx context.Context) (Client, error) | ||
} | ||
|
||
// Pusher contains function to push the release assets to the registry. | ||
type Pusher interface { | ||
PushReleaseAssets(ctx context.Context, releaseAssets []ReleaseAsset, tag, dir, artifactType string, metadata map[string]string) error | ||
} | ||
|
||
// ReleaseAsset represents a release asset that would together make up the artifact. | ||
type ReleaseAsset struct { | ||
FileName string | ||
MediaType string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.