Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Step Runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
Step Runner
Commits
7fd7bbc2
Commit
7fd7bbc2
authored
2 weeks ago
by
Cameron Swords
Browse files
Options
Downloads
Patches
Plain Diff
Remove debugging statements
parent
fd6c23a4
No related branches found
No related tags found
1 merge request
!179
Publish artifacts as an OCI image index referencing OCI artifacts
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/cache/oci/internal/client.go
+1
-10
1 addition, 10 deletions
pkg/cache/oci/internal/client.go
with
1 addition
and
10 deletions
pkg/cache/oci/internal/client.go
+
1
−
10
View file @
7fd7bbc2
...
...
@@ -2,9 +2,7 @@ package internal
import
(
"context"
"errors"
"fmt"
"log"
"os"
"github.com/containerd/platforms"
...
...
@@ -63,13 +61,6 @@ func (c *Client) Pull(ctx context.Context, ref name.Reference, opts ...func(*Pul
func
(
c
*
Client
)
fetchImage
(
ctx
context
.
Context
,
ref
name
.
Reference
,
findForPlatform
[]
platforms
.
Platform
)
(
v1
.
Image
,
error
)
{
idx
,
err
:=
remote
.
Index
(
ref
,
remote
.
WithContext
(
ctx
))
if
err
!=
nil
{
e
:=
err
for
e
!=
nil
{
fmt
.
Printf
(
"error is: %v
\n
"
,
e
)
e
=
errors
.
Unwrap
(
e
)
}
return
nil
,
fmt
.
Errorf
(
"fetching index: %w"
,
err
)
}
...
...
@@ -86,7 +77,7 @@ func (c *Client) fetchImage(ctx context.Context, ref name.Reference, findForPlat
image
,
err
:=
idx
.
Image
(
manifest
.
Digest
)
if
err
!=
nil
{
log
.
Fatal
f
(
"fetching image for manifest %v: %v"
,
manifest
.
Digest
,
err
)
return
nil
,
fmt
.
Error
f
(
"fetching image for manifest %v: %v"
,
manifest
.
Digest
,
err
)
}
return
image
,
nil
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment