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
//tested with Jenkins v 2.222.1 | |
import hudson.model.* | |
def hudson = hudson.model.Hudson.instance | |
def globalProps = hudson.globalNodeProperties | |
def props = globalProps.getAll(hudson.slaves.EnvironmentVariablesNodeProperty.class) | |
for (nodeproperty in props) | |
{ | |
//println(nodeproperty.getEnvVars()); | |
globalEnvVars=nodeproperty.getEnvVars() | |
} |
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
/*** BEGIN META { | |
"name" : "wip_renameJobParameter", | |
"comment" : "Assembles new job parameters from other jobs", | |
"parameters" : [ 'newJobNameString','appendModeBoolean','sourceDataJson'], | |
"core": "2.121", | |
"authors" : [ | |
{ name : "Ioannis K. Moutsatsos" } | |
] | |
} END META**/ |
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
/* | |
An example Groovy script on how to merge json/map entries | |
that match by one or more key-value criteria | |
The resulting merged entry has identical key-values for the matched criteria | |
and generates a list of comma separated values for the remaining criteria | |
*/ | |
PLAN_ENTRIES=""" | |
{ | |
"planActions": [ | |
{ |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<html> | |
<head> | |
<style> | |
rect.bordered { | |
stroke: #E6E6E6; | |
stroke-width:2px; | |
} |
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
pipeline | |
{ | |
agent | |
{ | |
node | |
{ | |
label params.NodeLabel | |
// this whole construction is meant to select the node using its label 7g ry04 ry03 | |
} | |
} |
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
/* | |
we remove by key .remove(key) | |
The example below removes adds a new 'MY_TEST2' and remove 'MY_TEST' | |
*/ | |
def hudson = hudson.model.Hudson.instance | |
def globalProps = hudson.globalNodeProperties | |
def props = globalProps.getAll(hudson.slaves.EnvironmentVariablesNodeProperty.class) | |
// println hudson.model.Hudson.instance.globalNodeProperties |
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
from PIL import Image | |
import urllib2 | |
#your proxy may be http ot https, try both | |
proxy = urllib2.ProxyHandler({'https': 'proxyserver:port'}) | |
opener = urllib2.build_opener(proxy) | |
urllib2.install_opener(opener) | |
iiifURI='http://yourServer:8182/iiif/2/%2F%2Fimage%2Fidentifier.tif/full/full/0/default.jpg' | |
imageFile = urllib2.urlopen(iiifURI) | |
img= Image.open(imageFile) | |
img |
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
/*** BEGIN META { | |
"name" : "copyServerStaticArtifact", | |
"comment" : "Copies an artifact from a folder (typically in JENKINS_HOME) to a folder in the executing job's WORKSPACE", | |
"parameters" : [ 'artifactFilter','contentFolder','targetFolder'], | |
"core": "2.100", | |
"authors" : [ | |
{ name : "Ioannis K. Moutsatsos" } | |
] | |
} END META**/ |
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
/*** BEGIN META { | |
"name" : "imageGalleryFromtemplate", | |
"comment" : "Generate parametrized HTML from a image grid Openseadragon template", | |
"parameters" : [ 'vTemplateURLPath','vOutfolder','vIMAGELIST_URL','vIMAGE_OBJECTS','vTEST_IMAGES','vIMAGE_GALLERY','vPRIMARY_IMAGE_LIST','vJOB_PATH','vIMAGE_ADJUSTMENTS','vBUILD_LABEL'], | |
"core": "1.596", | |
"authors" : [ | |
{ name : "Ioannis K. Moutsatsos" } | |
] | |
} END META**/ |
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
/* | |
Template text made into javascript after Groovy Processing | |
functions supporting loading, layout, Colorization and | |
adjustments/filtering of image sets into Openseadragon iiif viewer | |
Supports channel overlay with opacity controls | |
@author: Ioannis K. Moutsatsos | |
@lastUpdate: FEB-27-2018 | |
*/ |