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
#!/bin/bash -xe | |
cat << "JAVA" > Checker.java && javac Checker.java | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
public class Checker { | |
public static void main(String[] args) throws Exception { | |
HttpURLConnection conn = | |
(HttpURLConnection) new URL(args[0]) | |
.openConnection(); |
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
#!/bin/bash -e | |
path='^\+\+\+ .\/(.*)' | |
hunk='^@@ -[0-9]+(,[0-9]+|) \+([0-9]+)(,([0-9]+|)|) @@' | |
while read -r line | |
do | |
if [[ $line =~ $path ]] | |
then | |
echo "${BASH_REMATCH[1]}:" | |
fi |
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 org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject | |
import org.jenkinsci.plugins.workflow.job.WorkflowJob | |
import hudson.model.AbstractProject | |
import jenkins.*; | |
import jenkins.model.*; | |
import hudson.*; | |
import hudson.model.*; | |
String query = build.envVars['QUERY'] |
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 filter = /.log$/ | |
def icon = 'attribute.png' | |
def header = "<h2>Artifacts matching ${filter}</h2>" | |
def body = manager.build.artifacts | |
.findAll { it.relativePath =~ filter } | |
.collect { "<a href='artifact/${it.href}'>${it.name}</a>" } | |
.collect { "<li>${it}</li>" } | |
.join('\\n') |
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 build = manager.build | |
def println = { manager.listener.logger.println(it) } | |
def since = build.startTimeInMillis | |
println 'Since : '+new Date(since) | |
def jobs = build | |
.getActions(javaposse.jobdsl.plugin.actions.GeneratedJobsBuildAction) |
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 layout = session.lookup('org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout'); | |
def repoFactory = session.lookup('org.apache.maven.artifact.repository.ArtifactRepositoryFactory'); | |
def repository = repoFactory.createDeploymentArtifactRepository( | |
project.distributionManagement.repository.id, | |
project.distributionManagement.repository.url, | |
layout, true ); | |
def snapshotRepository = repoFactory.createDeploymentArtifactRepository( | |
project.distributionManagement.snapshotRepository.id, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>google-checkstyle-demo</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<build> | |
<plugins> |
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 java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.text.DateFormat; | |
import java.util.Date; | |
import java.util.Scanner; | |
public class Container { |