feat(ci)!: Switch to woodpecker

This commit is contained in:
Nicolai Ort 2023-11-06 20:18:40 +01:00
parent 43cc46b4df
commit 45f5564b08
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 41 additions and 64 deletions

View File

@ -1,64 +1,41 @@
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: secret
name: npm_token
get:
path: niggl-npm-key
name: npmkey
---
kind: pipeline
type: kubernetes
name: build:tag
steps:
- name: checkout backend
image: registry.odit.services/hub/alpine/git
commands:
- git clone https://git.odit.services/lfk/backend backend
- cd backend
- git checkout dev
- name: run openapi export
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- cd backend
- yarn
- yarn openapi:export
- mv ./openapi.json ../openapi.json
- cd ..
- rm -rf backend
- name: run lib build
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- yarn
- yarn build
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push to repo
image: appleboy/drone-git-push
settings:
branch: main
commit: true
commit_message: 🚀New lib version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
remote: git@git.odit.services:lfk/lfk-client-js.git
ssh_key:
from_secret: git_ssh
- name: npm
image: plugins/npm
settings:
token:
from_secret: npm_token
email: info@odit.services
trigger:
event:
exclude:
- push
include:
- custom
steps:
- name: checkout backend
image: registry.odit.services/hub/alpine/git
commands:
- git clone https://git.odit.services/lfk/backend backend
- cd backend
- git checkout dev
- name: run openapi export
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- cd backend
- yarn
- yarn openapi:export
- mv ./openapi.json ../openapi.json
- cd ..
- rm -rf backend
- name: run lib build
image: registry.odit.services/hub/library/node:19.5.0-alpine3.16
commands:
- yarn
- yarn build
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push to repo
image: appleboy/drone-git-push
settings:
branch: main
commit: true
commit_message: 🚀New lib version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
remote: git@git.odit.services:lfk/lfk-client-js.git
ssh_key:
from_secret: odit-git-bot-sshkey
- name: npm
image: plugins/npm
settings:
token:
from_secret: niggl-npm-key
email: info@odit.services
when:
event:
- manual