• Stars
    star
    671
  • Rank 64,626 (Top 2 %)
  • Language
    Groovy
  • License
    MIT License
  • Created over 8 years ago
  • Updated 22 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

More Repositories

1

groovy-cps

Groovy execution in the continuation passing style
95
star
2

plantuml-github-action

GitHub action for PlantUML tool
Dockerfile
47
star
3

cloudbees-examples

Public repository - Examples for documentation
Java
35
star
4

jenkins-docker-executors

A docker image - which allows jenkins to run docker containers inside it
Shell
29
star
5

diff4j

Pure-Java diff/patch implementation
Java
23
star
6

pipeline-editor-plugin

Proof of Concept plugin for visual workflow editing
JavaScript
17
star
7

ps-examples

Shell
13
star
8

blueocean-docker-image

Shell
13
star
9

jenkins-docker

Docker image definition for jenkins - run jenkins in Docker
Shell
11
star
10

junit-standalone-runner

Single jar file to execute all your packaged JUnit4 tests
Java
9
star
11

jenkins-scalability-lab

Jenkins scalability lab work
Groovy
8
star
12

terraform-aws-cloudbees-ci-eks-addon

CloudBees CI Add-on for AWS EKS
HCL
8
star
13

jenkins-docker-registry-builder

Builder that works with Docker private and public registry (called "The Index"). Builds projects with a Dockerfile in the root using docker.
Java
7
star
14

vietnam4j

A library that lets you embed a web application inside another web application (aka proxy war)
Java
5
star
15

quickstart-cloudbees-ci

AWS Quick Start Team
5
star
16

devoptics-quickstart-app

Your first DevOptics application
Java
4
star
17

jetty-redis

redis session persistent store for jetty module
Java
4
star
18

jetty-redis-sessions

A SessionDataMap implementation for Jetty 9.4.x that uses Redis
HTML
4
star
19

user-activity-monitoring-scripts

Scripts for the User Activity Monitoring plugin
Groovy
3
star
20

unicorn-project-review

Book review of The Unicorn Project by Gene Kim
3
star
21

elasticsearch-reporter-examples

Examples of ELK deploys
HCL
3
star
22

lighthouse-githubapp

a multi tenant GitHub App version of lighthouse for the SaaS
Go
3
star
23

training-pipeline-libs

This is a collection of libraries for the Pipeline Trainings
Groovy
2
star
24

arcalos-boot-config

Shell
2
star
25

cloudbees-oss-parent

The parent project for CloudBees open source projects
2
star
26

plugin-dependency-analyzer

Java
2
star
27

groovy-cps-dgm-builder

Generate CpsDefaultGroovyMethods for groovy-cps
2
star
28

training-core-fundamentals-sample-1

Core Fundamentals Sample Repo 1
Shell
1
star
29

support-interview-app

Java
1
star
30

packer-dockerfile

CloudBees Docker image with Packer and Packer Azure
1
star
31

openid4java-team-extension

Team extension support for the openid4java library
Java
1
star
32

blueocean-demo-data

Groovy
1
star
33

git-secrets

Shell
1
star
34

autochangelog-maven-plugin

Automatically captures a JSON formatted changelog of the differences since the last release and attaches to the build
Java
1
star
35

kubernetes-platform-validation

Repository to validate platforms used by customers, and document findings
HCL
1
star