Обновить .woodpecker/.woodpecker.yml

This commit is contained in:
parent 5e2a10f211
commit 448102dbeb

View file

@ -1,38 +1,34 @@
when: environment:
event: [push, tag] GONETS: your_token_here
branch: main GIT_AUTHOR_NAME: s.galanskiy
GIT_AUTHOR_EMAIL: s.galanskiy@gossys.dev
GIT_COMMITTER_NAME: s.galanskiy
GIT_COMMITTER_EMAIL: s.galanskiy@gossys.dev
steps: pipeline:
checkout:
image: debian:latest image: debian:latest
environment: steps:
GONETS: - name: Checkout
from_secret: GONETS
commands: commands:
- apt-get update - git clone --depth 0 --branch main . .
- apt-get install -y git git-lfs
- git lfs install
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git
install_deps: - name: Install dependencies
commands: commands:
- apt update - apt update
- apt install -y python3 #python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev - apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev
- python3 --version
prepare_python_deps: - name: Prepare python dependencies
commands: commands:
- cd gonets/SRV - cd 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
build_backend: - name: Build backend
commands: commands:
- cd gonets/SRV - cd SRV
- poetry install - poetry install
build_frontend: - name: Build frontend
commands: commands:
- cd FRONT/DEV - cd FRONT/DEV
- npm install - npm install
@ -47,17 +43,14 @@ steps:
- cd ../.. - cd ../..
- rm -rf DEV - rm -rf DEV
prepare_debian: - name: Prepare debian package
commands: commands:
- DESKTOP=1 DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --single -y - DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --createorig
- cd debian/ - cd debian/
- rm -f *.ex - rm -f *.ex
- rm -f README.* - rm -f README.*
clone_debian_config: - name: Clone debian configuration
environment:
GONETS:
from_secret: GONETS
commands: commands:
- 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/
@ -68,25 +61,22 @@ 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/
build_package: - name: Build package
commands: commands:
- dpkg-buildpackage -us -uc -b - dpkg-buildpackage -us -uc -b
get_version: - name: Get version from changelog
commands: commands:
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field VERSION)
- echo "VERSION=$VERSION" > version.env - echo "VERSION=$VERSION" > version.env
commit_changes: - name: Commit changes to develop
environment:
GONETS:
from_secret: GONETS
commands: commands:
- source version.env - source version.env
- git config user.name "s.galanskiy" - git config user.name "$GIT_AUTHOR_NAME"
- git config user.email "s.galanskiy@gossys.dev" - git config user.email "$GIT_AUTHOR_EMAIL"
- git checkout develop - git checkout develop
- git commit -am "Релиз $VERSION" - git commit -am "Релиз $VERSION"
- git tag "v$VERSION" - git tag "v$VERSION"
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop - git push origin develop
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" - git push origin "v$VERSION"