-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: Add Scripts to Automate Tasks in KLM #2061
base: main
Are you sure you want to change the base?
feat: Add Scripts to Automate Tasks in KLM #2061
Conversation
7049bf1
to
31ff0c8
Compare
31ff0c8
to
e959571
Compare
@@ -1,177 +1,171 @@ | |||
{ |
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.
why are the changes here?
@@ -0,0 +1,6 @@ | |||
#!/bin/bash |
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.
May be rename the file to clusters_cleanup.
@@ -0,0 +1,6 @@ | |||
#!/bin/bash | |||
|
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.
since this is a script now, we can reference it in the tasks.json as well as the Delete Test Clusters.run.xml instead of running the command there.
and the same applies for the other scripts.
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.
When I try to run this script (and the new ones), I get permission denied. I think you need to run chmod +x <script_name> for each
#!/bin/bash | ||
|
||
# TODO: where to extract the latest version of the tools from? | ||
|
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.
I think you should move this to the tests folder as well
|
||
echo "Enter the KLM Image Tag (e.g., latest):" | ||
read KLM_IMAGE_TAG | ||
while [[ "$#" -gt 0 ]]; do |
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.
We need to throw some error or indicate that these fields are required because otherwise the image name and tag will be applied in a wrong way
exit 1 ;; | ||
esac | ||
shift | ||
done |
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.
you also need to cd to the project root
@@ -0,0 +1,17 @@ | |||
#!/bin/bash | |||
|
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.
there is no need for this script since we will be removing the module templates in the e2e folder anyway
@@ -3,9 +3,15 @@ | |||
# Change to the directory where the script is located | |||
cd "$(dirname "$0")" | |||
|
|||
./../version.sh |
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.
IMO this should be optional, may be add a new argument to the script to have the option to validate the version or not.
fi | ||
|
||
# Versions installed on current system | ||
KUBECTL_VERSION_INSTALLED=$(kubectl version --client | head -n1 | awk '{print $3}' | sed 's/v//') |
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.
I am getting
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Invalid kubectl version: ersion.Info{Major:"1",
Related issue(s)
Resolves #1802