Skip to content

Commit 72e346e

Browse files
[main][Automation] Update versions (#9450)
* [main][Automation] Update versions These files are used for picking the starting (pre-upgrade) or ending (post-upgrade) agent versions in upgrade integration tests. The content is based on responses from https://www.elastic.co/api/product_versions and https://snapshots.elastic.co The current update is generated based on the following requirements: `.package-version` ```json { "version": "9.2.0-SNAPSHOT", "build_id": "9.2.0-c412f98a", "manifest_url": "https://snapshots.elastic.co/9.2.0-c412f98a/manifest-9.2.0-SNAPSHOT.json", "summary_url": "https://snapshots.elastic.co/9.2.0-c412f98a/summary-9.2.0-SNAPSHOT.html", "core_version": "9.2.0", "stack_build_id": "9.2.0-c412f98a-SNAPSHOT" } ``` `testing/integration/testdata/.upgrade-test-agent-versions.yml` ```json { "UpgradeToVersion": "9.2.0", "CurrentMajors": 1, "PreviousMajors": 1, "PreviousMinors": 2, "SnapshotBranches": [ "9.1", "9.0", "8.19", "7.17" ] } ``` * fix: stop elastic-agent service if we need to stop endpoint --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Panos Koutsovasilis <[email protected]>
1 parent eb0d46c commit 72e346e

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.package-version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"version": "9.2.0-SNAPSHOT",
3-
"build_id": "9.2.0-4fb89937",
4-
"manifest_url": "https://snapshots.elastic.co/9.2.0-4fb89937/manifest-9.2.0-SNAPSHOT.json",
5-
"summary_url": "https://snapshots.elastic.co/9.2.0-4fb89937/summary-9.2.0-SNAPSHOT.html",
3+
"build_id": "9.2.0-c412f98a",
4+
"manifest_url": "https://snapshots.elastic.co/9.2.0-c412f98a/manifest-9.2.0-SNAPSHOT.json",
5+
"summary_url": "https://snapshots.elastic.co/9.2.0-c412f98a/summary-9.2.0-SNAPSHOT.html",
66
"core_version": "9.2.0",
7-
"stack_build_id": "9.2.0-4fb89937-SNAPSHOT"
7+
"stack_build_id": "9.2.0-c412f98a-SNAPSHOT"
88
}

dev-tools/packaging/templates/linux/preinstall.sh.tmpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ if systemctl list-unit-files --type=service | grep -q "^${SERVICE_NAME}.service"
1818

1919
# Remove the vault directory if it exists
2020
if [ -d "/opt/Elastic/Endpoint/state/vault" ]; then
21+
# we need to stop the agent to prevent it from invoking endpoint
22+
if systemctl --quiet is-active elastic-agent; then
23+
echo "elastic-agent is running, stopping it"
24+
systemctl --quiet stop elastic-agent
25+
else
26+
echo "elastic-agent is not running"
27+
fi
2128

2229
# Check if the endpoint is running
2330
if systemctl --quiet is-active $SERVICE_NAME; then

testing/integration/testdata/.upgrade-test-agent-versions.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
# upgrade integration tests.
66

77
testVersions:
8-
- 9.1.1
9-
- 9.1.1-SNAPSHOT
10-
- 9.0.5-SNAPSHOT
11-
- 9.0.4
12-
- 8.19.1
8+
- 9.1.2
9+
- 9.1.2-SNAPSHOT
10+
- 9.0.6-SNAPSHOT
11+
- 9.0.5
12+
- 8.19.2
1313
- 8.19.1-SNAPSHOT
1414
- 7.17.30-SNAPSHOT

0 commit comments

Comments
 (0)