Commit Graph

538 Commits

Author SHA1 Message Date
8d04efc34a Push to my registry
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
2023-10-08 16:02:56 +02:00
b34ee789bc Allow using key-value data 2023-10-08 16:01:53 +02: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
c35b2e1ae9
update pipeline to meet v1.0.0 standard 2023-07-31 04:36:36 +02:00
Lauris BH
051ea11a5c bump buildx to v0.11.0 (#66)
- use buildx [v0.11.0](https://github.com/docker/buildx/releases/tag/v0.11.0)

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/66
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-committed-by: Lauris BH <lafriks@noreply.codeberg.org>
2023-06-27 13:57:45 +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
a5ea4573b0 CI: use new yaml syntax (#61)
Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/61
2023-04-30 13:21:32 +00:00
6543
2a8de61424 Fix link to "full documentation" 2023-04-29 14:40:01 +00:00
6543
33b6eb4faa bump buildx and golang (#58)
- use golang v1.20
- use buildx v0.10.4
  (to have buildkit v0.11.2)

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/58
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2023-03-22 15:26:29 +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
6543
8243640a5d
ci: pin own build version to latest majour version 2022-12-23 17:33:24 +01:00
6543
fc4f0ea0a5
ci: bump own latest version for build 2022-12-23 17:28:58 +01:00
6543
ccd5834d4c Enhance SemVersion detection (#52)
close #51

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/52
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2022-12-21 17:11:09 +00:00
Lauris BH
186b87cf88 Fix auto tag generating tags with wrong suffix (#48)
currently `auto_tag` would generate tags like: `1-latest`, `1.0-latest` etc

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/48
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
2022-12-09 10:53:49 +00:00
miniduikboot
a187589df9 add cache_to option and remove manual image pull (#46)
Port from https://github.com/thegeeklab/drone-docker-buildx/pull/124

Basically docker cache got a bit fancier and now includes a cache manifest. Manually pulling these containers isn't sufficient enough, so remove the manual pull.

cache_to allows you to push your cache including a manifest to a remote location: https://docs.docker.com/engine/reference/commandline/buildx_build/#cache-to

Unfortunately this option isn't quite that useful: to fully use this feature, you need to supply your arguments in CSV format, which woodpecker unhelpfully splits into multiple completely separate arguments, breaking it :(

With a further change to fix that issue I managed to turn a multistage rust build from ~3 minutes down to 20 seconds.

Co-authored-by: miniduikboot <mini@duikbo.at>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/46
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: miniduikboot <miniduikboot@noreply.codeberg.org>
Co-committed-by: miniduikboot <miniduikboot@noreply.codeberg.org>
2022-11-23 15:55:12 +00:00
Lauris BH
a2d26878e7 Add internal DNS server if no custom DNS is set (#45)
Fixes #44

Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/45
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-11-23 14:01:45 +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
ca6adcf472
ci: bump own latest version for build 2022-11-06 20:18:45 +01:00
6543
37b5e2ed2d
Add changelog tool config
https://gitea.com/gitea/changelog
2022-11-06 14:43:33 +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
Smoked8505
466dfce406 Update the documentation link in README (#33)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/33
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-authored-by: Smoked8505 <smoked8505@noreply.codeberg.org>
Co-committed-by: Smoked8505 <smoked8505@noreply.codeberg.org>
2022-10-27 07:55:38 +02:00
6543
2ad93d24fe Publish to Docker-Hub and Codeberg (#28)
Retry of #27

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/28
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2022-10-12 22:58:52 +02:00
6543
fca44ab7ae Fix func to determine default login (#29)
only add default login if auth profided or no login entry exist

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/29
Reviewed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-10-11 11:38:36 +02:00
6543
5868a6e6a8
Revert "Publish to Docker-Hub and Codeberg (#27)"
https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/27#issuecomment-639378

This reverts commit 97917ac4b9.
2022-10-10 18:58:36 +02:00
6543
97917ac4b9 Publish to Docker-Hub and Codeberg (#27)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/27
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
2022-10-10 18:37:40 +02:00
6543
f9c1b35f59
ci: build with stable version 2022-10-08 16:29:10 +02:00
6543
c0d9178b4b
fix tag pipeline
looks like global branches filter does filter tags :/
2022-10-08 16:18:12 +02: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
a7117600aa CI: add test (#26)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/26
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2022-10-08 15:32:14 +02:00
6543
b85ee124e2 Ensure that the plugin binary does not conflict with the utility being used (#24)
use methode described in https://docs.docker.com/build/buildx/install/ to install buildx into image.
- `/usr/lib/docker/cli-plugins/docker-buildx` -> `/usr/libexec/docker/cli-plugins/docker-buildx`
- fix linux/amd64 build on linux/arm64

rename plugin binary
- `docker-buildx` -> `plugin-docker-buildx`

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/24
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
2022-10-08 00:58:57 +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
6543
06d32b13a5
ingore empty string tags 2022-09-28 03:25:04 +02:00
6543
9a1c38c979
use auto_tag 2022-09-28 03:17:55 +02:00
6543
4add961b4c Publish arm image too (#21)
base image (https://hub.docker.com/_/docker/tags?page=1&name=20.10-dind) do support amd64 and arm64

so we can do too

Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/21
2022-09-28 03:12:21 +02:00
6543
ddf80c66d6 clean & refactor (#20)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/20
2022-09-28 02:22:04 +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
df1da38f5d Update docker buildx version to v0.9.1 (#12)
Co-authored-by: Lauris BH <lauris@nix.lv>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/12
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-20 18:47:22 +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
6543
31e9b9fe2b bump golang to v1.18 (#8)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/8
2022-08-30 20:57:03 +02:00
6543
10fba7cbfe Add "get-it-on-codeberg" badge and update docu link (#9)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/9
2022-08-29 23:29:27 +02:00
6543
c4ee5f03e7 no comment 2022-08-29 23:10:24 +02:00
6543
7ecd19d350 enable cron for publish (#7)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/7
2022-08-29 23:03:56 +02:00
6543
cd378c34b8 Add dryrun (#3)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/3
2022-02-26 00:03:49 +01:00