Commit graph

27 commits

Author SHA1 Message Date
David Kovari ef56bac838 Improve support for cache_to and cache_from & add cache_images (#129)
### 📖 Summary

Originally, the cache_to and cache_from were being converted into string arrays. Then their contents were looped over to add to the build command. This has the side affect of stopping the user from setting additional options for the cache-to and cache-from args since their command input format uses commas. i.e. `type=registry,ref=imagepath,mode=max` would result in `--cache-to type=registry --cache-to ref=imagepath --cache-to mode=max`. The command was not designed to be used that way.

The one reason I can think of for cache_to and cache_from to be arrays is so you could have multiple cache registries. But I can't confirm that the build command even works like this.

### 📑 Build PR Images?

PR images are not needed

### 💬 Details

_No response_

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/129
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: David Kovari <dakovari@gmail.com>
Co-committed-by: David Kovari <dakovari@gmail.com>
2024-02-02 20:25:30 +00:00
6543 5d98a5da22 Add option to set individual mirrors for all logins (#122)
- also address last nits of #119

Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/122
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
2024-01-18 18:28:42 +00:00
David Kovari 55cc3b1d21 Add option to enable buildkit debug output (#119)
### 📖 Summary

- Add option to enable buildkit debug output
- Formats buildkit.toml using `github.com/pelletier/go-toml/v2`
- Sets docker.io registry mirror based on daemon.mirror setting

Co-authored-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/119
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: David Kovari <dakovari@gmail.com>
Co-committed-by: David Kovari <dakovari@gmail.com>
2024-01-14 23:35:00 +00:00
qwerty287 452d5e2277 Fix author key (#121)
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2024-01-14 22:40:27 +00:00
qwerty287 f5ac6ccb8e Add logo (#120)
### 📖 Summary

add docker logo

### 📑 Build PR Images?

PR images are not needed

### 💬 Details

_No response_

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/120
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2024-01-13 10:23:26 +00:00
bretello fd51808d6e docs: fx dry-run usage (#117)
### 📖 Summary

fix usage of `dry-run` option in docs example. It is supposed to be `dry-run` and not `dry_run`.

See the current docs here: https://woodpecker-ci.org/plugins/Docker%20Buildx for an example

### 📑 Build PR Images?

PR images are not needed

### 💬 Details

_No response_

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/117
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-authored-by: bretello <bretello@distruzione.org>
Co-committed-by: bretello <bretello@distruzione.org>
2024-01-03 14:19:40 +00:00
pat-s 5f5b2d4161 Document ECR settings and prefix settings with ecr_ (#115)
Prefixing to make the settings easier to distinguish from non-ECR ones.

Also expanded the multi-repo push example.

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/115
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
2023-12-30 13:50:43 +00:00
Thomas Renes 4c119d46fc Fix separator for tags_file in docs (#107)
This fixes an error in the documentation. Multiple tags in tags_file are separated by a newline instead of a comma.

See: 5116f6263f/plugin/impl.go (L138)

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/107
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: Thomas Renes <thomas@renesweb.nl>
Co-committed-by: Thomas Renes <thomas@renesweb.nl>
2023-11-01 10:32:01 +00:00
OCram85 a0371f8850 adds driver-opt arg as plugin parameter (#93)
#### 📖 Summary

Adds `--driver-opt` buildx arg as plugin parameter. This should make it possible to pass through proxy settings.

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

-  [x] CI pipeline tests
- Custom test
-  No test plan

##### Details / Justification

Manually tested on own instance behind corporate proxy:

![image](/attachments/b65d981d-c9b8-4228-8e9c-61fa517d98b6)

Unfortunately  the `--build-arg` passthru seems not working

#### 📚 Additional Notes

- fixes #82
- still to do:
  - [x] update docs
  - [x] add usage example

> 💡NOTE: This is my first contribution in this codebase. Feedback and help is probably needed 😸

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/93
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Co-committed-by: OCram85 <marco.blessing@googlemail.com>
2023-10-25 09:58:02 +00:00
lonix 6e50b742e6 docs: update info for tags_file setting (#75)
- Only the `.tags` filename is allowed.
- The file can have multiple tags, as a CSV

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/75
Reviewed-by: Patrick Schratz <pat-s@noreply.codeberg.org>
Co-authored-by: lonix <lonix@noreply.codeberg.org>
Co-committed-by: lonix <lonix@noreply.codeberg.org>
2023-10-17 17:21:35 +00:00
qwerty287 0f0aba7f82 Allow to load env file (#80)
closes https://codeberg.org/woodpecker-plugins/docker-buildx/issues/34

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/80
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
Co-authored-by: qwerty287 <ndev@web.de>
Co-committed-by: qwerty287 <ndev@web.de>
2023-10-08 08:49:51 +00:00
6543 37718ded77 Add option to overwrites tags option with values specified in an file (#62)
Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/62
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2023-05-02 19:25:49 +00:00
6543 2a8de61424 Fix link to "full documentation" 2023-04-29 14:40:01 +00:00
jolheiser ee3adee4d4 Fix README wording (#57)
Removes a redundant sentence and some duplicated text.

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/57
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: jolheiser <jolheiser@noreply.codeberg.org>
Co-committed-by: jolheiser <jolheiser@noreply.codeberg.org>
2023-03-19 01:27:00 +00:00
6543 38b9f475bb codeberg plugin images dont need prefix (#54)
Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/54
Reviewed-by: jolheiser <jolheiser@noreply.codeberg.org>
2023-01-10 15:01:05 +00:00
Loïc Dachary 8a70e48182 fix typo in docs (#39)
Signed-off-by: Loïc Dachary <loic@dachary.org>
Co-authored-by: Loïc Dachary <loic@dachary.org>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/39
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Loïc Dachary <dachary@noreply.codeberg.org>
Co-committed-by: Loïc Dachary <dachary@noreply.codeberg.org>
2022-11-10 15:01:35 +01:00
6543 d17ff57fda Document auto_tag behaviour more explicite (#37)
close #31

Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/37
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
2022-11-06 14:29:57 +01:00
6543 57b0ae23c2 Remove "default_tags" as it's too similar to "default_tag" (#38)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/38
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2022-11-06 13:10:00 +01:00
gapodo fce3289743 Add configurable tag for use with auto_tag (#36)
Implements #30, allows setting a (single) tag to override the default of `latest` allows for the woodpecker-ci usecase of setting `next` as the tag for the default branch.

Co-authored-by: Gapodo <gapodo@datenclown.at>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/36
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: gapodo <gapodo@geekvoid.net>
Co-committed-by: gapodo <gapodo@geekvoid.net>
2022-11-05 03:25:44 +01:00
gapodo f10f7b4c7f Allow using auto_tag while supplying additional tags via tags (#35)
This implements #32, allowing to append tags supplied via `tags` along side auto generated tags.

Tags supplied via `tags` are *not* suffixed by the `auto_tag_suffix`

Co-authored-by: Gapodo <gapodo@datenclown.at>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/35
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: gapodo <gapodo@geekvoid.net>
Co-committed-by: gapodo <gapodo@geekvoid.net>
2022-11-04 23:47:43 +01:00
6543 25ad50a579 Add support for multible registrys (#23)
if normal settings `registry`, `username`... is set

that's used as default, else first logins entry is used.

```yml
settings:
  logins:
    - registry: https://codeberg.org
      username: "6543"
      password: geheim
    - registry: https://index.docker.io/v1/
      username: a6543
      password: anders_geheim
```

close #18

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/23
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
2022-10-08 16:02:02 +02:00
6543 10426e6a19 Allow multible Repos (#22)
close partialy #18

we still need to handle multible registry login

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/22
2022-09-28 15:17:39 +02:00
Lauris BH be7d7c0244 Implement option to add image labels and generate automatic labels (#19)
Fixes #16

Results into labels:
![attels](/attachments/3aa6641e-fe50-4e28-be97-64c0afe2c35a)

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/19
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-committed-by: Lauris BH <lafriks@noreply.codeberg.org>
2022-09-28 02:16:57 +02:00
Lauris BH 8a0424c7a5 Automatically generate buildkit config with registry CA file (#17)
Fixes #14

Buildkit config is actually TOML file not JSON - https://docs.docker.com/engine/reference/commandline/buildx_create/#config

Tested using `lafriks/plugin-docker-buildx:latest` image built with these changes

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/17
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-committed-by: Lauris BH <lafriks@noreply.codeberg.org>
2022-09-27 22:33:05 +02:00
qwerty287 64aed54d14 Update docs (#15)
According to https://github.com/woodpecker-ci/woodpecker/pull/1200/files#diff-9d12f007f8f4426a84a8561106d0818c431f8b0aee40c80c59413dbb9b9d1afa

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/15
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-09-25 19:25:16 +02:00
Lauris BH b88f39c31f Add build output option (#11)
Fixes #6

Also updates dependencies

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/11
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-committed-by: Lauris BH <lafriks@noreply.codeberg.org>
2022-09-20 18:02:35 +02:00
6543 1d08a8f99a add docs for plugin (#10)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/10
2022-08-30 22:29:48 +02:00