split pipeline
This commit is contained in:
parent
f7bb7e3e4e
commit
eb5c394c0e
6 changed files with 121 additions and 72 deletions
|
@ -1,72 +0,0 @@
|
||||||
# .woodpecker.yml
|
|
||||||
platform: linux/arm64
|
|
||||||
|
|
||||||
pipeline:
|
|
||||||
build:
|
|
||||||
image: node:18-alpine
|
|
||||||
commands:
|
|
||||||
- apk add git
|
|
||||||
- npm ci
|
|
||||||
- mkdir build
|
|
||||||
- npm run prepublish
|
|
||||||
- npm run bundleRelease
|
|
||||||
test:
|
|
||||||
image: node:18-alpine
|
|
||||||
commands:
|
|
||||||
- apk add openssl
|
|
||||||
- sh genSelfSignedCert.sh
|
|
||||||
- node tests/ws.js ci
|
|
||||||
- node tests/post.js ci
|
|
||||||
buildBin:
|
|
||||||
image: node:18
|
|
||||||
commands:
|
|
||||||
- apt install git zip tar
|
|
||||||
- npm run build-all
|
|
||||||
- mkdir outbag_server
|
|
||||||
- mkdir outbag_server/dist
|
|
||||||
- mkdir upload
|
|
||||||
- cp -r dist/* outbag_server/dist
|
|
||||||
- cp package.json outbag_server
|
|
||||||
- cp package-lock.json outbag_server
|
|
||||||
- cp readme.md outbag_server
|
|
||||||
- zip -r upload/OutbagServer.zip outbag_server/*
|
|
||||||
- tar -czvf upload/OutbagServer.tar.gz outbag_server/*
|
|
||||||
- cp build/bin/* upload
|
|
||||||
publish:
|
|
||||||
image: woodpeckerci/plugin-gitea-release
|
|
||||||
settings:
|
|
||||||
base_url: https://codeberg.org
|
|
||||||
files:
|
|
||||||
- "upload/*"
|
|
||||||
api_key:
|
|
||||||
from_secret: gitea_token
|
|
||||||
|
|
||||||
# publish:
|
|
||||||
# image: node:18-alpine
|
|
||||||
# commands:
|
|
||||||
# - apk add git zip tar
|
|
||||||
# - npm install git+https://jusax.de/git/jusax23/gitea-release.git
|
|
||||||
# - mkdir outbag_server
|
|
||||||
# - mkdir outbag_server/dist
|
|
||||||
# - mkdir upload
|
|
||||||
# - cp -r dist/* outbag_server/dist
|
|
||||||
# - cp package.json outbag_server
|
|
||||||
# - cp package-lock.json outbag_server
|
|
||||||
# - cp readme.md outbag_server
|
|
||||||
# - zip -r upload/OutbagServer.zip outbag_server/*
|
|
||||||
# - tar -czvf upload/OutbagServer.tar.gz outbag_server/*
|
|
||||||
# - cp build/bin/* upload
|
|
||||||
# - npx gitea-release "$${API_URL}" "$${GITEA_TOKEN}" "$${CI_REPO}" "$${CI_COMMIT_BRANCH}" "$${CI_COMMIT_TAG}" "upload" "$${CI_COMMIT_MESSAGE}"
|
|
||||||
# when:
|
|
||||||
# event: tag
|
|
||||||
# secrets: [ gitea_token, api_url ]
|
|
||||||
|
|
||||||
|
|
||||||
services:
|
|
||||||
database:
|
|
||||||
image: mariadb
|
|
||||||
environment:
|
|
||||||
- MYSQL_DATABASE=outbag
|
|
||||||
- MYSQL_USER=outbag
|
|
||||||
- MYSQL_PASSWORD=12345678
|
|
||||||
- MYSQL_ROOT_PASSWORD=12345678
|
|
28
.woodpecker/.release_amd.yml
Normal file
28
.woodpecker/.release_amd.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# .woodpecker.yml
|
||||||
|
platform: linux/amd64
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- npm ci
|
||||||
|
- mkdir build
|
||||||
|
- npm run bundleRelease
|
||||||
|
buildBin:
|
||||||
|
image: node:18
|
||||||
|
commands:
|
||||||
|
- npm run build-amd
|
||||||
|
- mkdir upload
|
||||||
|
- cp build/bin/* upload
|
||||||
|
publish:
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://codeberg.org
|
||||||
|
files:
|
||||||
|
- "upload/*"
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- test
|
28
.woodpecker/.release_arm.yml
Normal file
28
.woodpecker/.release_arm.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# .woodpecker.yml
|
||||||
|
platform: linux/arm64
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- npm ci
|
||||||
|
- mkdir build
|
||||||
|
- npm run bundleRelease
|
||||||
|
buildBin:
|
||||||
|
image: node:18
|
||||||
|
commands:
|
||||||
|
- npm run build-arm
|
||||||
|
- mkdir upload
|
||||||
|
- cp build/bin/* upload
|
||||||
|
publish:
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://codeberg.org
|
||||||
|
files:
|
||||||
|
- "upload/*"
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- test
|
34
.woodpecker/.release_code.yml
Normal file
34
.woodpecker/.release_code.yml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# .woodpecker.yml
|
||||||
|
platform: linux/arm64
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- npm ci
|
||||||
|
- mkdir build
|
||||||
|
- npm run prepublish
|
||||||
|
buildBin:
|
||||||
|
image: node:18
|
||||||
|
commands:
|
||||||
|
- mkdir outbag_server
|
||||||
|
- mkdir outbag_server/dist
|
||||||
|
- mkdir upload
|
||||||
|
- cp -r dist/* outbag_server/dist
|
||||||
|
- cp package.json outbag_server
|
||||||
|
- cp package-lock.json outbag_server
|
||||||
|
- cp readme.md outbag_server
|
||||||
|
- zip -r upload/OutbagServer.zip outbag_server/*
|
||||||
|
- tar -czvf upload/OutbagServer.tar.gz outbag_server/*
|
||||||
|
publish:
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
base_url: https://codeberg.org
|
||||||
|
files:
|
||||||
|
- "upload/*"
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- test
|
29
.woodpecker/.test.yml
Normal file
29
.woodpecker/.test.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# .woodpecker.yml
|
||||||
|
platform: linux/arm64
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
build:
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- npm ci
|
||||||
|
- mkdir build
|
||||||
|
- npm run prepublish
|
||||||
|
- npm run bundleRelease
|
||||||
|
test:
|
||||||
|
image: node:18-alpine
|
||||||
|
commands:
|
||||||
|
- apk add openssl
|
||||||
|
- sh genSelfSignedCert.sh
|
||||||
|
- node tests/ws.js ci
|
||||||
|
- node tests/post.js ci
|
||||||
|
|
||||||
|
|
||||||
|
services:
|
||||||
|
database:
|
||||||
|
image: mariadb
|
||||||
|
environment:
|
||||||
|
- MYSQL_DATABASE=outbag
|
||||||
|
- MYSQL_USER=outbag
|
||||||
|
- MYSQL_PASSWORD=12345678
|
||||||
|
- MYSQL_ROOT_PASSWORD=12345678
|
|
@ -28,6 +28,8 @@
|
||||||
"build-macos-x64": "mkdir build/bin & pkg -t node18-macos-x64 -o build/bin/outbag-macos-x64 build/bundle/main.js",
|
"build-macos-x64": "mkdir build/bin & pkg -t node18-macos-x64 -o build/bin/outbag-macos-x64 build/bundle/main.js",
|
||||||
"build-macos-arm64": "mkdir build/bin & pkg -t node18-macos-arm64 -o build/bin/outbag-macos-arm64 build/bundle/main.js",
|
"build-macos-arm64": "mkdir build/bin & pkg -t node18-macos-arm64 -o build/bin/outbag-macos-arm64 build/bundle/main.js",
|
||||||
"build-all": "mkdir build/bin & pkg -t node18-linux-x64,node18-linux-arm64,node18-win-x64,node18-win-arm64,node18-macos-x64 -o build/bin/outbag build/bundle/main.js",
|
"build-all": "mkdir build/bin & pkg -t node18-linux-x64,node18-linux-arm64,node18-win-x64,node18-win-arm64,node18-macos-x64 -o build/bin/outbag build/bundle/main.js",
|
||||||
|
"build-amd": "mkdir build/bin & pkg -t node18-linux-x64,node18-win-x64,node18-macos-x64 -o build/bin/outbag build/bundle/main.js",
|
||||||
|
"build-arm": "mkdir build/bin & pkg -t node18-linux-arm64,node18-win-arm64 -o build/bin/outbag build/bundle/main.js",
|
||||||
"build-self": "mkdir build/bin & pkg -t node18 -o build/bin/outbag build/bundle/main.js"
|
"build-self": "mkdir build/bin & pkg -t node18 -o build/bin/outbag build/bundle/main.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in a new issue