Skip to content

Instantly share code, notes, and snippets.

Rafael M. Pestano rmpestano

Block or report user

Report or block rmpestano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rmpestano / Jenkinsfile.adoc
Last active Apr 23, 2019
Java maven jenkinsfile
View Jenkinsfile.adoc
pipeline {
    agent any
    tools {
        maven 'apache-maven-3.3.9'
        jdk 'jdk1.8'
    stages {
        stage('Build') {
            steps {
View remove accents.adoc
private String removeAccents(String str) {
        return Normalizer.normalize(str, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
View gist:8ca08cc5c99c0016fe1bb330e461d6b7
kubectl patch deployment cdi-crud -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
sudo curl -Lo minikube \
&& sudo chmod +x minikube && sudo cp minikube /usr/local/bin && rm minikube && minikube version
rmpestano / gist:1373c09242778926b4e5384e986696fd
Created Jan 7, 2019
Configure Docker on ubuntu under corporate proxy
View gist:1373c09242778926b4e5384e986696fd
== Install
sudo apt-key adv --keyserver hkp:// --keyserver-options http-proxy=localhost:3128 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-get install docker-ce
== Proxy config
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo gedit /etc/systemd/system/docker.service.d/http-proxy.conf
rmpestano / jenkinsfile.adoc
Last active Nov 12, 2018
input+when condition in a declarative pipeline
View jenkinsfile.adoc
pipeline {
    agent none

    //other stages

    stage("Stage ok") {
        agent any
           when {
	      expression {
View netbeans-setup.adoc
  1. Change auto popup config at Tools → Options → Editor → Code completion

  2. Install autosave plugin;

  3. Enable terminal at Window → IDE tools → terminal;

  4. Install git toolbar;

  5. Install Dracula theme;

  6. Adjust identation at Tools → Options → Editor → Formatting

rmpestano / sendEmail.groovy
Last active Apr 12, 2018
sendMail jenkins shared library
View sendEmail.groovy
#!/usr/bin/env groovy
* This shared lib depends on emailExt plugin
* Usage:
post { //after build
changed { //if status changed then send email
rmpestano / qualityGates.groovy
Last active Apr 12, 2018
Jenkins Sonar quality gates integration via shared library
View qualityGates.groovy
#!/usr/bin/env groovy
* Fails the pipeline if project quality doesn't meet the configured quality profile (see AND
* This DSL function must be invoked after the quality analisys has been published. Example:
* stage('sonar') {
* steps {
* withSonarQubeEnv('sonar') { //there must be a tool named 'sonar' configured on Jenkins (/jenkins/configureTools)
* sh 'mvn sonar:sonar' //publish project quality on sonar
rmpestano / arquillian-detect-mode.adoc
Last active Aug 8, 2017
Arquillian detect run mode
View arquillian-detect-mode.adoc
You can’t perform that action at this time.