From cc3caa58b6d5c43602a5d927d4b940bf72be34a0 Mon Sep 17 00:00:00 2001 From: vrifox Date: Tue, 16 May 2023 20:23:43 +0200 Subject: [PATCH 01/14] use settings block --- .woodpecker.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 86a1e13..7dbaed8 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,13 +1,13 @@ pipeline: build-and-push: image: plugins/docker - registry: code.cozy.town - username: ${REGISTRY_USERNAME} - password: ${REGISTRY_TOKEN} - repo: code.cozy.town/vrifox/hugoci - tags: - - latest - cache_from: code.cozy.town/vrifox/hugoci:latest - secrets: - - registry_username - - registry_token \ No newline at end of file + settings: + registry: code.cozy.town + username: + from_secret: registry_username + password: + from_secret: registry_token + repo: code.cozy.town/vrifox/hugoci + tags: + - latest + cache_from: code.cozy.town/vrifox/hugoci:latest \ No newline at end of file From 8d8307d768fa7c68a4c444f1baa305088b355b06 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 15:35:54 +0200 Subject: [PATCH 02/14] use latest binaries --- .woodpecker.yml | 13 ------------- .woodpecker/.build-image.yaml | 31 +++++++++++++++++++++++++++++++ Dockerfile | 9 ++++++++- 3 files changed, 39 insertions(+), 14 deletions(-) delete mode 100644 .woodpecker.yml create mode 100644 .woodpecker/.build-image.yaml diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 7dbaed8..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,13 +0,0 @@ -pipeline: - build-and-push: - image: plugins/docker - settings: - registry: code.cozy.town - username: - from_secret: registry_username - password: - from_secret: registry_token - repo: code.cozy.town/vrifox/hugoci - tags: - - latest - cache_from: code.cozy.town/vrifox/hugoci:latest \ No newline at end of file diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml new file mode 100644 index 0000000..0820cab --- /dev/null +++ b/.woodpecker/.build-image.yaml @@ -0,0 +1,31 @@ +variables: + - &HUGO_VERSION=0.115.3 + +steps: + build-and-push: + image: woodpeckerci/plugin-docker-buildx + settings: + registry: code.cozy.town + username: + from_secret: registry_username + password: + from_secret: registry_token + repo: code.cozy.town/vrifox/hugoci + tags: + - latest + - ${HUGO_VERSION} + cache_from: code.cozy.town/vrifox/hugoci:latest + build_args: + - HUGO_VERSION: ${HUGO_VERSION} + when: + branch: [ main ] + + build-and-push-test: + image: woodpeckerci/plugin-docker-buildx + settings: + dry-run: true + build_args: + - HUGO_VERSION: ${HUGO_VERSION} + when: + branch: + exclude: [ main ] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5c82374..91f2f53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,9 @@ FROM docker.io/alpine:latest -RUN apk add --no-cache hugo git openssh rsync \ No newline at end of file +ARG HUGO_VERSION +RUN apk add --no-cache wget tar git openssh rsync + +RUN wget https://github.com/gohugoio/hugo/releases/latest/download/hugo_extended_${HUGO_VERSION}_linux_amd64.tar.gz +RUN tar -xf hugo_extended_${HUGO_VERSION}_linux_amd64.tar.gz +RUN ls -lah +RUN chmod +x hugo_extended_${HUGO_VERSION}_linux_amd64 +RUN mv hugo_extended_${HUGO_VERSION}_linux_amd64 /usr/local/bin/hugo \ No newline at end of file From ea3eb64329c54cb1fe005ff331b82dd343621d9f Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 15:37:11 +0200 Subject: [PATCH 03/14] fix variable --- .woodpecker/.build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index 0820cab..a5f39f7 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -1,5 +1,5 @@ variables: - - &HUGO_VERSION=0.115.3 + - &HUGO_VERSION '0.115.3' steps: build-and-push: From d583bc1595ae9d1996ce36540d19e241142c1992 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 15:42:26 +0200 Subject: [PATCH 04/14] fix variable 2nd try --- .woodpecker/.build-image.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index a5f39f7..c2fcf56 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -1,5 +1,6 @@ variables: - - &HUGO_VERSION '0.115.3' + - global_env: &global_env + - HUGO_VERSION=0.115.3' steps: build-and-push: From 00993aa8fc0e0bf29d9ef3cd6bd29ee1e40b8911 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 15:57:51 +0200 Subject: [PATCH 05/14] fix pipeline --- .woodpecker/.build-image.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index c2fcf56..521d549 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -1,6 +1,6 @@ variables: - global_env: &global_env - - HUGO_VERSION=0.115.3' + - HUGO_VERSION=0.115.3 steps: build-and-push: @@ -21,7 +21,7 @@ steps: when: branch: [ main ] - build-and-push-test: + test: image: woodpeckerci/plugin-docker-buildx settings: dry-run: true @@ -29,4 +29,5 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} when: branch: + include: [ ** ] exclude: [ main ] \ No newline at end of file From c8d0437880b3f333d5c0794363edbef98c78a57c Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 15:58:48 +0200 Subject: [PATCH 06/14] fix pipeline 2nd try --- .woodpecker/.build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index 521d549..baf9b0a 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -29,5 +29,5 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} when: branch: - include: [ ** ] + include: [ * ] exclude: [ main ] \ No newline at end of file From 4929e6eb61d330fd5b539dadd097d710ecd3719c Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:00:20 +0200 Subject: [PATCH 07/14] fix pipeline 3rd try --- .woodpecker/.build-image.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index baf9b0a..bc227a9 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -29,5 +29,4 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} when: branch: - include: [ * ] exclude: [ main ] \ No newline at end of file From b932e20ed113117cb83120571177c438aecd2bb4 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:02:16 +0200 Subject: [PATCH 08/14] fix pipeline 4th try --- .woodpecker/.build-image.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index bc227a9..7f096ad 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -19,7 +19,7 @@ steps: build_args: - HUGO_VERSION: ${HUGO_VERSION} when: - branch: [ main ] + branch: main test: image: woodpeckerci/plugin-docker-buildx @@ -29,4 +29,5 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} when: branch: - exclude: [ main ] \ No newline at end of file + include: ** + exclude: main \ No newline at end of file From d1bb17142af67d822058100a8e431be0014152ea Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:02:48 +0200 Subject: [PATCH 09/14] fix pipeline 5th try --- .woodpecker/.build-image.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index 7f096ad..bc0f8d7 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -29,5 +29,4 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} when: branch: - include: ** exclude: main \ No newline at end of file From 74bbcd3580794416c2410bfde08dd670c4210cbe Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:09:11 +0200 Subject: [PATCH 10/14] try without when block --- .woodpecker/.build-image.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index bc0f8d7..0cf7ddf 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -27,6 +27,3 @@ steps: dry-run: true build_args: - HUGO_VERSION: ${HUGO_VERSION} - when: - branch: - exclude: main \ No newline at end of file From 895a402da55bebe1f76cf7aa0dc6797e3a3d08a7 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:12:37 +0200 Subject: [PATCH 11/14] idk --- .woodpecker/.build-image.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index 0cf7ddf..ee083e6 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -27,3 +27,7 @@ steps: dry-run: true build_args: - HUGO_VERSION: ${HUGO_VERSION} + when: + branch: + exclude: main + event: [ push, pull_request, manual ] \ No newline at end of file From c8602c46d3b137ef9b04b10a902b29b7d93b61e9 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:13:52 +0200 Subject: [PATCH 12/14] Latein => Ende --- .woodpecker/.build-image.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index ee083e6..9f01b93 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -24,9 +24,19 @@ steps: test: image: woodpeckerci/plugin-docker-buildx settings: - dry-run: true + registry: code.cozy.town + username: + from_secret: registry_username + password: + from_secret: registry_token + repo: code.cozy.town/vrifox/hugoci + tags: + - latest + - ${HUGO_VERSION} + cache_from: code.cozy.town/vrifox/hugoci:latest build_args: - HUGO_VERSION: ${HUGO_VERSION} + dry-run: true when: branch: exclude: main From cbfc1c975b7b95d8f201579c31ee0c24f86ba174 Mon Sep 17 00:00:00 2001 From: vrifox Date: Wed, 26 Jul 2023 16:15:12 +0200 Subject: [PATCH 13/14] just trying --- .woodpecker/.build-image.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.woodpecker/.build-image.yaml b/.woodpecker/.build-image.yaml index 9f01b93..b3efe38 100644 --- a/.woodpecker/.build-image.yaml +++ b/.woodpecker/.build-image.yaml @@ -38,6 +38,4 @@ steps: - HUGO_VERSION: ${HUGO_VERSION} dry-run: true when: - branch: - exclude: main event: [ push, pull_request, manual ] \ No newline at end of file From 059483944fd3526075f01158254b7023aa76bcc8 Mon Sep 17 00:00:00 2001 From: vrifox Date: Fri, 16 Feb 2024 20:39:12 +0100 Subject: [PATCH 14/14] add pnpm --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 91f2f53..14d65db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/alpine:latest ARG HUGO_VERSION -RUN apk add --no-cache wget tar git openssh rsync +RUN apk add --no-cache wget tar git openssh rsync pnpm RUN wget https://github.com/gohugoio/hugo/releases/latest/download/hugo_extended_${HUGO_VERSION}_linux_amd64.tar.gz RUN tar -xf hugo_extended_${HUGO_VERSION}_linux_amd64.tar.gz