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
18:15:58: Executing task 'jmh'... | |
:compileJava NO-SOURCE | |
:compileGroovy NO-SOURCE | |
:processResources NO-SOURCE | |
:classes UP-TO-DATE | |
:compileTestJava NO-SOURCE | |
:compileTestGroovy NO-SOURCE | |
:processTestResources NO-SOURCE | |
:testClasses UP-TO-DATE |
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 any | |
stages { | |
stage("Deploy") { | |
matrix { | |
axes { | |
axis { | |
name "DEPLOY_ENVIRONMENT" | |
values "DEPLOY_DEV", "DEPLOY_STAGING", "DEPLOY_PROD" |
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
@Grab(group = "org.reflections", module = "reflections", version = "0.9.11") | |
@Grab(group = "org.slf4j", module = "slf4j-simple", version = "1.7.25") | |
import groovy.json.JsonOutput | |
import org.codehaus.groovy.reflection.GeneratedMetaMethod | |
import org.reflections.Reflections | |
def reflections = new Reflections("org.codehaus.groovy.runtime") | |
def json = reflections.getSubTypesOf(GeneratedMetaMethod).collect { |
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 any | |
stages { | |
stage("Deploy") { | |
parallel { | |
stage("dev") { | |
when { | |
beforeAgent true | |
expression { |
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 groovy.transform.Field | |
@Field | |
def profiles = [ | |
prod: ["master", /release\/.*/], | |
dev: ["develop", /PR-.*/] | |
] | |
String getProfileForBranchName(String branchName, String defaultProfile = "default") { | |
return profiles.findResult { profile, candidates -> candidates.any { branchName ==~ it } ? profile : null } ?: defaultProfile |
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
stage("Build") { | |
steps { | |
sh "mvn clean install" | |
} | |
post { | |
always { | |
script { | |
try { | |
junit "**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/*.xml" | |
} catch (e) { |
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 | |
pipeline { | |
agent any | |
stages { | |
stage("Test") { | |
when { | |
changeRequest target: "develop", branch: /^TEST-\d+$/, comparator: 'REGEXP' | |
} |
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.github.wololock.micronaut.products | |
import io.micronaut.context.annotation.Property | |
import io.micronaut.test.annotation.MicronautTest | |
import spock.lang.Specification | |
@MicronautTest(environments = ["test"]) | |
class ProductSpec extends Specification { | |
@Property(name = "items") |
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 com.sun.net.httpserver.HttpExchange | |
import com.sun.net.httpserver.HttpHandler | |
import com.sun.net.httpserver.HttpServer | |
import groovy.transform.CompileStatic | |
import groovy.transform.TypeChecked | |
@CompileStatic | |
@TypeChecked | |
class GroovyHttpServer { |
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
$ ./gradlew clean jmh --no-daemon | |
> Task :jmhRunBytecodeGenerator | |
Processing 0 classes from /home/wololock/workspace/groovy-closure-trampoline-example/build/classes/java/jmh with "reflection" generator | |
Processing 5 classes from /home/wololock/workspace/groovy-closure-trampoline-example/build/classes/groovy/jmh with "reflection" generator | |
Writing out Java source to /home/wololock/workspace/groovy-closure-trampoline-example/build/jmh-generated-sources and resources to /home/wololock/workspace/groovy-closure-trampoline-example/build/jmh-generated-resources | |
# Warmup Iteration 1: UTING [6s] | |
> Task :jmh | |
# JMH version: 1.21 | |
# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 |
NewerOlder