Compare commits
5 Commits
c0177b3f8f
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
d3fb8f08bc
|
|||
|
de7793d3d6
|
|||
|
d30c0c6e99
|
|||
|
8a6a576334
|
|||
|
796156d4ad
|
@@ -37,6 +37,7 @@ steps:
|
||||
image: *build_plugin
|
||||
settings:
|
||||
<<: *base_buildx_settings
|
||||
registry: registry.odit.services
|
||||
username:
|
||||
from_secret: odit-registry-builder-username
|
||||
password:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Security
|
||||
|
||||
If you think you have found a **security issue**, please do not mention it in this repository.
|
||||
Instead, send an email to security@spacebear.ee with as many details as possible so it can be handled confidential.
|
||||
Instead, send an email to security@odit.services with as many details as possible so it can be handled confidential.
|
||||
|
||||
## Bug Reports and Feature Requests
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -187,7 +187,7 @@
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2021 Robert Kaussow <mail@thegeeklab.de>
|
||||
Copyright 2023 ODIT.Services <info@odit.services>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
12
README.md
12
README.md
@@ -1,17 +1,9 @@
|
||||
# plugin-docker-buildx
|
||||
|
||||
<a href="https://codeberg.org/woodpecker-plugins/plugin-docker-buildx">
|
||||
<img alt="Get it on Codeberg" src="https://codeberg.org/Codeberg/GetItOnCodeberg/media/branch/main/get-it-on-neon-blue.png" height="60">
|
||||
</a>
|
||||
|
||||
Woodpecker CI plugin to build multiarch Docker images with [buildx](https://duckduckgo.com/?q=docker+buildx&ia=web).
|
||||
This plugin was initially a fork of [thegeeklab/drone-docker-buildx](https://github.com/thegeeklab/drone-docker-buildx/) (now archived in favor of this plugin) which itself was a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker).
|
||||
This plugin is a fork of [woodpecker-plugins/plugin-docker-buildx](https://codeberg.org/woodpecker-plugins/plugin-docker-buildx) which was initially a fork of [thegeeklab/drone-docker-buildx](https://github.com/thegeeklab/drone-docker-buildx/) (now archived in favor of this plugin) which itself was a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker).
|
||||
You can find the full documentation at [woodpecker-ci.org](https://woodpecker-ci.org/plugins/Docker%20Buildx) ([docs.md](./docs.md)).
|
||||
|
||||
## Images
|
||||
|
||||
Images are available on [Dockerhub](https://hub.docker.com/r/woodpeckerci/plugin-docker-buildx) and in the [Codeberg registry](https://codeberg.org/woodpecker-plugins/-/packages/container/docker-buildx/latest).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the Apache-2.0 License - see the [LICENSE](https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/src/branch/main/LICENSE) file for details.
|
||||
This project is licensed under the Apache-2.0 License - see the [LICENSE](https://git.odit.services/odit/docker-buildx/src/branch/main/LICENSE) file for details.
|
||||
|
||||
@@ -196,11 +196,11 @@ func settingsFlags(settings *plugin.Settings) []cli.Flag {
|
||||
Usage: "images to consider as cache sources",
|
||||
Value: &drone.StringSliceFlag{},
|
||||
},
|
||||
&cli.StringSliceFlag{
|
||||
Name: "cache-to",
|
||||
EnvVars: []string{"PLUGIN_CACHE_TO"},
|
||||
Usage: "cache destination for the build cache",
|
||||
Destination: &settings.Build.CacheTo,
|
||||
&cli.GenericFlag{
|
||||
Name: "cache-to",
|
||||
EnvVars: []string{"PLUGIN_CACHE_TO"},
|
||||
Usage: "cache destination for the build cache",
|
||||
Value: &drone.StringSliceFlag{},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "pull-image",
|
||||
|
||||
@@ -47,9 +47,14 @@ func run(settings *plugin.Settings) cli.ActionFunc {
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to read cache-from input")
|
||||
}
|
||||
|
||||
settings.Build.CacheFrom = cacheFrom.Get()
|
||||
|
||||
cacheTo, ok := ctx.Generic("cache-to").(*drone.StringSliceFlag)
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to read cache-to input")
|
||||
}
|
||||
settings.Build.CacheTo = cacheTo.Get()
|
||||
|
||||
plugin := plugin.New(
|
||||
*settings,
|
||||
urfave.PipelineFromContext(ctx),
|
||||
|
||||
@@ -81,7 +81,7 @@ func commandBuild(build Build, dryrun bool) *exec.Cmd {
|
||||
for _, arg := range build.CacheFrom {
|
||||
args = append(args, "--cache-from", arg)
|
||||
}
|
||||
for _, arg := range build.CacheTo.Value() {
|
||||
for _, arg := range build.CacheTo {
|
||||
args = append(args, "--cache-to", arg)
|
||||
}
|
||||
for _, arg := range build.ArgsEnv.Value() {
|
||||
|
||||
@@ -65,7 +65,7 @@ type Build struct {
|
||||
Output string // Docker build output
|
||||
Pull bool // Docker build pull
|
||||
CacheFrom []string // Docker build cache-from
|
||||
CacheTo cli.StringSlice // Docker build cache-to
|
||||
CacheTo []string // Docker build cache-to
|
||||
Compress bool // Docker build compress
|
||||
Repo cli.StringSlice // Docker build repository
|
||||
NoCache bool // Docker build no-cache
|
||||
|
||||
Reference in New Issue
Block a user