Skip to content

Instantly share code, notes, and snippets.

View iocanel's full-sized avatar

Ioannis Canellos iocanel

View GitHub Profile
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
A new build could not be created in job fabric8/pipeline-test-project/master
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:184)
at org.jenkinsci.plugins.workflow.job.WorkflowJob.createExecutable(WorkflowJob.java:252)
at hudson.model.Executor$1.call(Executor.java:358)
at hudson.model.Executor$1.call(Executor.java:340)
@iocanel
iocanel / kubernetes-plugin-advanced.groovy
Last active August 7, 2018 18:20
A example of the kubernetes plugin with multiple build containers.
//Lets define a unique label for this build.
def label = "buildpod.${env.JOB_NAME}.${env.BUILD_NUMBER}".replace('-', '_').replace('/', '_')
//Lets create a new pod template with jnlp and maven containers, that uses that label.
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'golang', image: 'golang:1.6.3-alpine', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'jnlp', image: 'jenkinsci/jnlp-slave:alpine', command: '/usr/local/bin/start.sh', args: '${computer.jnlpmac} ${computer.name}', ttyEnabled: false)],
volumes: [
persistentVolumeClaim(mountPath: '/home/jenkins/.mvnrepo', claimName: 'jenkins-mvn-local-repo'),
@iocanel
iocanel / kubernetes-plugin.groovy
Last active November 7, 2016 12:59
An example of the new kubernetes plugin pipeline capabilites
//Lets define a unique label for this build.
def label = "buildpod.${env.JOB_NAME}.${env.BUILD_NUMBER}".replace('-', '_').replace('/', '_')
//Lets create a new pod template with jnlp and maven containers, that uses that label.
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven', ttyEnabled: true, command: 'cat'),
containerTemplate(name: 'jnlp', image: 'jenkinsci/jnlp-slave:alpine', command: '/usr/local/bin/start.sh', args: '${computer.jnlpmac} ${computer.name}', ttyEnabled: false)],
volumes: [
persistentVolumeClaim(mountPath: '/home/jenkins/.mvnrepo', claimName: 'jenkins-mvn-local-repo'),
secretVolume(mountPath: '/home/jenkins/.m2/', secretName: 'jenkins-maven-settings')]) {
org.mariadb.jdbc.internal.util.dao.QueryException: Expression #1 of ORDER BY clause is not in SELECT list, references column 'zipkin.zipkin_spans.start_ts' which is not in SELECT list; this is incompatible with DISTINCT
Query is : select distinct `zipkin_spans`.`trace_id` from `zipkin_spans` join `zipkin_annotations` on (`zipkin_spans`.`trace_id` = `zipkin_annotations`.`trace_id` and `zipkin_spans`.`id` = `zipkin_annotations`.`span_id`) where (`zipkin_spans`.`start_ts` between 1475757274431000 and 1475760874431000 and `zipkin_annotations`.`endpoint_service_name` = 'helloworld') order by `zipkin_spans`.`start_ts` desc limit 10
@iocanel
iocanel / ResponseBodyLostTest
Created February 24, 2016 12:06
A test case which demonstrates that the body is response body is lost if the websocket requests fails (e.g. http 500)
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.MockWebServer;
import okio.Buffer;
import org.junit.Rule;
import org.junit.Test;
@iocanel
iocanel / workflow.groovy
Created February 23, 2016 08:35
Pushing a single image to multiple registries
node {
//Using the DSL syntax
kubernetes.image().withName("example").build().fromPath(".")
kubernetes.image().withName("example").tag().inRepository('default/example').withTag("1.0")
kubernetes.image().withName("default/example").push().withTag("1.0").toRegistry("172.30.101.121:5000")
kubernetes.image().withName("default/example").push().withTag("1.0").toRegistry("172.30.101.122:5000")
kubernetes.image().withName("default/example").push().withTag("1.0").toRegistry("172.30.101.123:5000")
}
node {
node('kubernetes') {
withRegistry('172.30.52.10:5000') {
git 'https://github.com/fabric8-quickstarts/node-example.git'
kubernetes.image().withName("example").build().fromPath(".")
kubernetes.image().withName("example").push().withTag("1.0").toRegistry()
kubernetesApply(....)
}
}
@iocanel
iocanel / workflow.groovy
Last active September 15, 2016 03:06
Example of using kubernetes workflow to build, tag, push images to the docker registry.
node {
git 'https://github.com/rawlingsj/node-example.git'
if (!fileExists ('Dockerfile')) {
writeFile file: 'Dockerfile', text: 'FROM node:5.3-onbuild'
}
kubernetes.image().withName("example").build().fromPath(".")
kubernetes.image().withName("example").tag().inRepository("172.30.101.121:5000/default/example").withTag("1.0")
kubernetes.image().withName("172.30.101.121:5000/default/example").push().withTag("1.0").toRegistry()
}
@iocanel
iocanel / workflow.groovy
Last active January 22, 2016 17:23
jenkins kubernetes workflow testing
node('kubernetes') {
kubernetes.pod('mypod').withImage('maven').inside {
git 'https://github.com/fabric8io-images/s2i.git'
kubernetes.image().withName("my-java-s2i").build().fromPath("java")
kubernetes.image().withName("my-java-s2i").tag().inRepository("my-java-s2i").withTag("1.0")
kubernetes.image().withName("my-java-s2i").push().withTag("1.0").toRegistry()
}
}