-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3009 from infosiftr/architectures
Add initial Architectures support (and the beginnings of a "put-shared" subcommand for bringing all the SharedTags and arch-specific images together with manifest lists/indexes)
- Loading branch information
Showing
21 changed files
with
954 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"path" | ||
"strings" | ||
|
||
"github.com/codegangsta/cli" | ||
) | ||
|
||
func cmdPutShared(c *cli.Context) error { | ||
repos, err := repos(c.Bool("all"), c.Args()...) | ||
if err != nil { | ||
return cli.NewMultiError(fmt.Errorf(`failed gathering repo list`), err) | ||
} | ||
|
||
namespace := c.String("namespace") | ||
|
||
if namespace == "" { | ||
return fmt.Errorf(`"--namespace" is a required flag for "put-shared"`) | ||
} | ||
|
||
fmt.Fprintf(os.Stderr, "warning: this subcommand is still a big WIP -- it doesn't do anything yet!\n") | ||
|
||
for _, repo := range repos { | ||
r, err := fetch(repo) | ||
if err != nil { | ||
return cli.NewMultiError(fmt.Errorf(`failed fetching repo %q`, repo), err) | ||
} | ||
|
||
// TODO handle all multi-architecture tags first (regardless of whether they have SharedTags) | ||
|
||
targetRepo := path.Join(namespace, r.RepoName) | ||
for _, group := range r.Manifest.GetSharedTagGroups() { | ||
// TODO build up a YAML file | ||
entryTags := []string{} | ||
for _, entry := range group.Entries { | ||
entryTags = append(entryTags, entry.Tags[0]) | ||
} | ||
fmt.Printf("Putting %s (tags %s) <= %s\n", targetRepo, strings.Join(group.SharedTags, ", "), strings.Join(entryTags, ", ")) | ||
} | ||
} | ||
|
||
return nil | ||
} |
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
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
5 changes: 5 additions & 0 deletions
5
bashbrew/go/vendor/src/github.com/docker-library/go-dockerlibrary/README.md
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,5 @@ | ||
# `import "github.com/docker-library/go-dockerlibrary/manifest"` | ||
|
||
[![Travis Build Status](https://travis-ci.org/docker-library/go-dockerlibrary.svg?branch=master)](https://travis-ci.org/docker-library/go-dockerlibrary) [![GoDoc](https://godoc.org/github.com/docker-library/go-dockerlibrary?status.svg)](https://godoc.org/github.com/docker-library/go-dockerlibrary) [![codecov](https://codecov.io/gh/docker-library/go-dockerlibrary/branch/master/graph/badge.svg)](https://codecov.io/gh/docker-library/go-dockerlibrary) | ||
|
||
This package contains the core parsing elements of [the `bashbrew` tool used by the Docker Official Images](https://github.com/docker-library/official-images/tree/master/bashbrew). |
67 changes: 0 additions & 67 deletions
67
bashbrew/go/vendor/src/github.com/docker-library/go-dockerlibrary/manifest/example.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.