Skip to content

Instantly share code, notes, and snippets.

View snallami's full-sized avatar

Suresh Nallamilli snallami

  • Los angeles, CA
View GitHub Profile
@snallami
snallami / gist:33b2d7210db6e326d9cb
Created September 21, 2015 17:24
Jenkins shortcuts
https://jenkins1.prodwest.citrixsaassbe.net/jenkins/ajaxBuildQueue
sud0 -i
yum update -y
# Get Jenkins repository
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
# Get jenkins repository key
rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key
# install jenkins
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }
@snallami
snallami / gist:bd1a8018a624375b33c0
Last active November 4, 2015 22:41
my random Artifactory notes
1) Linux. Artifactory start/stop
# To Start
$ARTIFACTORY_HOME/bin/artifactory.sh (concole)
$ARTIFACTORY_HOME/bin/artifactoryctl start (daemon)
$ARTIFACTORY_HOME/bin/installService.sh [USER [GROUP]] (service)
$ARTIFACTORY_HOME/bin/artifactoryctl check | stop
2) Install script
Creates the folder /etc/opt/jfrog/artifactory, copies the configuration files there and creates a soft link in$ARTIFACTORY_HOME/etc
@snallami
snallami / gist:0670546d66dfb2ed5219
Last active December 17, 2015 05:57
my booksmarks
1) http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html
2) Jenkins SSH slaves
https://docs.google.com/document/d/1Qq-EkiUnC5x8BuM4AZWo-yRUQTrkberzz8JfdCM6yuc/edit
3) http://techblog.roomkey.com/posts/too-many-files.html
import hudson.model.*
disableChildren(Hudson.instance.items)
def disableChildren(items) {
def daysToKeep = 14
def numToKeep = 10
def artifactDaysToKeep = -1
def artifactNumToKeep = -1
@snallami
snallami / Update Jenkins Label
Created June 3, 2016 20:35
Groovy script to update jenkins label
import hudson.model.*
import hudson.model.labels.LabelAtom
updateJenkinsLabel(Hudson.instance.items,"<Replace With Old Label>", "<Replace With new Label")
def updateJenkinsLabel(items, oldLabel, newLabel) {
for (item in items) {
// Find out if it is a folder
if (item.class.canonicalName != 'com.cloudbees.hudson.plugins.folder.Folder') {
1) Overide entry point of docker image
docker run -ti --entrypoint=/bin/bash my/image -s
Install .NET from command line
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
@snallami
snallami / gist:06b3d28078f769eb6c8523ee7724869a
Created August 2, 2016 17:29
Copy jenkins config.xml only
rsync -am --include='config.xml' --include='*/' --exclude='*' Source/ Destination/