Обновить .woodpecker/.woodpecker.yml
This commit is contained in:
parent
448102dbeb
commit
c1cf4f33f5
1 changed files with 70 additions and 74 deletions
|
|
@ -1,82 +1,78 @@
|
||||||
environment:
|
steps:
|
||||||
GONETS: your_token_here
|
checkout_and_install:
|
||||||
GIT_AUTHOR_NAME: s.galanskiy
|
image: debian:latest
|
||||||
GIT_AUTHOR_EMAIL: s.galanskiy@gossys.dev
|
commands:
|
||||||
GIT_COMMITTER_NAME: s.galanskiy
|
- git clone --depth 0 --branch main . .
|
||||||
GIT_COMMITTER_EMAIL: s.galanskiy@gossys.dev
|
- apt update
|
||||||
|
- apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev
|
||||||
|
|
||||||
pipeline:
|
prepare_python_deps:
|
||||||
image: debian:latest
|
commands:
|
||||||
steps:
|
- cd SRV
|
||||||
- name: Checkout
|
- rm -f requirements.txt
|
||||||
commands:
|
- poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||||
- git clone --depth 0 --branch main . .
|
|
||||||
|
|
||||||
- name: Install dependencies
|
build_backend:
|
||||||
commands:
|
commands:
|
||||||
- apt update
|
- cd SRV
|
||||||
- apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev
|
- poetry install
|
||||||
|
|
||||||
- name: Prepare python dependencies
|
build_frontend:
|
||||||
commands:
|
commands:
|
||||||
- cd SRV
|
- cd FRONT/DEV
|
||||||
- rm -f requirements.txt
|
- npm install
|
||||||
- poetry export -f requirements.txt --output requirements.txt --without-hashes
|
- npm run package
|
||||||
|
- cd dist/gonets-linux-x64/resources/app
|
||||||
|
- npm run build
|
||||||
|
- sed -i 's/href="\/assets\//href=".\/assets\//g' dist/index.html
|
||||||
|
- sed -i 's/src="\/assets\//src=".\/assets\//g' dist/index.html
|
||||||
|
- cd ../../../..
|
||||||
|
- rm -rf FRONT/BUILD/*
|
||||||
|
- cp -r dist/gonets-linux-x64/* ../../BUILD/
|
||||||
|
- cd ../..
|
||||||
|
- rm -rf DEV
|
||||||
|
|
||||||
- name: Build backend
|
prepare_debian:
|
||||||
commands:
|
commands:
|
||||||
- cd SRV
|
- DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --createorig
|
||||||
- poetry install
|
- cd debian/
|
||||||
|
- rm -f *.ex
|
||||||
|
- rm -f README.*
|
||||||
|
|
||||||
- name: Build frontend
|
clone_debian_config:
|
||||||
commands:
|
environment:
|
||||||
- cd FRONT/DEV
|
GONETS: your_token_here
|
||||||
- npm install
|
commands:
|
||||||
- npm run package
|
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets-debian-template.git
|
||||||
- cd dist/gonets-linux-x64/resources/app
|
- mv gonets-debian-template/changelog gonets/debian/
|
||||||
- npm run build
|
- mv gonets-debian-template/control gonets/debian/
|
||||||
- sed -i 's/href="\/assets\//href=".\/assets\//g' dist/index.html
|
- mv gonets-debian-template/copyright gonets/debian/
|
||||||
- sed -i 's/src="\/assets\//src=".\/assets\//g' dist/index.html
|
- mv gonets-debian-template/install gonets/debian/
|
||||||
- cd ../../../..
|
- mv gonets-debian-template/postinst gonets/debian/
|
||||||
- rm -rf FRONT/BUILD/*
|
- mv gonets-debian-template/postrm gonets/debian/
|
||||||
- cp -r dist/gonets-linux-x64/* ../../BUILD/
|
- mv gonets-debian-template/rules gonets/debian/
|
||||||
- cd ../..
|
|
||||||
- rm -rf DEV
|
|
||||||
|
|
||||||
- name: Prepare debian package
|
build_package:
|
||||||
commands:
|
commands:
|
||||||
- DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --createorig
|
- dpkg-buildpackage -us -uc -b
|
||||||
- cd debian/
|
|
||||||
- rm -f *.ex
|
|
||||||
- rm -f README.*
|
|
||||||
|
|
||||||
- name: Clone debian configuration
|
get_version:
|
||||||
commands:
|
commands:
|
||||||
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets-debian-template.git
|
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field VERSION)
|
||||||
- mv gonets-debian-template/changelog gonets/debian/
|
- echo "VERSION=$VERSION" > version.env
|
||||||
- mv gonets-debian-template/control gonets/debian/
|
|
||||||
- mv gonets-debian-template/copyright gonets/debian/
|
|
||||||
- mv gonets-debian-template/install gonets/debian/
|
|
||||||
- mv gonets-debian-template/postinst gonets/debian/
|
|
||||||
- mv gonets-debian-template/postrm gonets/debian/
|
|
||||||
- mv gonets-debian-template/rules gonets/debian/
|
|
||||||
|
|
||||||
- name: Build package
|
commit_changes:
|
||||||
commands:
|
environment:
|
||||||
- dpkg-buildpackage -us -uc -b
|
GIT_AUTHOR_NAME: s.galanskiy
|
||||||
|
GIT_AUTHOR_EMAIL: s.galanskiy@gossys.dev
|
||||||
- name: Get version from changelog
|
GIT_COMMITTER_NAME: s.galanskiy
|
||||||
commands:
|
GIT_COMMITTER_EMAIL: s.galanskiy@gossys.dev
|
||||||
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field VERSION)
|
commands:
|
||||||
- echo "VERSION=$VERSION" > version.env
|
- source version.env
|
||||||
|
- git config user.name "$GIT_AUTHOR_NAME"
|
||||||
- name: Commit changes to develop
|
- git config user.email "$GIT_AUTHOR_EMAIL"
|
||||||
commands:
|
- git checkout develop
|
||||||
- source version.env
|
- git commit -am "Релиз $VERSION"
|
||||||
- git config user.name "$GIT_AUTHOR_NAME"
|
- git tag "v$VERSION"
|
||||||
- git config user.email "$GIT_AUTHOR_EMAIL"
|
- git push origin develop
|
||||||
- git checkout develop
|
- git push origin "v$VERSION"
|
||||||
- git commit -am "Релиз $VERSION"
|
|
||||||
- git tag "v$VERSION"
|
|
||||||
- git push origin develop
|
|
||||||
- git push origin "v$VERSION"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue