Skip to content

Commit

Permalink
Merge pull request #5 from axoflow/version/4.1.0
Browse files Browse the repository at this point in the history
syslog-ng 4.1.0
  • Loading branch information
alltilla authored Mar 8, 2023
2 parents 6a6020b + e9f7758 commit 1a66f44
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,11 @@ jobs:
PKG_TYPE=nightly
SNAPSHOT_VERSION=${{ needs.tarball.outputs.snapshot-version }}
- name: Smoke test
run: |
docker run --rm syslog-ng:test --syntax-only
docker run --rm syslog-ng:test --module-registry
docker run --rm syslog-ng:test -V | grep 'Installer-Version: .*\.g'
printf "@version: 4.0\n log { source { stdin(); }; destination { file("/dev/stdout"); }; };" > test.conf
echo "test msg" | docker run -i --rm -v $(realpath test.conf):/etc/syslog-ng/syslog-ng.conf syslog-ng:test -F | grep "test msg"
export SYSLOG_NG_IMAGE="syslog-ng:test"
export SYSLOG_NG_VERSION="${{ needs.tarball.outputs.snapshot-version }}"
tests/smoke.sh
publish-image:
Expand Down
6 changes: 4 additions & 2 deletions apkbuild/axoflow/syslog-ng/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Contributor: jv <[email protected]>
# Maintainer: László Várady <[email protected]>
pkgname=syslog-ng
pkgver=4.0.1
pkgver=4.1.0
pkgrel=0
pkgdesc="Next generation logging daemon"
url="https://www.syslog-ng.com/products/open-source-log-management/"
Expand Down Expand Up @@ -154,4 +154,6 @@ _submv() {
done
}

sha512sums="5f83ee3cc4935218feb19f3f5065a68099e3ee291d806ad8810499ded9f9ef3b326b4b22841cd736354ed6a2ebc1ce8ae73f6abe981aa6f64c42da9ee3b1e22f syslog-ng-4.0.1.tar.gz"
sha512sums="
3707d83b699c670c2e83c5343494902fcfc09d55d2311d318821cff47f843e90f882ff8892066aca8881c2b6d52981c1965379872707cadf9e45bb509550654d syslog-ng-4.1.0.tar.gz
"
32 changes: 32 additions & 0 deletions tests/smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -e

DOCKER="${DOCKER:-docker}"
SYSLOG_NG_IMAGE="${SYSLOG_NG_IMAGE:-ghcr.io/axoflow/syslog-ng:latest}"
SYSLOG_NG_VERSION="${SYSLOG_NG_VERSION:-}"


echo "=> Smoke testing image ${SYSLOG_NG_IMAGE}..."

echo "--> Check --syntax-only"
$DOCKER run --rm "${SYSLOG_NG_IMAGE}" --syntax-only

echo "--> Check --module-registry"
$DOCKER run --rm "${SYSLOG_NG_IMAGE}" --module-registry

if [[ -z "$SYSLOG_NG_VERSION" ]]; then
echo "--> Skipping syslog-ng version validation"
else
echo "--> Validate syslog-ng version"
$DOCKER run --rm "${SYSLOG_NG_IMAGE}" -V | grep "Installer-Version: .*${SYSLOG_NG_VERSION}"
fi

echo "--> I/O test"
conf_version_line="$($DOCKER run --rm "${SYSLOG_NG_IMAGE}" -V | grep 'Config version:')"
config_version="$(echo $conf_version_line | sed -E 's|Config version: ([0-9]\.[0-9])|\1|')"
printf "@version: ${config_version}\n log { source { stdin(); }; destination { file("/dev/stdout"); }; };" > test.conf
echo "test msg" \
| $DOCKER run -i --rm -v $(realpath test.conf):/etc/syslog-ng/syslog-ng.conf "${SYSLOG_NG_IMAGE}" -F \
| grep "test msg"

echo "=> Smoke test (${SYSLOG_NG_IMAGE}) passed"

0 comments on commit 1a66f44

Please sign in to comment.