From ef169d682faa094716232e52f665580416eb3269 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:33:04 +0100 Subject: [PATCH 01/16] test(ci): syntax test --- .woodpecker.yml | 11 +++++++++++ nuxt.config.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 00000000..fba24e4e --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,11 @@ +steps: + - name: build docker + image: docker:25-cli + commands: + - REPO=echo "${CI_REPO}" | tr '[:upper:]' '[:lower:]' + - docker buildx build -t dev.cat-enby.club/${{REPO}}:${CI_COMMIT_TAG} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + when: + - repo: nikurasu:elk-test-ci + - event: tag diff --git a/nuxt.config.ts b/nuxt.config.ts index 754ef5f6..8b83da45 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -162,7 +162,7 @@ export default defineNuxtConfig({ // our default translation server #76 translateApi: '', // Use the instance where Elk has its Mastodon account as the default - defaultServer: 'm.webtoo.ls', + defaultServer: 'sector25.de', singleInstance: false, }, storage: { From ac01207283375353d3afb3d14670e6ad3c31ae04 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:37:04 +0100 Subject: [PATCH 02/16] test(ci): another syntax test --- .woodpecker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index fba24e4e..7f375ad6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,8 +2,8 @@ steps: - name: build docker image: docker:25-cli commands: - - REPO=echo "${CI_REPO}" | tr '[:upper:]' '[:lower:]' - - docker buildx build -t dev.cat-enby.club/${{REPO}}:${CI_COMMIT_TAG} + - REPO=echo "$CI_REPO" | tr '[:upper:]' '[:lower:]' + - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG volumes: - /var/run/docker.sock:/var/run/docker.sock when: From 7c0986a0051e6669f84c8e0640cfadc9e4779134 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:42:49 +0100 Subject: [PATCH 03/16] test(ci): another syntax test --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 7f375ad6..4f54bdeb 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,4 +1,4 @@ -steps: +pipeline: - name: build docker image: docker:25-cli commands: From 1218f9213378e5061d29a319bf7c9bc420d9869b Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:45:13 +0100 Subject: [PATCH 04/16] test(ci): another syntax test --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 4f54bdeb..2912572b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,7 @@ pipeline: image: docker:25-cli commands: - REPO=echo "$CI_REPO" | tr '[:upper:]' '[:lower:]' - - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG + - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG . volumes: - /var/run/docker.sock:/var/run/docker.sock when: From aec670a903da8f4ea831981ce0284c4c3d6f1f56 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:48:38 +0100 Subject: [PATCH 05/16] test(ci): add git to image --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2912572b..403167e6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,6 +2,7 @@ pipeline: - name: build docker image: docker:25-cli commands: + - apk add git - REPO=echo "$CI_REPO" | tr '[:upper:]' '[:lower:]' - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG . volumes: From 9b77efe1d706a6f9593fa225101e56583ca73564 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Sat, 16 Mar 2024 15:52:25 +0100 Subject: [PATCH 06/16] test(ci): --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 403167e6..1099b80b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,7 @@ pipeline: image: docker:25-cli commands: - apk add git - - REPO=echo "$CI_REPO" | tr '[:upper:]' '[:lower:]' + - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG . volumes: - /var/run/docker.sock:/var/run/docker.sock From 991cb812da343708ad247a82b3e724701486d0fb Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:26:08 +0100 Subject: [PATCH 07/16] feat(ci): Add build tags --- .woodpecker.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 1099b80b..0b8d85b1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,10 +1,13 @@ -pipeline: +steps: - name: build docker image: docker:25-cli commands: - apk add git - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - - docker buildx build -t dev.cat-enby.club/$${REPO}:$CI_COMMIT_TAG . + - VERSION=${CI_COMMIT_TAG#v} + - IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION" + - REGISTRY="dev.cat-enby.club" + - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${FIX-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock when: From 1ea43997653a0e95509841dbbd65ce063b381783 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:34:44 +0100 Subject: [PATCH 08/16] feat(ci): Made ci sh compatible (hopefully^^) --- .woodpecker.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 0b8d85b1..e6a4e8f3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,10 +4,12 @@ steps: commands: - apk add git - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - - VERSION=${CI_COMMIT_TAG#v} - IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION" + - MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v') + - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -2) + - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -3) - REGISTRY="dev.cat-enby.club" - - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${FIX-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . + - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock when: From 12e14cfc051664bdf13084e5f58197824e334de5 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:37:51 +0100 Subject: [PATCH 09/16] fix(ci): deleted sh uncompatible line --- .woodpecker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index e6a4e8f3..1c0cfb52 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,11 +4,10 @@ steps: commands: - apk add git - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - - IFS='.' read -r MAJOR MINOR FIX <<< "$VERSION" + - REGISTRY="dev.cat-enby.club" - MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v') - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -3) - - REGISTRY="dev.cat-enby.club" - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock From 5bd9dce91ee55b67c544cb9fc54422c477c5b2f7 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:39:40 +0100 Subject: [PATCH 10/16] fix(ci): added missing flag for cut --- .woodpecker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 1c0cfb52..1c91843d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -6,8 +6,8 @@ steps: - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]') - REGISTRY="dev.cat-enby.club" - MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v') - - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -2) - - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -3) + - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) + - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock From 9044b3bcadaf89653656ef1477f91387684c923a Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:41:39 +0100 Subject: [PATCH 11/16] fix(ci): add missing flags docker buildx --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 1c91843d..97877ff2 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,7 +8,7 @@ steps: - MAJOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 1 | tr -d 'v') - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} $${REGISTRY}/$$REPO:v$${MAJOR:-0} $${REGISTRY}/$$REPO:latest . + - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${REGISTRY}/$$REPO:latest . volumes: - /var/run/docker.sock:/var/run/docker.sock when: From 74704680775227c20f05e1f478ed5cdde00cf7c8 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 13:53:05 +0100 Subject: [PATCH 12/16] feat(ci): add docker push test --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 97877ff2..822e7760 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,6 +9,7 @@ steps: - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${REGISTRY}/$$REPO:latest . + - docker push $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} volumes: - /var/run/docker.sock:/var/run/docker.sock when: From 6713329a5e49ab783a48ec0212490f3b88f60039 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 14:00:02 +0100 Subject: [PATCH 13/16] fix(ci): add docker login --- .woodpecker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 822e7760..29fe45db 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,6 +9,8 @@ steps: - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${REGISTRY}/$$REPO:latest . + - docker login $${REGISTRY} + - echo $PASS | docker login --username $USER --password-stdin - docker push $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} volumes: - /var/run/docker.sock:/var/run/docker.sock From c717aace86d6b5fb667350a40508996a28981457 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 14:10:31 +0100 Subject: [PATCH 14/16] fix(ci): remove docker login --- .woodpecker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 29fe45db..db716814 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,8 +9,7 @@ steps: - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${REGISTRY}/$$REPO:latest . - - docker login $${REGISTRY} - - echo $PASS | docker login --username $USER --password-stdin + - echo $PASS | docker login --username $USER --password-stdin $${REGISTRY} - docker push $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} volumes: - /var/run/docker.sock:/var/run/docker.sock From cfdbb66b96e74ee7cd292520ac2fdba74c7f9433 Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 14:16:41 +0100 Subject: [PATCH 15/16] fix(ci): docker login --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index db716814..6d00edc0 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -9,7 +9,7 @@ steps: - MINOR=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 2) - PATCH=$(echo ${CI_COMMIT_TAG} | cut -d '.' -f 3) - docker buildx build -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} -t $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR} -t $${REGISTRY}/$$REPO:v$${MAJOR:-0} -t $${REGISTRY}/$$REPO:latest . - - echo $PASS | docker login --username $USER --password-stdin $${REGISTRY} + - docker login --username $USER --password $PASS $${REGISTRY} - docker push $${REGISTRY}/$${REPO}:v$${MAJOR:-0}.$${MINOR:-0}.$${PATCH-0} volumes: - /var/run/docker.sock:/var/run/docker.sock From 5e419045edd4d5fbb6e69f2301d47855bfe91c2c Mon Sep 17 00:00:00 2001 From: nikurasu Date: Mon, 18 Mar 2024 14:24:49 +0100 Subject: [PATCH 16/16] fix(ci): add secrets --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 6d00edc0..49be00ea 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,7 @@ steps: - name: build docker image: docker:25-cli + secrets: [user, pass] commands: - apk add git - REPO=$(echo "$CI_REPO" | tr '[:upper:]' '[:lower:]')