1
0
forked from extern/zsync

First prototype for deb package

This commit is contained in:
thorsten.spille 2024-02-09 22:49:27 +01:00
parent fe7f2753c9
commit f1c06aaa40
6 changed files with 43 additions and 26 deletions

View File

@ -1,26 +1,28 @@
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
sast:
stage: test
include:
- template: Auto-DevOps.gitlab-ci.yml
- build
- deploy
build_linux:
stage: build
tags:
- linux-all
only:
- tags
script:
- ./build-package ${CI_COMMIT_TAG}
artifacts:
name: "bashclub-zsync_${CI_COMMIT_TAG}_all.deb"
paths:
- "bashclub-zsync_${CI_COMMIT_TAG}_all.deb"
deploy_linux:
stage: deploy
tags:
- linux-all
only:
- tags
script:
#- ssh root@192.168.99.247 mkdir -p /tmp/import
- scp "bashclub-zsync_${CI_COMMIT_TAG}_all.deb" root@192.168.99.247:/tmp/import/bashclub-zsync_${CI_COMMIT_TAG}_all.deb
- ssh root@192.168.99.247 aptly-import-packages -v ${CI_COMMIT_TAG:0:3} /tmp/import/bashclub-zsync_${CI_COMMIT_TAG}_all.deb
#- ssh root@192.168.99.247 rm -rf /tmp/import

11
bashclub-zsync/DEBIAN/postinst Normal file → Executable file
View File

@ -2,6 +2,15 @@
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
# ensure log folder is present
if [ ! -d /var/log/bashclub-zsync ]; then
mkdir -p /var/log/bashclub-zsync
fi
chown -R root:root /var/log/bashclub-zsync
chmod -R 755 /var/log/bashclub-zsync
fi
chown root:root /usr/bin/bashclub-zsync
chmod 755 /usr/bin/bashclub-zsync
chown root:root /etc/logrotate.d/bashclub_zsync
chmod 644 /etc/logrotate.d/bashclub_zsync

0
bashclub-zsync/DEBIAN/postrm Normal file → Executable file
View File

0
bashclub-zsync/DEBIAN/preinst Normal file → Executable file
View File

0
bashclub-zsync/DEBIAN/prerm Normal file → Executable file
View File

View File

@ -16,4 +16,10 @@ Maintainer: bashclub
Description: The deb package for $package $version maintained from bashclub.
EOF
echo "$(date) fixing acls"
chmod 755 $package/DEBIAN/p*
# remove bashclub-zsync-config from package
rm $package/usr/bin/bashclub-zsync-config
dpkg-deb --build $package $deb_package