From 1d8d11a0b69fdf573dd5990ada848a1659c00d17 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 19:22:04 +0100 Subject: [PATCH 1/8] ci: add docker-build --- .woodpecker/docker-build-cyan.yml | 35 ++++++++++++++++++++++ .woodpecker/docker-build-luacheck_just.yml | 35 ++++++++++++++++++++++ .woodpecker/docker-build_stylua_just.yml | 35 ++++++++++++++++++++++ Dockerfile.cyan | 3 ++ Dockerfile.luacheck_just | 2 ++ Dockerfile.stylua_just | 2 ++ 6 files changed, 112 insertions(+) create mode 100644 .woodpecker/docker-build-cyan.yml create mode 100644 .woodpecker/docker-build-luacheck_just.yml create mode 100644 .woodpecker/docker-build_stylua_just.yml create mode 100644 Dockerfile.cyan create mode 100644 Dockerfile.luacheck_just create mode 100644 Dockerfile.stylua_just diff --git a/.woodpecker/docker-build-cyan.yml b/.woodpecker/docker-build-cyan.yml new file mode 100644 index 0000000..f5e87be --- /dev/null +++ b/.woodpecker/docker-build-cyan.yml @@ -0,0 +1,35 @@ +variables: + - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 + - &file Dockerfile.cyan + - &repo gitea.aireone.xyz/${CI_REPO} + - &platforms linux/amd64 + +pipeline: + dryrun: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + dry_run: true + repo: *repo + when: + branch: master + event: pull_request + path: *file + + publish: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + registry: gitea.aireone.xyz + repo: *repo + auto_tag: true + username: + from_secret: publish_username + password: + from_secret: publish_token + when: + branch: master + event: push + path: *file diff --git a/.woodpecker/docker-build-luacheck_just.yml b/.woodpecker/docker-build-luacheck_just.yml new file mode 100644 index 0000000..05082b0 --- /dev/null +++ b/.woodpecker/docker-build-luacheck_just.yml @@ -0,0 +1,35 @@ +variables: + - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 + - &file Dockerfile.luacheck_just + - &repo gitea.aireone.xyz/${CI_REPO} + - &platforms linux/amd64 + +pipeline: + dryrun: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + dry_run: true + repo: *repo + when: + branch: master + event: pull_request + path: *file + + publish: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + registry: gitea.aireone.xyz + repo: *repo + auto_tag: true + username: + from_secret: publish_username + password: + from_secret: publish_token + when: + branch: master + event: push + path: *file diff --git a/.woodpecker/docker-build_stylua_just.yml b/.woodpecker/docker-build_stylua_just.yml new file mode 100644 index 0000000..0cfb6dd --- /dev/null +++ b/.woodpecker/docker-build_stylua_just.yml @@ -0,0 +1,35 @@ +variables: + - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 + - &file Dockerfile.stylua_just + - &repo gitea.aireone.xyz/${CI_REPO} + - &platforms linux/amd64 + +pipeline: + dryrun: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + dry_run: true + repo: *repo + when: + branch: master + event: pull_request + path: *file + + publish: + image: *buildx + settings: + dockerfile: *file + platforms: *platforms + registry: gitea.aireone.xyz + repo: *repo + auto_tag: true + username: + from_secret: publish_username + password: + from_secret: publish_token + when: + branch: master + event: push + path: *file diff --git a/Dockerfile.cyan b/Dockerfile.cyan new file mode 100644 index 0000000..03eccbb --- /dev/null +++ b/Dockerfile.cyan @@ -0,0 +1,3 @@ +FROM akorn/luarocks:lua5.4-alpine +RUN apk add just gcc libc-dev musl-dev curl-dev +RUN luarocks install cyan diff --git a/Dockerfile.luacheck_just b/Dockerfile.luacheck_just new file mode 100644 index 0000000..1a48c1f --- /dev/null +++ b/Dockerfile.luacheck_just @@ -0,0 +1,2 @@ +FROM ghcr.io/lunarmodules/luacheck:v0.26.1 +RUN apk add just diff --git a/Dockerfile.stylua_just b/Dockerfile.stylua_just new file mode 100644 index 0000000..5a49718 --- /dev/null +++ b/Dockerfile.stylua_just @@ -0,0 +1,2 @@ +FROM alpine:edge +RUN apk add just stylua From 8463cbe423745921c75b01963fd91955fca15c57 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 19:33:20 +0100 Subject: [PATCH 2/8] ci(docker-build): fix lowercase repo --- .woodpecker/docker-build-cyan.yml | 2 +- .woodpecker/docker-build-luacheck_just.yml | 2 +- .woodpecker/docker-build_stylua_just.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/docker-build-cyan.yml b/.woodpecker/docker-build-cyan.yml index f5e87be..d3af1d6 100644 --- a/.woodpecker/docker-build-cyan.yml +++ b/.woodpecker/docker-build-cyan.yml @@ -1,7 +1,7 @@ variables: - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - &file Dockerfile.cyan - - &repo gitea.aireone.xyz/${CI_REPO} + - &repo gitea.aireone.xyz/${CI_REPO,,} - &platforms linux/amd64 pipeline: diff --git a/.woodpecker/docker-build-luacheck_just.yml b/.woodpecker/docker-build-luacheck_just.yml index 05082b0..cdbd7f7 100644 --- a/.woodpecker/docker-build-luacheck_just.yml +++ b/.woodpecker/docker-build-luacheck_just.yml @@ -1,7 +1,7 @@ variables: - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - &file Dockerfile.luacheck_just - - &repo gitea.aireone.xyz/${CI_REPO} + - &repo gitea.aireone.xyz/${CI_REPO,,} - &platforms linux/amd64 pipeline: diff --git a/.woodpecker/docker-build_stylua_just.yml b/.woodpecker/docker-build_stylua_just.yml index 0cfb6dd..192b17a 100644 --- a/.woodpecker/docker-build_stylua_just.yml +++ b/.woodpecker/docker-build_stylua_just.yml @@ -1,7 +1,7 @@ variables: - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - &file Dockerfile.stylua_just - - &repo gitea.aireone.xyz/${CI_REPO} + - &repo gitea.aireone.xyz/${CI_REPO,,} - &platforms linux/amd64 pipeline: From 1577c9db94579a478c30eb7de8018ba5f6e242d1 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 19:40:00 +0100 Subject: [PATCH 3/8] ci(docker-build): all in one with matrix --- .woodpecker/docker-build.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .woodpecker/docker-build.yml diff --git a/.woodpecker/docker-build.yml b/.woodpecker/docker-build.yml new file mode 100644 index 0000000..96ba18a --- /dev/null +++ b/.woodpecker/docker-build.yml @@ -0,0 +1,40 @@ +variables: + - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 + - &repo gitea.aireone.xyz/${CI_REPO,,} + - &platforms linux/amd64 + +matrix: + DOCKERFILE: + - Dockerfile.cyan + - Dockerfile.luacheck_just + - Dockerfile.stylua_just + +pipeline: + dryrun: + image: *buildx + settings: + dockerfile: ${DOCKERFILE} + platforms: *platforms + dry_run: true + repo: *repo + when: + branch: master + event: pull_request + path: ${DOCKERFILE} + + publish: + image: *buildx + settings: + dockerfile: ${DOCKERFILE} + platforms: *platforms + registry: gitea.aireone.xyz + repo: *repo + auto_tag: true + username: + from_secret: publish_username + password: + from_secret: publish_token + when: + branch: master + event: push + path: ${DOCKERFILE} From 6dc13b13869a920ec95ebf7ee2bb50f465c8f29a Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 19:48:21 +0100 Subject: [PATCH 4/8] ci(docker-build): remove old pipelines --- .woodpecker/docker-build-cyan.yml | 35 ---------------------- .woodpecker/docker-build-luacheck_just.yml | 35 ---------------------- .woodpecker/docker-build_stylua_just.yml | 35 ---------------------- 3 files changed, 105 deletions(-) delete mode 100644 .woodpecker/docker-build-cyan.yml delete mode 100644 .woodpecker/docker-build-luacheck_just.yml delete mode 100644 .woodpecker/docker-build_stylua_just.yml diff --git a/.woodpecker/docker-build-cyan.yml b/.woodpecker/docker-build-cyan.yml deleted file mode 100644 index d3af1d6..0000000 --- a/.woodpecker/docker-build-cyan.yml +++ /dev/null @@ -1,35 +0,0 @@ -variables: - - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - - &file Dockerfile.cyan - - &repo gitea.aireone.xyz/${CI_REPO,,} - - &platforms linux/amd64 - -pipeline: - dryrun: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - dry_run: true - repo: *repo - when: - branch: master - event: pull_request - path: *file - - publish: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - registry: gitea.aireone.xyz - repo: *repo - auto_tag: true - username: - from_secret: publish_username - password: - from_secret: publish_token - when: - branch: master - event: push - path: *file diff --git a/.woodpecker/docker-build-luacheck_just.yml b/.woodpecker/docker-build-luacheck_just.yml deleted file mode 100644 index cdbd7f7..0000000 --- a/.woodpecker/docker-build-luacheck_just.yml +++ /dev/null @@ -1,35 +0,0 @@ -variables: - - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - - &file Dockerfile.luacheck_just - - &repo gitea.aireone.xyz/${CI_REPO,,} - - &platforms linux/amd64 - -pipeline: - dryrun: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - dry_run: true - repo: *repo - when: - branch: master - event: pull_request - path: *file - - publish: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - registry: gitea.aireone.xyz - repo: *repo - auto_tag: true - username: - from_secret: publish_username - password: - from_secret: publish_token - when: - branch: master - event: push - path: *file diff --git a/.woodpecker/docker-build_stylua_just.yml b/.woodpecker/docker-build_stylua_just.yml deleted file mode 100644 index 192b17a..0000000 --- a/.woodpecker/docker-build_stylua_just.yml +++ /dev/null @@ -1,35 +0,0 @@ -variables: - - &buildx woodpeckerci/plugin-docker-buildx:2.0.0 - - &file Dockerfile.stylua_just - - &repo gitea.aireone.xyz/${CI_REPO,,} - - &platforms linux/amd64 - -pipeline: - dryrun: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - dry_run: true - repo: *repo - when: - branch: master - event: pull_request - path: *file - - publish: - image: *buildx - settings: - dockerfile: *file - platforms: *platforms - registry: gitea.aireone.xyz - repo: *repo - auto_tag: true - username: - from_secret: publish_username - password: - from_secret: publish_token - when: - branch: master - event: push - path: *file From fdadf81b02ef4ffb8c69752d2868021103dbbf42 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 19:48:54 +0100 Subject: [PATCH 5/8] conf(vscode): add cSpell words --- .vscode/settings.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 18f3e6c..8ca34bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,13 @@ "editor.acceptSuggestionOnEnter": "off" }, "cSpell.words": [ + "aireone", "ansicolors", "awesomewm", + "buildx", + "dryrun", "getcontent", + "gitea", "htmlparser", "isdir", "justfile", @@ -26,6 +30,7 @@ "tablex", "tmpl", "wibox", + "woodpeckerci", "writefunction" ], "files.associations": { From 0b5049fccfbd57f9707a1b6517b5db308af20420 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 20:01:55 +0100 Subject: [PATCH 6/8] ci(build): remove depends_on lint constraint --- .woodpecker/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 0383ef3..d63e21e 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -1,6 +1,3 @@ -depends_on: - - lint - pipeline: prepare: image: akorn/luarocks:lua5.4-alpine From 481e91544b9c9ee368b8093acdc1af28b939f42c Mon Sep 17 00:00:00 2001 From: Aire-One Date: Mon, 28 Nov 2022 20:33:35 +0100 Subject: [PATCH 7/8] ci(docker-build): run only on master --- .woodpecker/docker-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/docker-build.yml b/.woodpecker/docker-build.yml index 96ba18a..693a53e 100644 --- a/.woodpecker/docker-build.yml +++ b/.woodpecker/docker-build.yml @@ -18,7 +18,6 @@ pipeline: dry_run: true repo: *repo when: - branch: master event: pull_request path: ${DOCKERFILE} @@ -35,6 +34,7 @@ pipeline: password: from_secret: publish_token when: - branch: master event: push path: ${DOCKERFILE} + +branches: master From 73634889deda476f61243d2f0b65b32535ea4bf7 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Fri, 9 Dec 2022 17:52:52 +0100 Subject: [PATCH 8/8] ci: move Dockerfile to `.woodpecker/docker` --- .woodpecker/docker-build.yml | 6 +++--- Dockerfile.cyan => .woodpecker/docker/Dockerfile.cyan | 0 .../docker/Dockerfile.luacheck_just | 0 .../docker/Dockerfile.stylua_just | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename Dockerfile.cyan => .woodpecker/docker/Dockerfile.cyan (100%) rename Dockerfile.luacheck_just => .woodpecker/docker/Dockerfile.luacheck_just (100%) rename Dockerfile.stylua_just => .woodpecker/docker/Dockerfile.stylua_just (100%) diff --git a/.woodpecker/docker-build.yml b/.woodpecker/docker-build.yml index 693a53e..6ba304e 100644 --- a/.woodpecker/docker-build.yml +++ b/.woodpecker/docker-build.yml @@ -5,9 +5,9 @@ variables: matrix: DOCKERFILE: - - Dockerfile.cyan - - Dockerfile.luacheck_just - - Dockerfile.stylua_just + - .woodpecker/docker/Dockerfile.cyan + - .woodpecker/docker/Dockerfile.luacheck_just + - .woodpecker/docker/Dockerfile.stylua_just pipeline: dryrun: diff --git a/Dockerfile.cyan b/.woodpecker/docker/Dockerfile.cyan similarity index 100% rename from Dockerfile.cyan rename to .woodpecker/docker/Dockerfile.cyan diff --git a/Dockerfile.luacheck_just b/.woodpecker/docker/Dockerfile.luacheck_just similarity index 100% rename from Dockerfile.luacheck_just rename to .woodpecker/docker/Dockerfile.luacheck_just diff --git a/Dockerfile.stylua_just b/.woodpecker/docker/Dockerfile.stylua_just similarity index 100% rename from Dockerfile.stylua_just rename to .woodpecker/docker/Dockerfile.stylua_just