Skip to content

Instantly share code, notes, and snippets.

@mihaiparv
mihaiparv / LockableResourcesHelper.groovy
Created September 27, 2017 11:35 — forked from glance-/LockableResourcesHelper.groovy
Helper pipeline library for label based locking in jenkins pipeline
// vim: noet sw=4 ts=4 cindent
// This is a helper that runs as privileged code, to get the LockableResource to pipeline jobs
package PipelineHelpers;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted
// Wrapper class to expose a safe subset to the client code
class LockableResourcesHelper implements Serializable {
@mihaiparv
mihaiparv / docker-compose.yml
Created September 21, 2016 08:04
JMX config for tomcat in docker
version: "2"
services:
web:
image: tomcat:8.5-alpine
ports:
- 8080:8080
- 9999:9999
environment:
- CATALINA_OPTS=-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.rmi.port=9999 -Djava.rmi.server.hostname=0.0.0.0
<profiles>
<profile>
<id>ci</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<reportsDirectory>${project.build.directory}/test-reports</reportsDirectory>
@mihaiparv
mihaiparv / gist:834aa170f51690abfc3c
Last active August 29, 2015 14:17
Configuration management with Ansible - demo commands
# set-up authetication using the private key of the vagrant box
ssh-agent zsh
ssh-add .vagrant/machines/default/virtualbox/private_key
# test the connectivity / authentication
ansible all -i "192.168.120.10," -u vagrant -m ping
# ansible command line shell module basic usage
ansible all -i "192.168.120.10," -u vagrant -m shell -a "date"
ansible all -i "192.168.120.10," -u vagrant -m shell -a "uname -a"