Add again some quiet args to avoid pipeline step logs to exceed max size
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Benjamin Renard 2022-04-27 18:56:03 +02:00
parent a0e7aae504
commit ac9a35bfe1
3 changed files with 37 additions and 29 deletions

View File

@ -2,21 +2,21 @@ pipeline:
test: test:
image: debian image: debian
commands: commands:
- apt-get -qq update - DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null
- apt-get -y -qq upgrade - DEBIAN_FRONTEND=noninteractive apt-get -y -qq upgrade < /dev/null > /dev/null
- apt-get -qq -o=Dpkg::Use-Pty=0 -y install --no-install-recommends python3-all python3-dev python3-pip python3-venv build-essential pkg-config libsystemd-dev libldap2-dev libsasl2-dev libpq-dev libmariadb-dev wget unzip - DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends python3-all python3-dev python3-pip python3-venv build-essential pkg-config libsystemd-dev libldap2-dev libsasl2-dev libpq-dev libmariadb-dev wget unzip < /dev/null > /dev/null
- wget --no-verbose -O /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip - wget --no-verbose -O /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/214000/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip
- unzip -d /opt /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip - unzip -qq -d /opt /opt/instantclient-basic-linux.x64-21.4.0.0.0dbru.zip
- echo /opt/instantclient_* > /etc/ld.so.conf.d/oracle-instantclient.conf - echo /opt/instantclient_* > /etc/ld.so.conf.d/oracle-instantclient.conf
- ldconfig - ldconfig
- ./tests.sh - ./tests.sh --quiet
build: build:
image: debian image: debian
commands: commands:
- apt-get -qq update - DEBIAN_FRONTEND=noninteractive apt-get -qq update < /dev/null > /dev/null
- apt-get -y -qq upgrade - DEBIAN_FRONTEND=noninteractive apt-get -y -qq upgrade < /dev/null > /dev/null
- apt-get -qq -o=Dpkg::Use-Pty=0 -y install --no-install-recommends git sed python3-all python3-dev python3-pip python3-venv dpkg-dev build-essential debhelper dh-python bash-completion lsb-release - DEBIAN_FRONTEND=noninteractive apt-get -qq -y install --no-install-recommends git sed python3-all python3-dev python3-pip python3-venv dpkg-dev build-essential debhelper dh-python bash-completion lsb-release < /dev/null > /dev/null
- ./build.sh - ./build.sh --quiet
- rm -fr deb_dist/python3-mylib-* - rm -fr deb_dist/python3-mylib-*
publish: publish:
image: plugins/gitea-release image: plugins/gitea-release

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
QUIET_ARG=""
[ "$1" == "--quiet" ] && QUIET_ARG="--quiet"
# Enter source directory # Enter source directory
cd $( dirname $0 ) cd $( dirname $0 )
@ -15,15 +18,16 @@ then
VENV=$( realpath venv ) VENV=$( realpath venv )
TEMP_VENV=0 TEMP_VENV=0
else else
# Install stdeb in temporary venv
VENV=$(mktemp -d) VENV=$(mktemp -d)
echo "Create a temporary virtualenv in $VENV to install build dependencies..." echo "Create a temporary virtualenv in $VENV to install build dependencies..."
TEMP_VENV=1 TEMP_VENV=1
python3 -m venv $VENV python3 -m venv $VENV
$VENV/bin/python3 -m pip install stdeb GitPython wheel
fi fi
# Build wheel package echo "Install dependencies in virtualenv using pip..."
$VENV/bin/python3 -m pip install stdeb GitPython wheel $QUIET_ARG
echo "Build wheel package..."
$VENV/bin/python3 setup.py bdist_wheel $VENV/bin/python3 setup.py bdist_wheel
# Check gitdch is installed # Check gitdch is installed
@ -32,14 +36,14 @@ set -e
if [ -z "$GITDCH" ] if [ -z "$GITDCH" ]
then then
TMP_GITDCH=$(mktemp -d) TMP_GITDCH=$(mktemp -d)
echo "Temporary install gitdch in $TMP_GITDCH" echo "Temporary install gitdch in $TMP_GITDCH..."
git clone https://gitea.zionetrix.net/bn8/gitdch.git $TMP_GITDCH/gitdch git clone $QUIET_ARG https://gitea.zionetrix.net/bn8/gitdch.git $TMP_GITDCH/gitdch
GITDCH=$TMP_GITDCH/gitdch/gitdch GITDCH=$TMP_GITDCH/gitdch/gitdch
else else
TMP_GITDCH="" TMP_GITDCH=""
fi fi
# Build debian source package echo "Build debian source package using stdeb sdist_dsc command..."
$VENV/bin/python3 setup.py --command-packages=stdeb.command sdist_dsc \ $VENV/bin/python3 setup.py --command-packages=stdeb.command sdist_dsc \
--package3 "python3-mylib" \ --package3 "python3-mylib" \
--maintainer "Benjamin Renard <brenard@zionetrix.net>" \ --maintainer "Benjamin Renard <brenard@zionetrix.net>" \
@ -47,34 +51,35 @@ $VENV/bin/python3 setup.py --command-packages=stdeb.command sdist_dsc \
--section net \ --section net \
--forced-upstream-version "$VERSION" --forced-upstream-version "$VERSION"
# Keep only debian package directory and orig.tar.gz archive echo "Keep only debian package directory and orig.tar.gz archive..."
find deb_dist/ -maxdepth 1 -type f ! -name '*.orig.tar.gz' -delete find deb_dist/ -maxdepth 1 -type f ! -name '*.orig.tar.gz' -delete
# Enter in debian package directory echo "Enter in debian package directory..."
cd deb_dist/mylib-$VERSION cd deb_dist/mylib-$VERSION
# Generate EE debian codename echo "Generate EE debian codename..."
DEBIAN_CODENAME=$( lsb_release -c -s ) DEBIAN_CODENAME=$( lsb_release -c -s )
[ $( lsb_release -r -s ) -ge 9 ] && DEBIAN_CODENAME="${DEBIAN_CODENAME}-ee" [ $( lsb_release -r -s ) -ge 9 ] && DEBIAN_CODENAME="${DEBIAN_CODENAME}-ee"
# Generate debian changelog using generate_debian_changelog.py echo "Generate debian changelog using gitdch..."
GITDCH_LOG_ARG='--verbose'
[ -n "$QUIET_ARG" ] && GITDCH_LOG_ARG='--warning'
$VENV/bin/python3 $GITDCH \ $VENV/bin/python3 $GITDCH \
--package-name mylib \ --package-name mylib \
--version "${VERSION}" \ --version "${VERSION}" \
--code-name $DEBIAN_CODENAME \ --code-name $DEBIAN_CODENAME \
--output debian/changelog \ --output debian/changelog \
--path ../../ \ --path ../../ \
--verbose $GITDCH_LOG_ARG
# Add custom package name for dependencies echo "Add custom package name for dependencies..."
cat << EOF > debian/py3dist-overrides cat << EOF > debian/py3dist-overrides
cx_oracle python3-cx-oracle cx_oracle python3-cx-oracle
EOF EOF
[ $TEMP_VENV -eq 1 ] && rm -fr $VENV [ $TEMP_VENV -eq 1 ] && echo "Clean temporary virtualenv..." && rm -fr $VENV
# Clean temporary gitdch installation [ -n "$TMP_GITDCH" ] && echo "Clean temporary gitdch installation..." && rm -fr $TMP_GITDCH
[ -n "$TMP_GITDCH" ] && rm -fr $TMP_GITDCH
# Build debian package echo "Build debian package..."
dpkg-buildpackage --no-sign dpkg-buildpackage --no-sign

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
QUIET_ARG=""
[ "$1" == "--quiet" ] && QUIET_ARG="--quiet"
# Enter source directory # Enter source directory
cd $( dirname $0 ) cd $( dirname $0 )
@ -8,15 +11,15 @@ then
VENV=$( realpath venv ) VENV=$( realpath venv )
TEMP_VENV=0 TEMP_VENV=0
else else
# Install stdeb in temporary venv # Create a temporary venv
VENV=$(mktemp -d) VENV=$(mktemp -d)
echo "Create a temporary virtualenv in $VENV to install build dependencies..." echo "Create a temporary virtualenv in $VENV to install dependencies..."
TEMP_VENV=1 TEMP_VENV=1
python3 -m venv $VENV python3 -m venv $VENV
fi fi
# Install package with dev dependencies echo "Install package with dev dependencies using pip..."
$VENV/bin/python3 -m pip install -e ".[dev]" $VENV/bin/python3 -m pip install -e ".[dev]" $QUIET_ARG
# Run tests # Run tests
$VENV/bin/python3 -m pytest tests $VENV/bin/python3 -m pytest tests