From d78a12487ef02adcd6a3bac1dd0bb4f6d553c5e6 Mon Sep 17 00:00:00 2001 From: aeddis Date: Thu, 26 Sep 2024 13:11:02 +0000 Subject: [PATCH 01/12] Add event trigger --- .woodpecker.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 67463b6..fa4da13 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -8,6 +8,7 @@ steps: - name: upload when: + event: [push, pull_request] branch: - main image: plugins/s3 @@ -25,6 +26,7 @@ steps: - name: upload when: + event: [push, pull_request] branch: - preprod image: plugins/s3 -- 2.45.2 From 9441229bdebac65a42e01e7450c527a1b13224f1 Mon Sep 17 00:00:00 2001 From: aeddis Date: Thu, 26 Sep 2024 13:15:57 +0000 Subject: [PATCH 02/12] Add '---' --- .woodpecker.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index fa4da13..46bddeb 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,3 +1,4 @@ +--- steps: - name: build image: alpine:3.17.2 -- 2.45.2 From 8227ad6f8b5202793acd93fcc7a2677201c93429 Mon Sep 17 00:00:00 2001 From: aeddis Date: Thu, 26 Sep 2024 13:16:50 +0000 Subject: [PATCH 03/12] Lint woodpecker --- .woodpecker.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 46bddeb..5bb02b9 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -6,10 +6,11 @@ steps: - apk update - apk add zola - zola build - - name: upload when: - event: [push, pull_request] + event: + - push + - pull_request branch: - main image: plugins/s3 @@ -24,10 +25,11 @@ steps: source: public/**/* target: / strip_prefix: public/ - - name: upload when: - event: [push, pull_request] + event: + - push + - pull_request branch: - preprod image: plugins/s3 -- 2.45.2 From 91a0840ac4295d9641cf857af845e310c085ad1d Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:28:00 +0200 Subject: [PATCH 04/12] Use .woodpecker Folder --- .woodpecker/main.yaml | 27 +++++++++++++++++ .woodpecker.yaml => .woodpecker/preprod.yaml | 32 +++++--------------- 2 files changed, 35 insertions(+), 24 deletions(-) create mode 100644 .woodpecker/main.yaml rename .woodpecker.yaml => .woodpecker/preprod.yaml (50%) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml new file mode 100644 index 0000000..ff910e1 --- /dev/null +++ b/.woodpecker/main.yaml @@ -0,0 +1,27 @@ +when: + event: + - push + - pull_request + branch: main + +steps: + - name: build + image: alpine:3.17.2 + commands: + - apk update + - apk add zola + - zola build + + - name: upload + image: plugins/s3 + settings: + bucket: guide.deuxfleurs.fr + endpoint: https://garage.deuxfleurs.fr + region: garage + access_key: + from_secret: aws_access_key_id + secret_key: + from_secret: aws_secret_access_key + source: public/**/* + target: / + strip_prefix: public/ \ No newline at end of file diff --git a/.woodpecker.yaml b/.woodpecker/preprod.yaml similarity index 50% rename from .woodpecker.yaml rename to .woodpecker/preprod.yaml index 5bb02b9..29c03b8 100644 --- a/.woodpecker.yaml +++ b/.woodpecker/preprod.yaml @@ -1,4 +1,9 @@ ---- +when: + event: + - push + - pull_request + branch: main + steps: - name: build image: alpine:3.17.2 @@ -6,30 +11,9 @@ steps: - apk update - apk add zola - zola build - - name: upload + + - name: upload when: - event: - - push - - pull_request - branch: - - main - image: plugins/s3 - settings: - bucket: guide.deuxfleurs.fr - endpoint: https://garage.deuxfleurs.fr - region: garage - access_key: - from_secret: aws_access_key_id - secret_key: - from_secret: aws_secret_access_key - source: public/**/* - target: / - strip_prefix: public/ - - name: upload - when: - event: - - push - - pull_request branch: - preprod image: plugins/s3 -- 2.45.2 From 78fac775bc538e95f87921c6b19439255b63a092 Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:33:13 +0200 Subject: [PATCH 05/12] Fix yaml lint --- .woodpecker/main.yaml | 11 +++++------ .woodpecker/preprod.yaml | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index ff910e1..b68f993 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -1,9 +1,9 @@ +--- when: event: - - push - - pull_request - branch: main - + - push + - pull_request + branch: main steps: - name: build image: alpine:3.17.2 @@ -11,7 +11,6 @@ steps: - apk update - apk add zola - zola build - - name: upload image: plugins/s3 settings: @@ -24,4 +23,4 @@ steps: from_secret: aws_secret_access_key source: public/**/* target: / - strip_prefix: public/ \ No newline at end of file + strip_prefix: public/ diff --git a/.woodpecker/preprod.yaml b/.woodpecker/preprod.yaml index 29c03b8..f3f8e79 100644 --- a/.woodpecker/preprod.yaml +++ b/.woodpecker/preprod.yaml @@ -1,9 +1,9 @@ +--- when: event: - - push - - pull_request - branch: main - + - push + - pull_request + branch: preprod steps: - name: build image: alpine:3.17.2 @@ -11,8 +11,7 @@ steps: - apk update - apk add zola - zola build - - - name: upload + - name: upload when: branch: - preprod -- 2.45.2 From 2a21fb57d69d1cafc8f8e17044eb546fe332afa0 Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:37:07 +0200 Subject: [PATCH 06/12] erase steps --- .woodpecker/main.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index b68f993..c77d1c6 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -11,16 +11,3 @@ steps: - apk update - apk add zola - zola build - - name: upload - image: plugins/s3 - settings: - bucket: guide.deuxfleurs.fr - endpoint: https://garage.deuxfleurs.fr - region: garage - access_key: - from_secret: aws_access_key_id - secret_key: - from_secret: aws_secret_access_key - source: public/**/* - target: / - strip_prefix: public/ -- 2.45.2 From 773b544d2c4be38a5229e90ad87ce3d2db7cf1f9 Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:37:49 +0200 Subject: [PATCH 07/12] Basic step --- .woodpecker/main.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index c77d1c6..e455b91 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -5,9 +5,7 @@ when: - pull_request branch: main steps: - - name: build - image: alpine:3.17.2 + - name: build + image: debian commands: - - apk update - - apk add zola - - zola build + - echo "This is the build step" \ No newline at end of file -- 2.45.2 From 1d111d2526afea70a806902d8a093f7e72dd2fc0 Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:39:03 +0200 Subject: [PATCH 08/12] add branch ci to trigger --- .woodpecker/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index e455b91..ad9a3de 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -3,7 +3,9 @@ when: event: - push - pull_request - branch: main + branch: + - main + - ci/fix_woodpecker steps: - name: build image: debian -- 2.45.2 From d6e5a66c1ea25dcae5ecd56c600d7107189380fb Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:40:13 +0200 Subject: [PATCH 09/12] Fix lint --- .woodpecker/main.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index ad9a3de..f1a595e 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -3,11 +3,12 @@ when: event: - push - pull_request - branch: + branch: - main - ci/fix_woodpecker steps: - - name: build + - name: build image: debian commands: - - echo "This is the build step" \ No newline at end of file + - echo "This is the build step" + - echo "binary-data-123" > executable -- 2.45.2 From 6c9dc56b6891aa1e25da919ef84a45ba9fee150a Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:42:09 +0200 Subject: [PATCH 10/12] Return to base yaml --- .woodpecker/main.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index f1a595e..35a0114 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -1,14 +1,15 @@ --- when: - event: - - push - - pull_request - branch: - - main - - ci/fix_woodpecker + - event: push + branch: ci/fix_woodpecker steps: - name: build image: debian commands: - echo "This is the build step" - echo "binary-data-123" > executable + - name: a-test-step + image: golang:1.16 + commands: + - echo "Testing ..." + - ./executable -- 2.45.2 From 891d840885e27872b3560da2aee09dff5bd337c3 Mon Sep 17 00:00:00 2001 From: Aeddis Date: Thu, 26 Sep 2024 15:47:51 +0200 Subject: [PATCH 11/12] Add .woodpecker.yml --- .woodpecker/.woodpecker.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .woodpecker/.woodpecker.yml diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml new file mode 100644 index 0000000..35a0114 --- /dev/null +++ b/.woodpecker/.woodpecker.yml @@ -0,0 +1,15 @@ +--- +when: + - event: push + branch: ci/fix_woodpecker +steps: + - name: build + image: debian + commands: + - echo "This is the build step" + - echo "binary-data-123" > executable + - name: a-test-step + image: golang:1.16 + commands: + - echo "Testing ..." + - ./executable -- 2.45.2 From d36726e5562af7d423c9c254bb30c8ff78d3cdd0 Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 2 Oct 2024 18:39:24 +0000 Subject: [PATCH 12/12] Update .woodpecker/main.yaml --- .woodpecker/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/main.yaml b/.woodpecker/main.yaml index 35a0114..0aa1283 100644 --- a/.woodpecker/main.yaml +++ b/.woodpecker/main.yaml @@ -1,7 +1,7 @@ --- when: - - event: push - branch: ci/fix_woodpecker + event: [push] + branch: [ci/fix_woodpecker] steps: - name: build image: debian -- 2.45.2