Skip to content

Instantly share code, notes, and snippets.

Mikael Östberg O5ten

Block or report user

Report or block O5ten

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
O5ten / Jenkinsfile
Last active Jun 16, 2019
Example jenkinsfile to test some arbitrary output in the log
View Jenkinsfile
pipeline {
parameters {
string(name: 'stuffToCheck', defaultValue: 'Test Failure!,Some Other Failure!', desription: 'CSV of stuff to check in the build-log')
stages {
stage('The thing'){
steps {
echo 'Test Failure!'
echo 'Some Other Failure!'
O5ten / Jenkinsfile
Last active Feb 15, 2019
Jenkins pipeline
View Jenkinsfile
pipeline {
agent 'linux'
stages {
stage('Build ') {
steps {
sh 'mvn compile'
stage('Run Tests') {
steps {
O5ten / clearSandbox.groovy
Created Sep 18, 2018
Clear Jenkins Sandbox Folder from jobs
View clearSandbox.groovy
import hudson.model.*
def isFolder = { it.class.canonicalName == 'com.cloudbees.hudson.plugins.folder.Folder' }
def isSandbox = { "sandbox" == it.fullName }
def deleteChildren = {
it.getItems().collect { item ->
def deletedName = item.fullName
"${deletedName} deleted"
O5ten / folderIconModificator.js
Created Sep 15, 2018
Jenkins Folder Icon Modificator
View folderIconModificator.js
//Put in $JENKINS_HOME/userContent/FolderIconModificator.js
//Using the Simple Theme Plugin you then add /userContent/FolderIconModificator.js as a JavaScript URL
jQuery('.job-status-').map(function(i, job){
}.bind(this)).each(function(i, imageUrl){
type: "HEAD",
async: true,
O5ten / simple-cheese-jenkins-theme.css
Last active Sep 15, 2018
View simple-cheese-jenkins-theme.css
@import url(,700,500,300);@import url(,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.png
O5ten / jenkins-ensure-timeout.groovy
Created Sep 3, 2018 — forked from seanf/jenkins-ensure-timeout.groovy
Jenkins Groovy script: sets a timeout strategy for any job which doesn't have one
View jenkins-ensure-timeout.groovy
// This script is for Jenkins' Groovy console, and sets a timeout
// strategy for any job which doesn't have one.
// Based on
// Updated and modified by Sean Flanigan.
import hudson.model.*
String describe(strat) {
if (strat instanceof hudson.plugins.build_timeout.impl.ElasticTimeOutStrategy) {
return "Elastic(${strat.timeoutPercentage}, ${strat.numberOfBuilds}, ${strat.timeoutMinutesElasticDefault})"
O5ten / buttons.html
Last active Jun 9, 2018
System header
View buttons.html
<a style="position: absolute; top: 10px; left: 400px;" href="#"><button class=".jiraTrigger">Report an Issue!</button></a>
<a style="position: absolute; top: 10px; left: 270px;" href=""><button>Documentation</button></a>
O5ten / custom.css
Last active Jun 9, 2018
View custom.css
button {
background: #2196f3;
padding: 5px;
border: none;
color: white;
margin-right: 4px;
button:hover {
background-color: #41b6ff;
O5ten / jenkins-issue-collector.js
Created Jun 9, 2018
View jenkins-issue-collector.js
(function(summary, description, component){
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
jQuery(".jiraTrigger").click(function(e) {
fieldValues : {
summary : summary,
View issue-collector.js
window.ATL_JQ_PAGE_PROPS = {
"triggerFunction": function(showCollectorDialog) {
//Requires that jQuery is available!
jQuery("#myCustomTrigger").click(function(e) {
console.log("klickade p� support-knapp!");
You can’t perform that action at this time.