Skip to content
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

Add Jenkins job for scaling agents #6886

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

XinShuYang
Copy link
Contributor

  • The script facilitates scaling of Jenkins agents by allowing both adding agents and removing agents. It integrates with GCP and the Jenkins API to add or remove agents dynamically based on the queue load, improving testbed efficiency.

  • The add_agent function scales up the Jenkins agents by checking if jobs with the specified label are present in the Jenkins queue. If jobs are found, it creates a new GCP VM, waits for the external IP to become available, and registers the new agent with Jenkins.

  • The remove_agent function scales down the Jenkins agents by identifying idle agents. It removes the agent from Jenkins and deletes the associated VM, ensuring that only idle agents are removed, preventing any disruption to ongoing jobs.

* The script facilitates scaling of Jenkins agents by allowing both adding agents and removing agents.
It integrates with GCP and the Jenkins API to add or remove agents dynamically based on the queue load, improving testbed efficiency.

* The `add_agent` function scales up the Jenkins agents by checking if jobs with the specified label are present in the Jenkins queue.
If jobs are found, it creates a new GCP VM, waits for the external IP to become available, and registers the new agent with Jenkins.

* The `remove_agent` function scales down the Jenkins agents by identifying idle agents.
It removes the agent from Jenkins and deletes the associated VM, ensuring that only idle agents are removed, preventing any disruption to ongoing jobs.

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant