View Jenkinsfile
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
#!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-alpine |
View Jenkinsfile.groovy
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
pipeline { | |
agent { | |
label 'agentId' //The id of the slave/agent where the build should be executed, if it doesn't matter use "agent any" instead. | |
} | |
triggers { | |
cron('H */8 * * *') //regular builds | |
pollSCM('* * * * *') //polling for changes, here once a minute | |
} |
View mono_sample.java
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
public class OrderHandlers { | |
private OrderService orderService; | |
private KitchenService kitchenService; | |
private DeliveryService deliveryService; | |
private AccountingService accountingService; | |
public OrderHandlers(OrderService orderService, | |
KitchenService kitchenService, | |
DeliveryService deliveryService, | |
AccountingService accountingService) { | |
this.orderService = orderService; |
View android exclusions for coverage
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
def androidExclusion = [ | |
'**/databinding/**/*.*', | |
'**/android/databinding/*Binding.*', | |
'**/BR.*', | |
'**/R.*', | |
'**/R$*.*', | |
'**/BuildConfig.*', | |
'**/Manifest*.*', | |
'**/*_MembersInjector.*', | |
'**/Dagger*Component.*', |
View sonarqube task for coverage
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
sonarqube { | |
properties { | |
property "sonar.host.url", "http://localhost:9000/" | |
property "sonar.sourceEncoding", "UTF-8" | |
property "sonar.projectKey", "myProject" | |
property "sonar.projectName", "myProject" | |
property "sonar.projectVersion", "V1.0" | |
property "sonar.sources", "src/main/java" | |
property "sonar.tests", ["src/test/java", "src/test/kotlin"] | |
property "sonar.java.coveragePlugin", "jacoco" |
View android coverage task
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
task codeCoverageReport(type: JacocoReport, dependsOn: 'testStagingDebugUnitTest') { | |
group = "Reporting" | |
description = "Generate Jacoco coverage reports after running tests." | |
reports { | |
xml.enabled = true | |
html.enabled = true | |
} | |
classDirectories = fileTree( | |
dir: 'build/intermediates/classes/staging/debug/com/yourpackage', | |
excludes: androidExclusion |
View dependencies
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
apply plugin: 'org.sonarqube' | |
apply plugin: 'jacoco' |
View gist:89d51f197b24716c69205e4dd21b3edd
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
package com.example.tsl057.rxjavaplaygroundjava; | |
import android.util.Log; | |
import org.junit.Test; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.TimeUnit; | |
import io.reactivex.Observable; |
View gist:4877cbe9daa49e407658d7a281325437
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
git branch --sort=-committerdate |
View gist:ea495ed9772f9b13a1988ba9fb1b061f
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
curl http://10.129.7.183:1337/jsonendpoint -H 'Authorization: XXXXX' | node <<< "var o = $(cat); console.log(JSON.stringify(o, null, 4));" |
NewerOlder