Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions .github/workflows/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,8 @@ jobs:
- Ubuntu Jammy amd64
- Ubuntu Noble amd64
test:
- "update-from-v4.sh local"
- "update-from-v4.sh v5"
- "update-from-v4.sh lts"
- "update-from-v4.sh"
- "update-from-v4.sh via-v5"
- "update-from-v5-lts.sh"
- "downgrade-to-v4.sh"
- "downgrade-to-v5-lts.sh"
Expand Down Expand Up @@ -270,22 +269,18 @@ jobs:
container-image: images:ubuntu/24.04
exclude:
- label: Debian bookworm amd64
test: update-from-v4.sh local
test: update-from-v4.sh
- label: Debian bookworm amd64
test: update-from-v4.sh v5
- label: Debian bookworm amd64
test: update-from-v4.sh lts
test: update-from-v4.sh via-v5
- label: Debian bookworm amd64
test: update-to-next-version-with-backward-compat-for-v4.sh
- label: Debian bookworm amd64
test: downgrade-to-v4.sh
# Temporary disable test for trixie (not released yet)
- label: Debian trixie amd64
test: update-from-v4.sh local
- label: Debian trixie amd64
test: update-from-v4.sh v5
test: update-from-v4.sh
- label: Debian trixie amd64
test: update-from-v4.sh lts
test: update-from-v4.sh via-v5
- label: Debian trixie amd64
test: update-from-v5-lts.sh
- label: Debian trixie amd64
Expand All @@ -299,11 +294,9 @@ jobs:
- label: Debian trixie amd64
test: update-to-next-version-with-backward-compat-for-v4.sh
- label: Ubuntu Noble amd64
test: update-from-v4.sh local
- label: Ubuntu Noble amd64
test: update-from-v4.sh v5
test: update-from-v4.sh
- label: Ubuntu Noble amd64
test: update-from-v4.sh lts
test: update-from-v4.sh via-v5
- label: Ubuntu Noble amd64
test: update-to-next-version-with-backward-compat-for-v4.sh
- label: Ubuntu Noble amd64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
test:
- "install-test.ps1"
- "update-from-v4-test.ps1"
- "update-from-v4-test.ps1 -ViaV5"
- "update-from-v5-test.ps1"
- "serverspec-test.ps1"
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ jobs:
- AmazonLinux 2023 x86_64
test:
- "update-from-v4.sh"
- "update-from-v4.sh via-v5"
- "update-from-v5-lts.sh"
- "downgrade-to-v4.sh"
- "downgrade-to-v5-lts.sh"
Expand Down Expand Up @@ -321,6 +322,8 @@ jobs:
exclude:
- label: AmazonLinux 2023 x86_64
test: update-from-v4.sh
- label: AmazonLinux 2023 x86_64
test: update-from-v4.sh via-v5
- label: AmazonLinux 2023 x86_64
test: update-to-next-version-with-backward-compat-for-v4.sh
- label: AmazonLinux 2023 x86_64
Expand Down
25 changes: 10 additions & 15 deletions fluent-package/apt/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -exu

. $(dirname $0)/../commonvar.sh

testcase=${1:-directly}

# Install v4
sudo apt install -y curl ca-certificates
curl -fsSL https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-td-agent4.sh | sh
Expand All @@ -25,22 +27,15 @@ done
sudo systemctl stop td-agent

# Install the current
case $1 in
local)
sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb \
/host/${distribution}/pool/${code_name}/${channel}/*/*/td-agent_*_all.deb 2>&1 | tee upgrade.log
# Test: needrestart was suppressed
test_suppressed_needrestart upgrade.log
;;
v5)
curl --fail --silent --show-error --location https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-fluent-package5.sh | sh 2>&1 | tee upgrade.log
test_suppressed_needrestart upgrade.log
;;
lts)
if [ "$testcase" = via-v5 ]; then
curl --fail --silent --show-error --location https://toolbelt.treasuredata.com/sh/install-${distribution}-${code_name}-fluent-package5-lts.sh | sh
;;
esac
fi
sudo apt install -V -y \
/host/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb \
/host/${distribution}/pool/${code_name}/${channel}/*/*/td-agent_*_all.deb 2>&1 | tee upgrade.log

# Test: needrestart was suppressed
test_suppressed_needrestart upgrade.log

# Test: service status
systemctl status --no-pager fluentd
Expand Down
10 changes: 9 additions & 1 deletion fluent-package/msi/update-from-v4-test.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Param(
[switch] $ViaV5 = $false
)

$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
Set-PSDebug -Trace 1
Expand All @@ -24,7 +28,11 @@ Add-Content -Path "C:\\opt\\td-agent\\etc\\td-agent\\td-agent.conf" -Encoding UT
Restart-Service fluentdwinsvc
Start-Sleep 30 # Must wait until all processes are surely started.

# Update to v5
# Update to current
if ($ViaV5) {
Invoke-WebRequest "https://s3.amazonaws.com/packages.treasuredata.com/lts/5/windows/fluent-package-5.0.7-x64.msi" -OutFile "fluent-package-5.0.7-x64.msi"
Start-Process msiexec -ArgumentList "/i", "fluent-package-5.0.7-x64.msi", "/quiet" -Wait -NoNewWindow
}
$new_package = ((Get-Item "C:\\fluentd\\fluent-package\\msi\\repositories\\fluent-package-*.msi") | Sort-Object -Descending { $_.LastWriteTime } | Select-Object -First 1).FullName
Start-Process msiexec -ArgumentList "/i", $new_package, "/quiet" -Wait -NoNewWindow
Start-Service fluentdwinsvc
Expand Down
7 changes: 7 additions & 0 deletions fluent-package/yum/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -exu

. $(dirname $0)/common.sh

testcase=${1:-directly}

install_v4
sudo systemctl enable --now td-agent
systemctl status --no-pager td-agent
Expand All @@ -17,7 +19,12 @@ for d in $(seq 1 10); do
sudo touch /var/log/td-agent/$d.log
done

# Install current
if [ "$testcase" = via-v5 ]; then
install_v5_lts
fi
install_current
sleep 3

# Test: take over enabled state
systemctl is-enabled fluentd
Expand Down