-
Notifications
You must be signed in to change notification settings - Fork 23
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
Test clean for resubmission pipeline #1292
base: master
Are you sure you want to change the base?
Conversation
2fed09e
to
18b49f5
Compare
7e75787
to
3371f7e
Compare
d64e530
to
cc2d8d4
Compare
b6c62a8
to
86ac92e
Compare
Save terraform state in resultdir.
86ac92e
to
f1bfbf7
Compare
bbddf5c
to
9dc36e5
Compare
9dc36e5
to
df15baa
Compare
stage('Delete client VMs') { | ||
|
||
// Construct the --tf-resources-to-delete argument dynamically | ||
ArrayList tfResourcesToDelete = [] |
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.
Maybe we can reuse the lists at line 20 and 31.
|
||
## Prerequisites | ||
|
||
- **Python 3**: Ensure Python 3 is installed. |
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 see we use Python 3.11 in CI.
Do we specifically need at least that version or will any (reasonably recent) Python 3.X be fine ?
class ResourceManager: | ||
def __init__(self, manager_url, resources_to_delete, product_version): | ||
self.manager_url = manager_url | ||
self.resources_to_delete = {"proxy", "monitoring", "build"} - set(resources_to_delete) |
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.
Is the naming off and the set difference are actually resources to protect ?
if self.product_version == "uyuni": | ||
channels = self.client.channel.listMyChannels(self.session_key) | ||
for channel in channels: | ||
if "custom" in channel['label'] and not any(protected in channel['label'] for protected in self.resources_to_delete): |
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.
Not strictly necessary and can always be done later on, as refactor/improvement.
We can probably have a private function to delete channels that takes a few parameters and replaces this code blocks.
What does this PR ?
This PR gives the possibility to automatically handle the tools resubmission in the context of a release testing using BV.
In this PR there are two parts :
New cleanup pipeline ( for now 4.3 NUE and PRV )
What does this pipeline
Create a pipeline able to clean the server artifacts created during a BV run.
This pipeline will also redeploy the current clients using the new terracumber functionalities to modify a main.tf file.
What does NOT this pipeline
Adding or removing clients from the current deployment.
Redeploying monitoring and proxy.
New python scripts
SUSEManagerCleaner.py
Organize the modules and arguments.
suse_manager_api.py
Call the API ( from controller ) to clean the server artifacts.
suse_manager_ssh.py
Unfortunately, we require a ssh connection to server to remove the know hosts because the clients are fresh deployment.
Could be manage directly in groovy step if we don't want to add this python script.
Testing
Currently tested for debugging BV 4.3 NUE and PRV
Pipeline url : https://ci.suse.de/view/Manager/view/Manager-4.3/job/manager-4.3-qe-build-validation-NUE-cleaning/
What is missing ?
Issues
Related to: