Commit Graph

1744 Commits

Author SHA1 Message Date
Miloslav Trmač
d16cd39939 Use a reference.Named, not types.ImageReference, in imagesToCopyFromRepo
Right now that only complicates code by going through a
types.ImageReference->reference.Named->types.ImageReference sequence,
but that will change as we modify the callers as well.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
7439f94e22 Remove the repoReference parameter of imagesToCopyFromRepo
It is redundant, only used to form a tagged reference,
which can be done more safely using reference.WithTag.

Also move the *types.SystemContext parameter to the front,
as is usual.

Should not change behavior, apart from a few error messages.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
443380731e Don't use path.Join to form repository names
path.Join runs path.Clean, which interprets / and . and .. .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
56c6325ba0 Share the logrus.WithFields settings over the loop bodies
to avoid the maddening repetitivenes.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
0ae9db5dd6 Clarify control flow when handling the tags list
Don't run the the "tags specified" loop when
tags should be discovered.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
677c29bf24 Only create a SystemContext once per registry
... because it does not change with each repository.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
72376c4144 Fix the recently added example in the man page.
- Improve the language
- Be consistent with the previous example about a trailing slash
- Don't unnecessarily quote :, it is not a shell metacharacter.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
Miloslav Trmač
322625eeca Use a separate field for the "sync images with tag matching regex" feature
Fields that magically change their behavior depending on type of the value
are too much hassle for no benefit.

For now, this just copies&pastes the full loop in imagesToCopyFromRegistry
to create another loop handling the new ImagesByTagRegex field. Simplifications
to reduce duplication will follow.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-25 11:58:19 +02:00
TomSweeneyRedHat
9c1936fd07 Add upstream and testing container images
This PR adds the Dockerfiles necessary to create the upstream
and testing variants of the Skopeo container images that will
reside in quay.io/skopeo/upstream and quay.io/skopeo/testing
repositories.  The only difference in the Dockerfile between
the stable and testing image is the option `--enablerepo updates-testing`
was added.  The testing variant is relatively the same, but
I'd to clone and install Skopeo in the container.

I've also added a README.md which explains all of the varities
of images and includes some sample usage.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-23 18:04:49 -04:00
Daniel J Walsh
3a94432e42
Merge pull request #926 from containers/dependabot/go_modules/github.com/containers/storage-1.20.1
Bump github.com/containers/storage from 1.19.2 to 1.20.1
2020-05-23 05:53:22 -04:00
Daniel J Walsh
ce1f807aa0
Merge pull request #929 from containers/dependabot/go_modules/github.com/containers/common-0.11.4
Bump github.com/containers/common from 0.11.2 to 0.11.4
2020-05-23 05:52:59 -04:00
dependabot-preview[bot]
a51af64dd9
Bump github.com/containers/storage from 1.19.2 to 1.20.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.19.2 to 1.20.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.19.2...v1.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-22 13:36:27 -04:00
dependabot-preview[bot]
a31d6069dc
Bump github.com/containers/common from 0.11.2 to 0.11.4
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.11.2 to 0.11.4.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.11.2...v0.11.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-22 13:35:57 -04:00
Miloslav Trmač
96353f2b64
Merge pull request #925 from GETandSELECT/master
there is a brew formula for skopeo
2020-05-21 19:14:34 +02:00
Kargins
2330455c8d
there is a brew formula for skopeo 2020-05-21 07:56:35 +02:00
Daniel J Walsh
91a88de6a1
Merge pull request #919 from TomSweeneyRedHat/dev/tsweeney/quay
Add Skopeo Stable Image Dockerfile for Quay
2020-05-20 12:53:30 -04:00
Daniel J Walsh
2afe7a3e1e
Merge pull request #920 from zhangguanzhang/master
Add tags to support regular expressions without breaking the old ones in yaml conf
2020-05-20 12:52:27 -04:00
zhangguanzhang
bec7f6977e Add tags to support regular expressions in yaml conf
add relevant test cases and documentation
update the sync doc
2020-05-20 09:23:00 +08:00
TomSweeneyRedHat
60ecaffbe8 Add Skopeo Stable Image Dockerfile for Quay
Adds the Dockerfile for building the Skopeo container
image on quay.io.  Once merged, this image will be
built automatically upon any merge into the master
branch.  The images will live at:
quay.io/containers/skopeo:latest
quay.io/skopeo/stable:latest

I've built an image using this Dockerfile and have pushed
it to both repositories if you want to play with that.

Once merged, I'll create similar Dockerfiles for
quay.io/skopeo/testing and quay.io/skopeo/upstream.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-19 17:54:02 -04:00
Daniel J Walsh
dcaee948d3
Merge pull request #915 from rhatdan/VERSION
Bump to v1.0.0
2020-05-18 14:14:14 -04:00
Daniel J Walsh
2fe7087d52
Move to v1.0.1-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-18 13:23:09 -04:00
Daniel J Walsh
bd162028cd
Bump to v1.0.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-18 13:23:09 -04:00
Daniel J Walsh
a214a305fd
Merge pull request #917 from rhatdan/readme
Update skopeo readme and man page
2020-05-18 13:22:37 -04:00
Daniel J Walsh
5093d5b5f6
Update skopeo readme and man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-18 13:21:50 -04:00
Daniel J Walsh
0d9939dcd4
Merge pull request #914 from rhatdan/man
Add links to configuration man pages
2020-05-15 07:43:38 -04:00
Daniel J Walsh
1b2de8ec5d
Update docs/skopeo-sync.1.md
Co-authored-by: Miloslav Trmač <mitr@redhat.com>
2020-05-15 07:42:54 -04:00
Daniel J Walsh
ab2300500a
Add links to configuration man pages
Help users discover additonal man pages by completing
SEE ALSO section.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-14 15:38:34 -04:00
Daniel J Walsh
fbf061260c
Merge pull request #913 from containers/dependabot/go_modules/github.com/opencontainers/go-digest-1.0.0
Bump github.com/opencontainers/go-digest from 1.0.0-rc1 to 1.0.0
2020-05-14 07:17:53 -04:00
dependabot-preview[bot]
4244d68240
Bump github.com/opencontainers/go-digest from 1.0.0-rc1 to 1.0.0
Bumps [github.com/opencontainers/go-digest](https://github.com/opencontainers/go-digest) from 1.0.0-rc1 to 1.0.0.
- [Release notes](https://github.com/opencontainers/go-digest/releases)
- [Commits](https://github.com/opencontainers/go-digest/compare/v1.0.0-rc1...v1.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-14 06:42:55 -04:00
Daniel J Walsh
dda31b3d4b
Merge pull request #911 from containers/dependabot/go_modules/github.com/containers/storage-1.19.2
Bump github.com/containers/storage from 1.19.1 to 1.19.2
2020-05-14 06:42:02 -04:00
Miloslav Trmač
2af172653c
Merge pull request #912 from containers/dependabot/go_modules/gopkg.in/yaml.v2-2.3.0
Bump gopkg.in/yaml.v2 from 2.2.8 to 2.3.0
2020-05-14 01:07:01 +02:00
dependabot-preview[bot]
3247c0d229
Bump gopkg.in/yaml.v2 from 2.2.8 to 2.3.0
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.8 to 2.3.0.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.8...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-13 15:57:23 -04:00
dependabot-preview[bot]
eb024319de
Bump github.com/containers/storage from 1.19.1 to 1.19.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.19.1...v1.19.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-13 15:51:11 -04:00
Miloslav Trmač
4ca9b139bb
Merge pull request #865 from QiWang19/login
Add skopeo Login from c/common
2020-05-12 01:54:12 +02:00
Qi Wang
b79a37ead9 v0.11.2 containers/common
Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-11 17:07:26 -04:00
Qi Wang
0ec2610f04 Add skopeo login&logout
Implements skopeo login&logout commands.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-11 16:35:46 -04:00
Daniel J Walsh
71a14d7df6
Merge pull request #910 from mtrmac/update-c-image
Update containers/image to v5.4.4
2020-05-11 14:26:43 -04:00
Daniel J Walsh
8936e76316
Merge pull request #909 from TomSweeneyRedHat/sec1
Add Security Policy
2020-05-11 11:03:43 -04:00
Miloslav Trmač
e21d6b3687 Update containers/image to v5.4.4
Only bumps the version number after the recent vendoring
from master, but Dependabot seems to be confused by that;
so, update to the final release to hopefully un-confuse it.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-11 15:54:04 +02:00
Miloslav Trmač
a6ab2291ba Add tests for using signatures with mirrors
... to test the fix for https://github.com/containers/image/pull/912 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-11 14:37:43 +02:00
Miloslav Trmač
8f845aac23 Update c/image for https://github.com/containers/image/pull/912
This is an unreleased version of c/image, but it is important to
to have the test added in in the next commit enforcing as soon as
possible.

> go get github.com/containers/image/v5@HEAD
> make vendor

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-11 14:37:43 +02:00
TomSweeneyRedHat
439ea83081 Add Security Policy
As the title says.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-05-09 18:10:29 -04:00
Daniel J Walsh
42f68c1c76
Merge pull request #908 from wushuyi/fix-doc
fix copy doc
2020-05-09 06:08:36 -04:00
wushuyi
8d252f82fd fix copy doc 2020-05-09 07:50:40 +08:00
Miloslav Trmač
1ddb736b5a
Merge pull request #857 from QiWang19/cli
Use cobra in skopeo
2020-05-06 00:21:43 +02:00
Qi Wang
46fbbbd282 Use cobra in skopeo
Use cobra in skopeo can help share code with podman/buildah(code for skopeo login/logout CLI).
(libpod issue  #839)

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-05-04 14:50:15 -04:00
Daniel J Walsh
e7a7f018bd
Merge pull request #903 from mtrmac/atomic-test-fix
Fix TestCopyAtomicExtension
2020-05-04 11:35:11 -04:00
Daniel J Walsh
311fc89548
Merge pull request #906 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.6.0
Bump github.com/sirupsen/logrus from 1.5.0 to 1.6.0
2020-05-04 11:33:30 -04:00
dependabot-preview[bot]
a6abdb8547
Bump github.com/sirupsen/logrus from 1.5.0 to 1.6.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.5.0...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-04 08:35:48 -04:00
Miloslav Trmač
02407d98a5 Fix TestCopyAtomicExtension
Actually test that X-R-S-S signatures are usable using atomic:,
as the comment says.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-05-01 01:27:03 +02:00