feat(ci)!: Switch to woodpecker
ci/woodpecker/manual/prepare Pipeline failed Details

This commit is contained in:
Nicolai Ort 2023-11-06 20:40:59 +01:00
parent 17286551ad
commit 7e75c4e9d8
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
3 changed files with 72 additions and 107 deletions

View File

@ -1,107 +0,0 @@
---
kind: secret
name: gitea_token
get:
path: odit-git-bot
name: apikey
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: secret
name: ci_token
get:
path: odit-ci-bot
name: apikey
---
kind: pipeline
type: kubernetes
name: build:tag
steps:
- name: run electron packager
depends_on: ["clone"]
image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
commands:
- apk add git zip -f
- yarn
- yarn build
- mkdir dist
- zip -r dist/@lfk-scanclient-electron-linux-x64.zip out/@lfk-scanclient-electron-linux-x64
- name: gitea_release
depends_on: ["run electron packager"]
image: plugins/gitea-release
settings:
title: Release ${DRONE_TAG}
api_key:
from_secret: gitea_token
base_url: https://git.odit.services
files: dist/*
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
- name: trigger live build
depends_on: ["gitea_release"]
image: idcooldi/drone-webhook
settings:
urls: https://ci.odit.services/api/repos/lfk/scanclient-live/builds?SOURCE_TAG=${DRONE_TAG}
bearer:
from_secret: ci_token
trigger:
event:
- tag
---
kind: pipeline
type: kubernetes
name: prepare:tag
steps:
- name: bump package version
image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
commands:
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push new version to repo
image: appleboy/drone-git-push
settings:
commit: true
commit_message: 🚀New package version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
followtags: false
branch: main
remote: git@git.odit.services:lfk/scanclient-electron.git
skip_verify: true
ssh_key:
from_secret: git_ssh
- name: tag
image: alpine/git
commands:
- git tag ${SOURCE_TAG} -a -m "Release ${SOURCE_TAG}"
- name: push to repo
image: appleboy/drone-git-push
settings:
commit: false
author_email: bot@odit.services
followtags: true
branch: main
remote: git@git.odit.services:lfk/scanclient-electron.git
skip_verify: true
ssh_key:
from_secret: git_ssh
trigger:
event:
exclude:
- push
- tag
include:
- custom

35
.woodpecker/prepare.yml Normal file
View File

@ -0,0 +1,35 @@
steps:
- name: bump package version
image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
commands:
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push new version to repo
image: appleboy/drone-git-push
settings:
commit: true
commit_message: 🚀New package version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
followtags: false
branch: main
remote: git@git.odit.services:lfk/scanclient-electron.git
skip_verify: true
ssh_key:
from_secret: odit-git-bot-sshkey
- name: tag
image: alpine/git
commands:
- git tag ${SOURCE_TAG} -a -m "Release ${SOURCE_TAG}"
- name: push to repo
image: appleboy/drone-git-push
settings:
commit: false
author_email: bot@odit.services
followtags: true
branch: main
remote: git@git.odit.services:lfk/scanclient-electron.git
skip_verify: true
ssh_key:
from_secret: odit-git-bot-sshkey
when:
event:
- manual

37
.woodpecker/release.yml Normal file
View File

@ -0,0 +1,37 @@
platform: linux/amd64
steps:
- name: build dist zip
image: registry.odit.services/hub/library/node:19.9.0-alpine3.16
commands:
- apk add git zip -f
- yarn
- yarn build
- mkdir dist
- zip -r dist/@lfk-scanclient-electron-linux-x64.zip out/@lfk-scanclient-electron-linux-x64
- name: gitea add packages to build
image: woodpeckerci/plugin-gitea-release
settings:
api_key:
from_secret: odit-git-bot-apikey
base_url: https://git.odit.services
files: dist/*
title: Release ${CI_COMMIT_TAG}
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
- name: trigger app.gutfeel.de build
image: woodpeckerci/plugin-trigger
settings:
repositories:
- lfk/scanclient-live
params:
- "SOURCE_TAG=${CI_COMMIT_TAG}"
token:
from_secret: odit-ci-bot-apikey
when:
event: tag