• Stars
    star
    166
  • Rank 221,058 (Top 5 %)
  • Language
    Groovy
  • Created about 9 years ago
  • Updated over 4 years ago

Reviews

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

Repository Details

A repo of useful groovy init scripts for working with jenkins hooks..

Useful Jenkins groovy init Scripts

Jenkins allows adding groovy scripts for initialization, which means these scripts will run every time Jenkins starts.

How this works?

The jenkins server automatically looks for groovy.d folder under the home dir of where Jenkins run from e.g. /var/lib/jenkins/groovy.d or /root/.jenkins/groovy.d if running in a container, and any groovy script in folder get executed anytime jenkins starts.

Why use the scripts?

Its a pretty handy way of automating Jenkins installation; lets say you want your CI setup to be automated, like everytime you install your jenkins environment, it should be pre-configured with certain user accounts created, have LDAP configured automatically or some global properties set.

Groovy is an easy way of calling Jenkins base classes of Java without getting to know much of Java itself ;)

What scripts are in this repo?

I have scripts for :

  1. Creating user accounts.
  2. Creating global credentials (for ssh , username/password etc).
  3. Getting the API key of a user ( this is pretty useful because if you use (Jenkins Job Builder )[https://github.com/openstack-infra/jenkins-job-builder.git] for setting up your CI , for the credential .ini file , you will need the API key so why not get it from a groovy script :) )
  4. Setting the global security , either LDAP , or jenkins own database etc.
  5. Setting global authorization matrix for groups like anonymous, authenticated or any specific user.
  6. Get a credential ID of a global credential, again extremely useful when you use Jenkins Job BUilder and in git SCM, you need to specify (Credential ID of ssh key for git to use in cloning some private repos)[http://docs.openstack.org/infra/jenkins-job-builder/scm.html], this script will do it for you .

Cheers :)

More Repositories

1

advanced-socket-programming

Advanced socket concepts like SCTP. IPv6/IPv4 TCPDaytime client/server, Thread-safe version of gethostbyaddr() etc
C
18
star
2

sdn-pox-firewall

SDN POX Openflow Firewall assignment solution code
Python
4
star
3

cs6320_fbapp_gae

This is the class exercise of CS6320 of deploying a simple fb app running on Google app engine. This app lets you post a status or share it in a message.
JavaScript
4
star
4

FTP_project

FTP client Server implementation on Amazon AWS.
C
3
star
5

matlab_gui_waveform_generator

A Matlab gui based waveform generator. Simply run the file, and define parameters like frequency, number of cycles and type of waveform (sine,cos,pwm etc) then click START. Also, when trying to generate new waveform, you need to press STOP, the go ahead with new waveform just like you did before. Cheers ;)
3
star
6

hubot-hipchat-docker

A docker container to start hubot hipchat with redis using supervisord
2
star
7

url-image-crawler-flask-celery

Python
1
star
8

Programming-Books

PDF's of different coding books
1
star
9

c--lexical-analyzer

This is solution to an assignment question :
C++
1
star
10

cs6320_project1_fbtwitterapp

Source Code for CS6320 Project 1 FB Twitter App
Java
1
star
11

scala-algos

a collection of program to use selection sort ,bubbleSort ,insertionSort and quicksort to sort a list of integers in increasing order in scala.
Scala
1
star
12

digital-audio-sampler

A python project I did to perform digital audio analysis and sampling of a 22050 Hz audio wave file. The file is converted into samples using the pythn programs included.
1
star