Skip to content

Instantly share code, notes, and snippets.

root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt mail:x:8:12:mail:/var/spool/mail:/sbin/nologin operator:x:11:0:operator:/root:/sbin/nologin

@iocanel
iocanel / passthrough-bc.yml
Created September 22, 2017 11:05
A pass through build config, that is used to public images to dockerhub.
apiVersion: v1
kind: BuildConfig
metadata:
labels:
app: experiment
name: experiment
spec:
source:
type: Dockerfile
dockerfile: "FROM thisisgettingreplaced"
@iocanel
iocanel / jenkins-run-pipeline.sh
Created August 25, 2017 12:26
Run Jenkins pipeline from shell
#!/bin/bash
JOB="dev"
CONFIG_XML="/tmp/jenkins-job.xml"
PIPELINE=`cat $1`
read -r -d '' HEADER << __HEADER__
<?xml version="1.0" encoding="UTF-8"?><flow-definition plugin="workflow-job@2.3">
<actions/>
<description/>
@iocanel
iocanel / mvnnotify
Last active June 6, 2017 12:17
An mvn wrapper that sends a notification when the build is done
#!/bin/bash
# An mvn wrapper that sends a notification when the build is done.
# Just throw it under $HOME/bin and create and alias:
# alias mvn=$HOME/bin/mvnnotify
#
# Requires notify-send or something similar.
MVN=`which mvn --skip-alias`
eval $MVN $*
Caused by: java.text.ParseException: failed to load settings from jar:file:/home/jenkins/.m2/repository/org/codehaus/groovy/groovy/2.4.9/groovy-2.4.9.jar!/groovy/grape/defaultGrapeConfig.xml: impossible to add configured child for ivy on class org.apache.ivy.plugins.resolver.FileSystemResolver: ivy pattern must be absolute: ?/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml
at org.apache.ivy.core.settings.XmlSettingsParser.doParse(XmlSettingsParser.java:165) ~[ivy-2.4.0.jar:2.4.0]
at org.apache.ivy.core.settings.XmlSettingsParser.parse(XmlSettingsParser.java:150) ~[ivy-2.4.0.jar:2.4.0]
at org.apache.ivy.core.settings.IvySettings.load(IvySettings.java:417) ~[ivy-2.4.0.jar:2.4.0]
at org.apache.ivy.core.settings.IvySettings$load.call(Unknown Source) ~[na:na]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) ~[groovy-2.4.9.jar:2.4.9]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) ~[groovy-2.4.9.jar:2.4.9]
at org.codeh
@iocanel
iocanel / pipeline.groovy
Last active March 1, 2019 19:58
Simple pipeline
#!/usr/bin/groovy
@Library('github.com/fabric8io/fabric8-pipeline-library@master')
def buildLabel = "mylabel.${env.JOB_NAME}.${env.BUILD_NUMBER}".replace('-', '_').replace('/', '_')
podTemplate(label: buildLabel,
containers: [containerTemplate(image: 'maven', name: 'maven', command: 'cat', ttyEnabled: true,
envVars: [containerEnvVar(key: 'DOCKER_CONFIG', value: '/home/jenkins/.docker/')],
workingDir: '/home/jenkins/')
],
volumes: [
<?xml version='1.0' encoding='UTF-8'?>
<project 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-kubernetes-dependencies</artifactId>
<version>0.2.0.BUILD-SNAPSHOT</version>
<name>Spring Cloud Kubernetes :: Dependencies</name>
@iocanel
iocanel / gist:8445913bc84724cf811dc5d0c28d96b9
Created December 14, 2016 11:22
Edit the last container of a pod.
PodTemplateSpecBuilder b = new PodTemplateSpecBuilder().accept(new PathAwareTypedVisitor<ContainerBuilder, PodSpecBuilder>() {
@Override
public void visit(ContainerBuilder element) {
PodSpecBuilder podSpecBuilder = getParent();
Container last = podSpecBuilder.getContainers().stream().reduce((first, second) -> second).orElseThrow(IllegalStateException::new);
if (last.getName().equals(element.getName())) {
//edit as you please
}
}
});
java.lang.RuntimeException: Provider for type class java.net.URL returned a null value: org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider@51bde877
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:133)
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.resolve(ArquillianResourceTestEnricher.java:109)
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.enrichArguments(LocalTestExecuter.java:94)
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Nov 29, 2016 12:46:26 PM org.jboss.arquillian.container.test.impl.RunModeUtils isRunAsClient
WARNING: The test method "org.arquillian.cube.openshift.ftest.test.CDIBeanTestCase shouldRunInContainer" will run on the client side - there is no running deployment yet. Please use the annotation @RunAsClient
Nov 29, 2016 12:46:26 PM org.jboss.arquillian.container.test.impl.RunModeUtils isRunAsClient
WARNING: The test method "org.arquillian.cube.openshift.ftest.test.CDIBeanTestCase shouldRunInContainer" will run on the client side - there is no running deployment yet. Please use the annotation @RunAsClient
Nov 29, 2016 12:46:26 PM org.jboss.arquillian.container.test.impl.RunModeUtils isRunAsClient
WARNING: The test method "org.arquillian.cube.openshift.ftest.test.CDIBeanTestCase shouldRunInContainer" will run on the client side - there is no running deployment yet. Please use the annotation @RunAsClient
Nov 29, 2016 12:46:26 PM org.jboss.arquillian.container.test.impl.RunModeUtils isRunAsClient
WARNING: The test meth