Skip to content

Commit

Permalink
fix: setup jfrog plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobmoellerdev committed Dec 3, 2024
1 parent e5f75d5 commit 2d14304
Show file tree
Hide file tree
Showing 10 changed files with 237 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:
env:
REF: ${{ inputs.ref == '' && github.ref || inputs.ref }}
CTF_TYPE: directory
components: '["ocmcli", "helminstaller", "helmdemo", "subchartsdemo", "ecrplugin"]'
components: '["ocmcli", "helminstaller", "helmdemo", "subchartsdemo", "ecrplugin", "jfrogplugin"]'
IMAGE_PLATFORMS: 'linux/amd64 linux/arm64'
PLATFORMS: 'windows/amd64 darwin/arm64 darwin/amd64 linux/amd64 linux/arm64'

Expand Down
105 changes: 0 additions & 105 deletions api/ocm/extensions/blobhandler/handlers/generic/http/blobhandler.go

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions api/ocm/plugin/ppi/cmds/upload/put/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,17 @@ func Command(p ppi.Plugin, cmd *cobra.Command, opts *Options) error {
if u == nil {
return errors.ErrNotFound(descriptor.KIND_UPLOADER, fmt.Sprintf("%s:%s", opts.ArtifactType, opts.MediaType))
}

fi, err := os.Stdin.Stat()
if err != nil {
fmt.Println("failed to stat stdin", err)
}
if size := fi.Size(); size == 0 {
return fmt.Errorf("stdin is empty, and nothing can be uploaded")
}

h, err := u.Upload(p, opts.ArtifactType, opts.MediaType, opts.Hint, spec, opts.Credentials, os.Stdin)

if err != nil {
return fmt.Errorf("upload failed: %w", err)
}
Expand Down
Loading

0 comments on commit 2d14304

Please sign in to comment.