Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
ZachDZimmerman Merge pull request #94 from ZachDZimmerman/master
Script to get builds that take longer than 24 hours to run
Latest commit dc021da Feb 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images add authentication mapping details Feb 6, 2016
.gitignore
CleanBuildHistory.groovy Update CleanBuildHistory.groovy Aug 10, 2017
FindAllGroupsInFolders.groovy list all groups in each folder (#30) Oct 6, 2016
GroupsFromLDAP.groovy
LICENSE
PrintSCMPollingSpecs.groovy
ProperlyStopRunningPipelines.groovy Update ProperlyStopRunningPipelines.groovy Jul 27, 2018
RBAC_Example.groovy
README.md
ReloadAllJobsByFolder.groovy
add-templates2folders.groovy
addClientMasterPlus.groovy
auth-project-report.groovy AuthorizationMatrix permission report Sep 26, 2016
cancel-builds-same-job.groovy
cancel-running-builds.groovy
cleanNodes.groovy
copy-move-diagnosis.groovy Copy/Move/Promote diagnosis script. Apr 24, 2016
copyGrpsBetweenFolders.groovy Copy groups or restrictions between folders (#29) Oct 6, 2016
copyRestrictionsBetweenFolders.groovy Copy groups or restrictions between folders (#29) Oct 6, 2016
copyRestrictionsBetweenFolders2.groovy
count-cje-json.groovy
count-cjoc-json.groovy [CE-1763] Fix scripts using MasterClusterOps May 23, 2018
count-executors.groovy first commit Jan 6, 2016
create-controlled-agent.groovy
create-group4template.groovy Propose small spelling corrections Jan 23, 2018
create-palace-template.groovy create a palace template from groovy (#59) Jul 11, 2017
create-shared-agent.groovy
createAgentsScript.groovy update the launchers to the last version by adding the host key verif… Jul 20, 2017
createMesosTemplate.groovy
createPSEManagedMasterFromCode.groovy Initial commit (#91) Nov 27, 2018
deleteAgents.groovy Some scripts related with Agents and Shared Agents (#39) Dec 21, 2016
deleteClienteMaster.groovy
deleteManagedMasterOrTeam.groovy
deleteTemplateAssociation.groovy remove template association from a folder (#44) Feb 9, 2017
disableAgents.groovy Some scripts related with Agents and Shared Agents (#39) Dec 21, 2016
dump-copy-move-error-history.groovy Dump Copy/Move/Promote Error History script. Apr 24, 2016
findAllBuildsThatAreOver24Hours.groovy Script to get builds that take longer than 24 hours to run Feb 21, 2019
findAllTemplatizedJobs.groovy
findAllTemplatizedJobsByFolder.groovy Update findAllTemplatizedJobsByFolder.groovy Feb 24, 2017
findJobHistory.groovy
folder-remove-healthmetrics.groovy
get-License-report.groovy ZD-64247: License Manager Report (#86) Aug 16, 2018
get-build-information.groovy
get-current-queue-state.groovy
get-failed-alerts.groovy
get-groups-cjoc-master.groovy
get-lastlogin-users.groovy Update get-lastlogin-users.groovy Oct 9, 2018
github-enterprise-api-endpoint.groovy
installAvailablePlugins.groovy
job-add-dockerhub-trigger.groovy Create job-add-dockerhub-trigger.groovy Feb 5, 2016
killing-hanging-polling Create killing-hanging-polling Jul 23, 2018
list-credential.groovy List ID and Description of all credentials on a Jenkins Instance. (#50) Apr 11, 2017
listEC2InstancesOnAccount.groovy
listMembersOfaJobGroups.groovy
listNamesMachinesVmwarePool.groovy list machine names from a vmware configuration (#34) Oct 6, 2016
logrotator-config.groovy
mark-login-users.groovy
messaging-dump-cluster-database-CJOC.groovy Fix mixed comments on messaging scripts (#57) Jun 27, 2017
messaging-dump-local-database-CJE-and-CJOC.groovy Fix mixed comments on messaging scripts (#57) Jun 27, 2017
modifiedAnalyticsConfig.groovy
move-copy-promote-simulation.groovy
pipeline-approval-scripts.groovy
print-available-metrics.groovy
print-masters-plugins.groovy Merge pull request #38 from jpbriend/isaac Aug 9, 2018
print-rbac-report.groovy
purge-build-queue-by-name.groovy
rbac-report.groovy Revert RBAC_Example.groovy and rbac-report.groovy Apr 30, 2018
schedule-templatized-jobs.groovy
setOrgFolderIndex.groovy
shared-agent-report-online-busy.groovy
sharedConfigFileProviderConfig.groovy [CE-1763] Fix scripts using MasterClusterOps May 23, 2018
tmp Update tmp Jul 13, 2016
ucStoreAndPromoteWithDependencies.groovy [CE-672] Scripts to find, store, promote a plugin with its dependenci… Jun 23, 2017
updateJobs-fromTemplateA2TemplateB.groovy

README.md

Handy Groovy Scripts for Jenkins and CloudBees Jenkins Platform

The scripts in this repository can be run in Jenkins script console: Manage Jenkins > Script Console. Most work on any Jenkins Enterprise instance, while some are specific to CloudBees Jenkins Operations Center (CJOC).

Count CJOC JSON

The Count CJOC JSON script runs on CJOC's script console. The script captures the executor, cloud, and CPU core count attached to the platform. The script dynamically creates a Cluster Operation and executes the operation across all Client Masters connected to CJOC.

NOTE: The master branch version of the count-cjoc-json.groovy script is for the 1.7.1+ version of the Operations Center Cluster Operations Plugin. If you are on an older version (1.7.0-) then please use the 1.7.0 branch version of the script here.

Running the script

  1. Log into CloudBees Jenkins Operations Center (CJOC)
Note: if you *do not* have CJOC's SSO Feature enabled (configured at: Manage Jenkins > Configure Global Security > Client master security, i.e.: if the setting is "Do not enforce security setting on masters"), you need to ensure the user logging into CJOC also has permissions to execute scripts on the Client Masters. Assuming your CJOC and Client Masters use the same Security Realm and thus a user exists between them with the appropriate permissions, the most straight forward way to do so is to add an Authentication Mapping for the username with those permissions:
<img src="images/5-mapping.png" title="Authentication Mapping" width="500" />
  • You will need to restart CJOC after making the changes.
  1. Click 'Manage Jenkins' on the left-hand panel, followed by the 'Script Console' link

  2. Copy + Paste the script into the console window and click the Run button

  3. Copy + Paste the output into a file and send it to the CloudBees team

You can’t perform that action at this time.