-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgade workflow #1375
Merged
+1,772
−234
Merged
Upgade workflow #1375
Changes from 69 commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
f08b4f3
add package policy infra and update gcp and kspm integrations
gurevichdmitry a96b868
update cnvm integration package install
gurevichdmitry f517be8
update kspm eks integration package install
gurevichdmitry f31b483
update cspm aws integration package install
gurevichdmitry 331b685
Merge branch 'main' into upgade-workflow
gurevichdmitry 74a0d8f
add upgrade flow
gurevichdmitry 8265213
added support for installing CNVM with correct template version
gurevichdmitry 11f8df5
Merge pull request #193 from gurevichdmitry/upgade-workflow
gurevichdmitry db12572
update reuse workflow inputs
gurevichdmitry 3d2acd2
Merge pull request #194 from gurevichdmitry/upgade-workflow
gurevichdmitry a3ab3ee
update inputs type
gurevichdmitry 4987797
Merge pull request #195 from gurevichdmitry/upgade-workflow
gurevichdmitry 51b360f
update additional input types
gurevichdmitry d498217
Merge pull request #196 from gurevichdmitry/upgade-workflow
gurevichdmitry bba5419
update additional input types
gurevichdmitry e148288
Merge pull request #197 from gurevichdmitry/upgade-workflow
gurevichdmitry e44b3e8
add secrets reuse workflow
gurevichdmitry fea2a2e
Merge pull request #198 from gurevichdmitry/upgade-workflow
gurevichdmitry a8b333d
Merge branch 'main' into upgade-workflow
gurevichdmitry ff4c2f0
update release version calculation
gurevichdmitry 451b87d
Merge branch 'elastic:main' into main
gurevichdmitry 22f0d2f
Merge branch 'main' into upgade-workflow
gurevichdmitry 655734c
remove usage of override docker image for released version provision
gurevichdmitry 9a556ca
Merge remote-tracking branch 'origin/upgade-workflow' into upgade-wor…
gurevichdmitry c423776
add custom tags support
gurevichdmitry 4c20a96
update cnvm tag pattern
gurevichdmitry 7d5bf95
update workflows
gurevichdmitry ad41b51
add ec api key support
gurevichdmitry be5efe1
update env var for sanity tests
gurevichdmitry 04dd45c
add upgrade kspm unmanaged agent
gurevichdmitry 80d0a3c
temporary code for testing identity provider
gurevichdmitry 9c5f4bf
add token permissions
gurevichdmitry e6fe3d2
add eks agent upgrade action
gurevichdmitry b69a763
add cnvm agent upgrade
gurevichdmitry 0c53c5a
update file path
gurevichdmitry 602a4a8
update file path
gurevichdmitry e8a35af
add sanity checks after upgrade
gurevichdmitry c043e0a
update jobs dependency and add prev stack version
gurevichdmitry ce53d90
add upgrade all linux agents
gurevichdmitry 65d65cc
add logging to upgrade agents events and waiter for packages upgrade
gurevichdmitry dd5a57f
change logic to update agents one by one
gurevichdmitry 23bd735
Merge branch 'main' into upgade-workflow
gurevichdmitry b301999
replace raise error by logging warning message
gurevichdmitry 6060df1
Merge remote-tracking branch 'origin/upgade-workflow' into upgade-wor…
gurevichdmitry 7642fb9
adding readme file
gurevichdmitry 7e68bb7
Merge branch 'main' into upgade-workflow
gurevichdmitry 6ea8e0f
update sleep timeout
gurevichdmitry 4ade8f2
Merge branch 'main' into upgade-workflow
oren-zohar 1ef9a5d
Update deploy/test-environments/fleet_api/src/upgrade_cnvm.py
gurevichdmitry 0b8e5e9
fix review comments
gurevichdmitry a836b70
Merge branch 'main' into upgade-workflow
gurevichdmitry 1f6dec2
Merge branch 'main' into upgade-workflow
gurevichdmitry da16cbd
update sanity checks query
gurevichdmitry 4530cb3
Merge branch 'main' into upgade-workflow
gurevichdmitry 3437871
update azure integration
gurevichdmitry d3620ee
update test environment
gurevichdmitry 711502f
add version
gurevichdmitry edeb72c
set sanity checks to false for released version
gurevichdmitry a04a5aa
Merge branch 'main' into upgade-workflow
gurevichdmitry a0abfbc
added comment regarding the issue
gurevichdmitry be47006
Merge remote-tracking branch 'origin/upgade-workflow' into upgade-wor…
gurevichdmitry 589eb79
Merge branch 'main' into upgade-workflow
gurevichdmitry 55af83d
Merge branch 'main' into upgade-workflow
gurevichdmitry eeb1595
fix review comments
gurevichdmitry 14128d0
Merge branch 'main' into upgade-workflow
gurevichdmitry 9c5fe37
Merge branch 'main' into upgade-workflow
gurevichdmitry b862d50
update script name and add comments
gurevichdmitry 8fc93c8
Merge remote-tracking branch 'origin/upgade-workflow' into upgade-wor…
gurevichdmitry a19fbdc
update code after resolving conflicts
gurevichdmitry 63cf6b2
update test environment default stack version
gurevichdmitry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
# Calculate Previous Version | ||
# | ||
# This script takes a version as input, calculates the previous version, | ||
# fetches the corresponding release version from Elastic snapshots, | ||
# and outputs the previous version. | ||
# | ||
# Usage: ./get_previous_version.sh <version> | ||
# | ||
# Example: | ||
# ./get_previous_version.sh 8.12.0-SNAPSHOT | ||
|
||
# Input: version to calculate previous version | ||
VERSION="$1" | ||
|
||
# Extract the major and minor versions | ||
MAJOR_VERSION=$(echo "$VERSION" | cut -d'.' -f1) | ||
MINOR_VERSION=$(echo "$VERSION" | cut -d'.' -f2) | ||
|
||
# Calculate the previous version (assuming it's always X.(Y-1)) | ||
PREVIOUS_VERSION="$MAJOR_VERSION.$((MINOR_VERSION - 1))" | ||
|
||
URL="https://snapshots.elastic.co/latest/$PREVIOUS_VERSION.json" | ||
|
||
# Use curl to fetch the JSON data | ||
JSON_RESPONSE=$(curl -s "$URL") | ||
|
||
# Get latest snapshot version | ||
SNAPSHOT_VERSION=$(echo "$JSON_RESPONSE" | jq -r '.version') | ||
|
||
# Check if SNAPSHOT_VERSION is empty | ||
if [ -z "$SNAPSHOT_VERSION" ]; then | ||
# Log an error message with variable values | ||
echo "Error: The release version corresponding to $PREVIOUS_VERSION could not be found." >&2 | ||
exit 1 | ||
fi | ||
|
||
# Split the version into major, minor, and patch parts | ||
IFS='.-' read -ra PARTS <<<"$SNAPSHOT_VERSION" | ||
MAJOR="${PARTS[0]}" | ||
MINOR="${PARTS[1]}" | ||
PATCH="${PARTS[2]}" | ||
|
||
# Decrement the patch version by 1 | ||
PATCH=$((PATCH - 1)) | ||
|
||
# Format the previous version | ||
PREVIOUS_VERSION="$MAJOR.$MINOR.$PATCH" | ||
|
||
# Output the previous version | ||
echo "$PREVIOUS_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the default version to 8.11?