Обновить .woodpecker/.woodpecker.yml
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
e64b5eeac4
commit
bde392346a
1 changed files with 69 additions and 28 deletions
|
|
@ -1,27 +1,48 @@
|
|||
# Указываем рабочую директорию для сохранения состояния между шагами
|
||||
workspace:
|
||||
path: /woodpecker/src
|
||||
|
||||
when:
|
||||
event: [push, tag]
|
||||
branch: main
|
||||
|
||||
steps:
|
||||
all_in_one:
|
||||
checkout:
|
||||
image: debian:latest
|
||||
environment:
|
||||
GONETS: your_token_here
|
||||
GIT_AUTHOR_NAME: s.galanskiy
|
||||
GIT_AUTHOR_EMAIL: s.galanskiy@gossys.dev
|
||||
GIT_COMMITTER_NAME: s.galanskiy
|
||||
GIT_COMMITTER_EMAIL: s.galanskiy@gossys.dev
|
||||
GONETS:
|
||||
from_secret: GONETS
|
||||
commands:
|
||||
- echo '=== Checkout and install dependencies ==='
|
||||
- git clone --depth 0 --branch main . .
|
||||
- apt update
|
||||
- apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev
|
||||
- apt-get update
|
||||
- apt-get install -y git git-lfs
|
||||
- git lfs install
|
||||
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git
|
||||
|
||||
- echo '=== Prepare python dependencies ==='
|
||||
- cd SRV
|
||||
install_deps:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- apt update
|
||||
- apt install -y python3
|
||||
- python3 --version
|
||||
|
||||
prepare_python_deps:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets/SRV
|
||||
- curl -sSL https://install.python-poetry.org | python3 -
|
||||
- rm -f requirements.txt
|
||||
- poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||
- poetry install
|
||||
- cd ..
|
||||
|
||||
- echo '=== Build frontend ==='
|
||||
- cd FRONT/DEV
|
||||
build_backend:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets/SRV
|
||||
- poetry install
|
||||
|
||||
build_frontend:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets/FRONT/DEV
|
||||
- npm install
|
||||
- npm run package
|
||||
- cd dist/gonets-linux-x64/resources/app
|
||||
|
|
@ -34,14 +55,22 @@ steps:
|
|||
- cd ../..
|
||||
- rm -rf DEV
|
||||
|
||||
- echo '=== Prepare debian package ==='
|
||||
- DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --createorig
|
||||
prepare_debian:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets
|
||||
- DESKTOP=1 DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --single -y
|
||||
- cd debian/
|
||||
- rm -f *.ex
|
||||
- rm -f README.*
|
||||
- cd ..
|
||||
|
||||
- echo '=== Clone debian configuration ==='
|
||||
clone_debian_config:
|
||||
image: debian:latest
|
||||
environment:
|
||||
GONETS:
|
||||
from_secret: GONETS
|
||||
commands:
|
||||
- cd /woodpecker/src
|
||||
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets-debian-template.git
|
||||
- mv gonets-debian-template/changelog gonets/debian/
|
||||
- mv gonets-debian-template/control gonets/debian/
|
||||
|
|
@ -51,19 +80,31 @@ steps:
|
|||
- mv gonets-debian-template/postrm gonets/debian/
|
||||
- mv gonets-debian-template/rules gonets/debian/
|
||||
|
||||
- echo '=== Build package ==='
|
||||
build_package:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets
|
||||
- dpkg-buildpackage -us -uc -b
|
||||
|
||||
- echo '=== Get version from changelog ==='
|
||||
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field VERSION)
|
||||
get_version:
|
||||
image: debian:latest
|
||||
commands:
|
||||
- cd gonets
|
||||
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version)
|
||||
- echo "VERSION=$VERSION" > version.env
|
||||
|
||||
- echo '=== Commit changes to develop ==='
|
||||
commit_changes:
|
||||
image: debian:latest
|
||||
environment:
|
||||
GONETS:
|
||||
from_secret: GONETS
|
||||
commands:
|
||||
- cd gonets
|
||||
- source version.env
|
||||
- git config user.name "$GIT_AUTHOR_NAME"
|
||||
- git config user.email "$GIT_AUTHOR_EMAIL"
|
||||
- git config user.name "s.galanskiy"
|
||||
- git config user.email "s.galanskiy@gossys.dev"
|
||||
- git checkout develop
|
||||
- git commit -am "Релиз $VERSION"
|
||||
- git tag "v$VERSION"
|
||||
- git push origin develop
|
||||
- git push origin "v$VERSION"
|
||||
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop
|
||||
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION"
|
||||
Loading…
Add table
Add a link
Reference in a new issue