This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NonCPS | |
def parseJson(txt){ | |
def lazyMap = new groovy.json.JsonSlurper().parseText(txt) | |
def map = [:] | |
for ( prop in lazyMap ) { | |
map[prop.key] = prop.value | |
} | |
return map; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
printf "\nInstalling Android SDK as a Jenkins Custom Tool\n" | |
printf "WARNING: Remember that to run Android SDK tools you must first add support for 32 bit binaries to your slave -e.g. For AWS Linux \n\t yum install glibc.i686 \n\t yum install libzip.i686 \n\n" | |
pwd | |
ls -la | |
if [ ! -d build-tools ]; | |
then | |
printf "There's no dir by the name 'build-tools' on this agent yet. Will proceed to install the Android SDK.\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
try { | |
window.prompt('Shareable link to this event:', 'https://www.google.com/calendar/event?eid=' + document.getElementsByClassName('ep')[0].getAttribute('data-eid')) | |
} catch (e) { | |
alert("Use this bookmarklet to get a shareable link to a Google Calendar event when editing its Details page.") | |
} | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir(visualizerWorkspace){ | |
bat("rm HeadlessBuild-Global.properties") | |
writeFile( | |
file: 'HeadlessBuild-Global.properties', | |
text: ''' | |
workspace.location=c:/Jenkins/workspace/AFS-2.0/android-native-build/vis-workspaces/work-DigitalOperator | |
eclipse.equinox.path=C:/KonyVisualizerEnterprise7.3.0/Kony_Visualizer_Enterprise/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkout([ | |
$class: 'GitSCM', | |
branches: [ | |
[name: '*/branchname'] | |
], | |
doGenerateSubmoduleConfigurations: false, | |
extensions: [ | |
[ | |
$class: 'RelativeTargetDirectory', | |
relativeTargetDir: 'MyDirectory' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
properties([ | |
parameters([ | |
[ | |
$class: 'CredentialsParameterDefinition', | |
name: 'GIT_CREDENTIALS', | |
credentialType: 'com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl', | |
defaultValue: params.GIT_CREDENTIALS?params.GIT_CREDENTIALS:'', | |
description: 'Credentials for Github.', | |
required: true | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.UUID | |
def command(command) { | |
def uuid = UUID.randomUUID() | |
def filename = "cmd-${uuid}" | |
echo(filename) | |
def cmd = "${command} > ${filename}" | |
isUnix()?sh(cmd):bat(cmd) | |
def result = readFile(filename).trim() | |
isUnix()?sh("rm ${filename}"):bat("del ${filename}") |
NewerOlder