This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | |
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<profiles> | |
<profile> | |
<id>local-settings</id> | |
<activation> | |
<property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script is for Jenkins' Groovy console, and sets a timeout | |
// strategy for any job which doesn't have one. | |
// Based on http://janmaterne.wordpress.com/2010/07/11/how-to-check-if-all-hudson-jobs-have-a-timeout/ | |
// 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})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules | |
# These values seem to work for "ThinkPad Mini Dock Plus Series 3" | |
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.FilePath; | |
// Initialize dryRun parameter to TRUE if not given as script parameter | |
if( !binding.variables.containsKey("dryRun") ) { | |
dryRun = true; | |
} | |
if( dryRun == true ) { | |
println "** Execute a dryRun - no files will ever be deleted **"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2016, Red Hat, Inc. and individual contributors | |
* as indicated by the @author tags. See the copyright.txt file in the | |
* distribution for a full listing of individual contributors. | |
* | |
* This is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as | |
* published by the Free Software Foundation; either version 2.1 of | |
* the License, or (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.ScriptEngineManager; | |
def fs = new ScriptEngineManager().getEngineFactories() | |
fs.forEach{ | |
println "Script Engine: " + it.engineName | |
println "Names: " + it.names | |
println() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh -ex | |
# https://zanata.atlassian.net/browse/ZNTA-1391 | |
# FIXME handle extra branches on client and api | |
# determine directory containing this script | |
SCRIPT_DIR=$( dirname "$0:A" ) | |
oldParentVersion=30-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.jboss.`as`.cli.scriptsupport.CLI | |
import org.slf4j.LoggerFactory | |
/** | |
* @author Sean Flanigan <a href="mailto:sflaniga@redhat.com">sflaniga@redhat.com</a> | |
*/ | |
// Refs: | |
// https://developer.jboss.org/wiki/AdvancedCLIScriptingWithGroovyRhinoJythonEtc | |
// https://github.com/wildfly/wildfly-core/pull/1501/files?diff=unified#diff-25ae58578a2f30dd07236a549dc2f8d9R62 | |
// Note that running CLI/embed-server seems to have side effects which cause problems if you later launch wildfly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.ProcessBuilder.Redirect | |
import java.util.concurrent.TimeUnit | |
fun String.runCommand(workingDir: File? = null) { | |
val process = ProcessBuilder(*split(" ").toTypedArray()) | |
.directory(workingDir) | |
.redirectOutput(Redirect.INHERIT) | |
.redirectError(Redirect.INHERIT) | |
.start() | |
if (!process.waitFor(10, TimeUnit.SECONDS)) { |