Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Jenkins.instance.pluginManager.plugins.sort { it.getDisplayName() }.each{ | |
plugin -> | |
println ("(${plugin.getShortName()}): ${plugin.getVersion()}") | |
} |
cat 004-HarFile.har | jq '[.log.entries[] | {time: .time, url: .request.url}]' | jq 'sort_by(.time)' > requestTime.json |
1) Need below plugins for shared agents to work | |
Operations Center OpenID Cluster Session Extension | |
Operations Center Cloud | |
CloudBees SSH Build Agents Plugin | |
2) |
Safe alternative: use the host Docker daemon from within a container | |
The simple solution to allow a container process to start another container is to share the Docker socket of the host with the container, doing something like this: | |
docker run -v /var/run/docker.sock:/var/run/docker.sock -d --name some_container some_image | |
Assuming that Docker is installed in the image invoked, then the Docker client run within that container will be communicating with the Docker daemon running on the host. | |
Any containers created from within some_container would actually be created by the same Docker daemon that created some_container itself. Those new containers would be sibling containers, siblings to some_container. | |
Now there should be no worries about data corruption from nested storage drivers, or shared access to the Docker image cache. |
Morning Paper - https://blog.acolyer.org/ | |
Dev - https://dev.to/ | |
http://highscalability.com/ | |
https://www.oreilly.com/ideas | |
https://stratechery.com/ - best tech blog on the Internet. Nothing related to coding but thorough and thoughtful take on every-day-happenings in the tech industry. | |
https://blog.codinghorror.com/ |
<Connector port="80" protocol="HTTP/1.1" | |
connectionTimeout="20000" | |
redirectPort="443" /> | |
<Connector protocol="org.apache.coyote.http11.Http11Protocol" | |
socketBuffer="500000" | |
tcpNoDelay="true" | |
port="443" maxThreads="200" | |
scheme="https" secure="true" SSLEnabled="true" | |
keystoreFile="conf\tomcatNEW.keystore" keystorePass="changeit" |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Jenkins.instance.getTrigger("SCMTrigger").getRunners().each() | |
{ | |
item -> | |
long millis = Calendar.instance.time.time - item.getStartTime() | |
if(millis > (1000 * 60 * 60)) // 1000 millis in a second * 60 seconds in a minute * 3 minutes | |
{ | |
Thread.getAllStackTraces().keySet().each() | |
{ | |
tItem -> |
https://dkbalachandar.wordpress.com/2016/07/05/thread-dump-from-a-docker-container/ | |
Thread & Heap dumps From a Docker container | |
Follow the below steps to take the thread and Heap dumps from a docker container | |
1. Run the below command to bash into the container. Please change the CONTAINER_NAME appropriately | |
docker exec -it CONTAINER_NAME bash |
http://linuxaria.com/howto/linux-memory-management | |
https://linuxaria.com/howto/understanding-the-top-command-on-linux |