Skip to content

Instantly share code, notes, and snippets.

View snallami's full-sized avatar

Suresh Nallamilli snallami

  • Los angeles, CA
View GitHub Profile
Set-ExecutionPolicy Unrestricted
# Jenkins plugin will dynamically pass the server name and vm name.
# If your jenkins server is configured for security , make sure to edit command for how slave executes
# You may need to pass credentails or secret in the command , Refer to help by running "java -jar slave.jar --help"
$jenkinsserverurl = $args[0]
$vmname = $args[1]
# Download the file to a specific location
Write-Output "Downloading zulu SDK "
@snallami
snallami / configuire.cmd
Created June 17, 2014 01:13
Reconfigure cygwin
rem This script reconfigures the Cygwin sshd service.
rem It regenerates the computer's host keys. This is necessary
rem when Sysprep is run and a new SID is generated.
@echo off
echo Stopping the Cygwin sshd service...
net stop sshd
echo ERRORLEVEL: %ERRORLEVEL%
03f55de797f546a1b29d1b8d66be687a__Visual-Studio-14-Professional-CTP-14.0.21730.1-AzureSDK-2.3-WS2012R2--->Visual Studio Professional 14 CTP on Windows Server 2012 R2-->Windows
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.2-x64-v5.8.8.1--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.5--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.6--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.7--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.8--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.3-x64-v5.8.8.9--->RightScale Linux v13-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.4--->-->Linux
0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.5
@snallami
snallami / hudson
Last active August 29, 2015 14:05
Hudson JNLP init script
Set-ExecutionPolicy Unrestricted
# Hudson plugin will dynamically pass the server name and vm name.
$hudsonserverurl = $args[0]
$vmname = $args[1]
# Download the file to a specific location
Write-Output "Downloading zulu SDK "
$source = "http://azure.azulsystems.com/zulu/zulu1.7.0_51-7.3.0.4-win64.zip?jenkins"
mkdir c:\azurecsdir
@snallami
snallami / gist:121a305ab7fd96c516fd
Created August 22, 2014 17:53
JNLP without auth
Set-ExecutionPolicy Unrestricted
# Jenkins plugin will dynamically pass the server name and vm name.
# If your jenkins server is configured for security , make sure to edit command for how slave executes
# You may need to pass credentails or secret in the command , Refer to help by running "java -jar slave.jar --help"
$jenkinsserverurl = $args[0]
$vmname = $args[1]
# Download the file to a specific location
Write-Output "Downloading zulu SDK "
@snallami
snallami / gist:16bb02ba58e0b79e89db
Last active August 29, 2015 14:05
Debug JNLP connectivity issues for azure slave plugin
Following tips may help to debug issues with JNLP launch method from Jenkins
for Azure slave plugin.
1) If using custom image, make sure that custom image does not already contain
custom script extension i.e. while creating VM from platform images don’t
enable custom script.
2) Check if custom script got executed or not.
We can check in two ways.
1) Download dependencies
mvn dependency:copy-dependencies.
2) Install jar to maven repo locally
e.g. mvn install:install-file -Dfile=C:/gitbuild/myJar.jar -DgroupId=com.devruntime -DartifactId=sample -Dversion=0.1.0-SNAPSHOT -Dpackaging=jar
@snallami
snallami / Jenkins build log
Created January 22, 2015 01:41
Jenkins build log
SEVERE: Timer task hudson.model.LoadStatistics$LoadStatisticsUpdater@4c786d54 failed
java.lang.ExceptionInInitializerError
at hudson.model.OverallLoadStatistics.computeTotalExecutors(OverallLoadStatistics.java:63)
at hudson.model.LoadStatistics.updateExecutorCounts(LoadStatistics.java:188)
at hudson.model.LoadStatistics$LoadStatisticsUpdater.doRun(LoadStatistics.java:226)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at com.thoughtworks.xstream.core.util.OrderRetainingMap.entrySet(OrderRetainingMap.java:77)
@snallami
snallami / jenkins tips
Last active November 5, 2015 21:03
Jenkins useful tips
1) Groovy script to change build display value
// get current build
def build = Thread.currentThread().executable
// get new value for build
def newBuildName = build.getEnvironment().get('newDisplayVersionj')
// set new display name
try {
@snallami
snallami / gist:3114ee0b70651599aa04
Created September 21, 2015 01:05
Reset jenkins node lables
jenkins.model.Jenkins.instance.labels.each { it.reset() }