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 any | |
stages { | |
stage("Deploy") { | |
parallel { | |
stage("dev") { | |
when { | |
beforeAgent true | |
expression { |
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 any | |
stages { | |
stage("Deploy") { | |
matrix { | |
axes { | |
axis { | |
name "DEPLOY_ENVIRONMENT" | |
values "DEPLOY_DEV", "DEPLOY_STAGING", "DEPLOY_PROD" |
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
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 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
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 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 | |
pipeline { | |
agent any | |
stages { | |
stage("Test") { | |
when { | |
changeRequest target: "develop", branch: /^TEST-\d+$/, comparator: 'REGEXP' | |
} |
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.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 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
$ ./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 [13s] | |
> Task :jmh | |
# JMH version: 1.21 | |
# VM version: JDK 1.8.0_201, Java HotSpot(TM) 64-Bit Server VM, 25.201-b09 |
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
$ ./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 |
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
[ | |
{ | |
"name":"[Ljava.lang.Object;", | |
"allDeclaredFields":true, | |
"allDeclaredMethods":true | |
}, | |
{ | |
"name":"[Ljava.lang.String;", | |
"allDeclaredFields":true, | |
"allDeclaredMethods":true, |
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 listA = ['ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQR'] | |
def listB = [1,2,1,1,1,1] | |
def pairs = [listA, listB].transpose() | |
def map = [:] | |
pairs.each{ map << (it as MapEntry) } | |
println(map) |
NewerOlder