Обновить .woodpecker/.woodpecker.yml
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
parent e64b5eeac4
commit bde392346a

View file

@ -1,27 +1,48 @@
# Указываем рабочую директорию для сохранения состояния между шагами
workspace:
path: /woodpecker/src
when:
event: [push, tag]
branch: main
steps: steps:
all_in_one: checkout:
image: debian:latest image: debian:latest
environment: environment:
GONETS: your_token_here GONETS:
GIT_AUTHOR_NAME: s.galanskiy from_secret: GONETS
GIT_AUTHOR_EMAIL: s.galanskiy@gossys.dev
GIT_COMMITTER_NAME: s.galanskiy
GIT_COMMITTER_EMAIL: s.galanskiy@gossys.dev
commands: commands:
- echo '=== Checkout and install dependencies ===' - apt-get update
- git clone --depth 0 --branch main . . - apt-get install -y git git-lfs
- apt update - git lfs install
- apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev - git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git
- echo '=== Prepare python dependencies ===' install_deps:
- cd SRV 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 - rm -f requirements.txt
- poetry export -f requirements.txt --output requirements.txt --without-hashes - poetry export -f requirements.txt --output requirements.txt --without-hashes
- poetry install
- cd ..
- echo '=== Build frontend ===' build_backend:
- cd FRONT/DEV image: debian:latest
commands:
- cd gonets/SRV
- poetry install
build_frontend:
image: debian:latest
commands:
- cd gonets/FRONT/DEV
- npm install - npm install
- npm run package - npm run package
- cd dist/gonets-linux-x64/resources/app - cd dist/gonets-linux-x64/resources/app
@ -34,14 +55,22 @@ steps:
- cd ../.. - cd ../..
- rm -rf DEV - rm -rf DEV
- echo '=== Prepare debian package ===' prepare_debian:
- DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --createorig image: debian:latest
commands:
- cd gonets
- DESKTOP=1 DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --single -y
- cd debian/ - cd debian/
- rm -f *.ex - rm -f *.ex
- rm -f README.* - 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 - 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/changelog gonets/debian/
- mv gonets-debian-template/control 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/postrm gonets/debian/
- mv gonets-debian-template/rules 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 - dpkg-buildpackage -us -uc -b
- echo '=== Get version from changelog ===' get_version:
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field VERSION) image: debian:latest
commands:
- cd gonets
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version)
- echo "VERSION=$VERSION" > version.env - 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 - source version.env
- git config user.name "$GIT_AUTHOR_NAME" - git config user.name "s.galanskiy"
- git config user.email "$GIT_AUTHOR_EMAIL" - git config user.email "s.galanskiy@gossys.dev"
- git checkout develop - git checkout develop
- git commit -am "Релиз $VERSION" - git commit -am "Релиз $VERSION"
- git tag "v$VERSION" - git tag "v$VERSION"
- git push origin develop - git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop
- git push origin "v$VERSION" - git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION"