Skip to content

Instantly share code, notes, and snippets.

Marcus Philip marcusphi

Block or report user

Report or block marcusphi

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
View JenkinsScriptedPipelineCleanupLockableResources.groovy
* Clean all non-locked lockable resources from Jenkins config.
* Rationale: When using lock function in pipeline with a dynamic string that will have many values
* over time, the Jenkins global configure page is filled with lockable resources.
* @param mailTo String - Comma separated list of email addresses to mail upon error
def cleanLockableResources(String mailTo) {
try {
View JenkinsJobDslCleanupLockableResources.groovy
def myFolder = "JobDSL"
def myJob = 'maintenance-LockableResourceGC'
def mailTo = '' // Whitespace-separated list of recipient addresses
pipelineJob("${myFolder}/${myJob}") {
description("""Cleanup lockable resources on a scheduled basis\n""" + generatedByString())
logRotator { numToKeep(10) }
// TRIGGERS ------------------------
triggers {

Keybase proof

I hereby claim:

  • I am marcusphi on github.
  • I am marcus_phi ( on keybase.
  • I have a public key ASAOyy9nbBac2_a4cE7ZaTSC6yLx8hNiTXy7eTJuRotuVQo

To claim this, I am signing this object:

marcusphi / puppet_jdk_rpm_fails.txt
Created Jan 13, 2016
puppet jdk rpm install fails silently
View puppet_jdk_rpm_fails.txt
Puppet code:
package { 'jdk-1.7.0_80-fcs.i586':
provider => 'rpm',
source => '/etc/puppet/modules/jdk/files/jdk-7u80-linux-i586.rpm',
#Get rpm manually:
wget --no-cookies --no-check-certificate --header "Cookie:; oraclelicense=accept-securebackup-cookie" ""
marcusphi / ansible_conditionals_examples.yaml
Created Oct 2, 2013
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
View ansible_conditionals_examples.yaml
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
You can’t perform that action at this time.