-
Notifications
You must be signed in to change notification settings - Fork 113
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 #1046 from SaschaSchwarze0/sascha-shipwright-manag…
…ed-push SHIP-0026 Shipwright-managed push
- Loading branch information
Showing
114 changed files
with
3,935 additions
and
2,713 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
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 |
---|---|---|
|
@@ -3,14 +3,15 @@ Copyright The Shipwright Contributors | |
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
# Mutate Image Wrapper | ||
# Image processing | ||
|
||
As part of the build, the output image needs to be mutated (annotated and labeled). This package contains Shipwright Build owned image mutate code, which is using the [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) in the background. | ||
As part of the build, the output image needs to be mutated (annotated and labeled), and pushed. This package contains Shipwright Build owned image processing code. | ||
|
||
## Features | ||
|
||
- Mutate the image with [annotations](https://github.com/opencontainers/image-spec/blob/main/annotations.md) | ||
- Mutate the image with labels | ||
- Push the image | ||
|
||
## Development | ||
|
||
|
@@ -19,10 +20,12 @@ As part of the build, the output image needs to be mutated (annotated and labele | |
- Run it locally: | ||
|
||
```sh | ||
go run cmd/mutate-image/main.go \ | ||
go run cmd/image-processing/main.go \ | ||
--image $IMAGE \ | ||
--annotation "org.opencontainers.image.url=https://my-company.com/images" \ | ||
--label "[email protected]" | ||
--label "[email protected]" \ | ||
[--insecure] \ | ||
[--push some-local-dir-or-tarball] | ||
``` | ||
|
||
If we are trying to mutate the image in a private registry, authentication to the registry should be done before running the command. | ||
|
@@ -34,7 +37,7 @@ As part of the build, the output image needs to be mutated (annotated and labele | |
--rm \ | ||
--volume $HOME/.docker/config.json:/.docker/config.json \ | ||
-e DOCKER_CONFIG=.docker \ | ||
$(KO_DOCKER_REPO=ko.local ko publish --bare ./cmd/mutate-image) \ | ||
$(KO_DOCKER_REPO=ko.local ko publish --bare ./cmd/image-processing) \ | ||
--image $IMAGE \ | ||
--annotation "org.opencontainers.image.url=https://my-company.com/images" \ | ||
--label "[email protected]" | ||
|
Oops, something went wrong.