Skip to content

Instantly share code, notes, and snippets.

View jprinet's full-sized avatar

Jérôme Prinet jprinet

  • Bayonne, France
  • 05:45 (UTC +02:00)
View GitHub Profile
@jprinet
jprinet / build.gradle
Created July 7, 2022 11:18
Grab checkstyle issues in a configuration cache compatible way
abstract class CheckstyleReportAsCustomValueBuildService implements BuildService<CheckstyleReportAsCustomValueBuildService.Params>, OperationCompletionListener {
interface Params extends BuildServiceParameters {
ListProperty<FileSystemLocation> getReports()
Property<BuildScanExtension> getBuildScanApi()
}
@Override
void onFinish(FinishEvent finishEvent) {
if(finishEvent.getDescriptor().displayName.contains("checkstyle")){
@jprinet
jprinet / wait-until-ready.sh
Created January 20, 2020 21:36
wrapper script to launch command when dependency is ready
#!/bin/sh
readonly MAX_RETRY=10
readonly DELAY_BETWEEN_TRY_IN_SECONDS=10
readonly DEPENDENCY_CHECK_COMMAND=$1
readonly CONTAINER_RUN_COMMAND=$2
# wait until a command succeeds
#
# Usage: waitUntilReady "<command arg1...argN>"