forked from extern/zsync
First prototype for deb package
This commit is contained in:
parent
fe7f2753c9
commit
f1c06aaa40
@ -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:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- deploy
|
||||||
- deploy
|
|
||||||
- review
|
build_linux:
|
||||||
- dast
|
stage: build
|
||||||
- staging
|
tags:
|
||||||
- canary
|
- linux-all
|
||||||
- production
|
only:
|
||||||
- incremental rollout 10%
|
- tags
|
||||||
- incremental rollout 25%
|
script:
|
||||||
- incremental rollout 50%
|
- ./build-package ${CI_COMMIT_TAG}
|
||||||
- incremental rollout 100%
|
artifacts:
|
||||||
- performance
|
name: "bashclub-zsync_${CI_COMMIT_TAG}_all.deb"
|
||||||
- cleanup
|
paths:
|
||||||
sast:
|
- "bashclub-zsync_${CI_COMMIT_TAG}_all.deb"
|
||||||
stage: test
|
|
||||||
include:
|
deploy_linux:
|
||||||
- template: Auto-DevOps.gitlab-ci.yml
|
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
11
bashclub-zsync/DEBIAN/postinst
Normal file → Executable file
@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
|
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
|
if [ ! -d /var/log/bashclub-zsync ]; then
|
||||||
mkdir -p /var/log/bashclub-zsync
|
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
0
bashclub-zsync/DEBIAN/postrm
Normal file → Executable file
0
bashclub-zsync/DEBIAN/preinst
Normal file → Executable file
0
bashclub-zsync/DEBIAN/preinst
Normal file → Executable file
0
bashclub-zsync/DEBIAN/prerm
Normal file → Executable file
0
bashclub-zsync/DEBIAN/prerm
Normal file → Executable file
@ -16,4 +16,10 @@ Maintainer: bashclub
|
|||||||
Description: The deb package for $package $version maintained from bashclub.
|
Description: The deb package for $package $version maintained from bashclub.
|
||||||
EOF
|
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
|
dpkg-deb --build $package $deb_package
|
||||||
|
Loading…
Reference in New Issue
Block a user