Skip to content

Instantly share code, notes, and snippets.

View IreshMM's full-sized avatar
🎯
Focusing

Iresh Dissanayaka IreshMM

🎯
Focusing
  • Anuradhapura, Sri Lanka
  • 20:53 (UTC +05:30)
View GitHub Profile
@gwsu2008
gwsu2008 / jenkins-auto-approve-script.groovy
Created June 3, 2020 06:15
jenkins-auto-approve-script.groovy
import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval
ScriptApproval scriptApproval = ScriptApproval.get()
scriptApproval.pendingScripts.each {
scriptApproval.approveScript(it.hash)
}
/* Script to clear script approval
$JENKINS_HOME/init.groovy.d/disable-script-security.groovy:
*/
@jonico
jonico / Jenkinsfile
Last active May 11, 2024 09:58
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@shamil
shamil / mount_qcow2.md
Last active July 4, 2024 08:58
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8