This file contains hidden or 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 |
This file contains hidden or 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 | |
| } |
This file contains hidden or 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; |
This file contains hidden or 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.*', |
This file contains hidden or 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" |
This file contains hidden or 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 |
This file contains hidden or 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' |
This file contains hidden or 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; |
This file contains hidden or 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 |
This file contains hidden or 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