Skip to content

Instantly share code, notes, and snippets.

import { google } from "googleapis";
import { OAuth2Client } from "google-auth-library";
import * as fs from "fs";
import * as path from "path";
import * as readline from "readline";
// ─────────────────────────────────────────────
// CONFIGURATION
// ─────────────────────────────────────────────
FROM ubuntu:16.04
ARG artifactory_host
#================================================
# Customize sources for apt-get
#================================================
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe\n" > /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu xenial-updates main universe\n" >> /etc/apt/sources.list \
&& echo "deb http://security.ubuntu.com/ubuntu xenial-security main universe\n" >> /etc/apt/sources.list
private static Class[] generateListOfClassesFromTestSuiteDirectory(String testSuiteDirectoryToParse) {
File rootDirOfTests = new File(testSuiteDirectoryToParse);
ArrayList<Class> testClassList = new ArrayList<Class>();
for (File file : Files.fileTreeTraverser().preOrderTraversal(rootDirOfTests)) {
if (file.isFile() && file.getName().contains(".class")) {
try {
System.out.println("URL: " + file.getParentFile().toURI().toURL());
ClassLoader urlClassLoader = new URLClassLoader(new URL[]{file.getParentFile().toURI().toURL()});
Field f = ClassLoader.class.getDeclaredField("classes");
f.setAccessible(true);
var fulltld ="internal.salesforce.com";
var proxyServer = httpProxy.createProxy();
var options = {
'/dtolley-wsl': 'dtolley-wsl',
'/dtolley-ltm': 'localhost',
"/salesforce": 'salesforce'
}
require('http').createServer(function(req, res) {
changeListFiles = self._execAndGetOutput('p4 opened -c ' + changeList)
splitLines = changeListFiles.split('/n')
localFileList = []
for line in splitLines:
splitLine = line.split("#")
fileInRepoSyntax = splitLine[0]
p4Fstat = self._execAndGetOutput('p4 fstat -T clientFile ' + fileInRepoSyntax)
fileInLocalSyntax = p4Fstat.split("... clientFile ")[1].rstrip("\n")
localFileList.append(fileInLocalSyntax)
print localFileList
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<j:set var="errorParser" value="${it.getAction('org.jenkinsci.plugins.BuildStatus.SFLYErrorParserAction')}"/>
Build Details:
BUILD ${build.result}
Build URL: ${rooturl}${build.url}buildstatus
Project: ${project.name}
Date of build: ${it.timestampString}
Build duration: ${build.durationString}
File dir = new File("/Users/dtolley");
File file = new File("Dima.txt");
File combined = new File(dir.getAbsolutePath() + file.getName());
<script>
function start() {
<j:forEach items="${it.getWatchedProjectModules()}" var="watchedProjectModules" indexVar="i">
graphFunction${i}();
</j:forEach>
}
window.onload = start;
</script>
public class GrouponMatrixStrategy extends MatrixExecutionStrategy {
private volatile boolean runSequentially;
/**
* Filter to select a number of combinations to build first
*/
private volatile String touchStoneCombinationFilter;
/**
* Required result on the touchstone combinations, in order to
ByteArrayOutputStream fosReset = new ByteArrayOutputStream();
ByteArrayOutputStream errReset = new ByteArrayOutputStream();
ByteArrayOutputStream fosCreate = new ByteArrayOutputStream();
ByteArrayOutputStream errCreate = new ByteArrayOutputStream();
ByteArrayOutputStream fosCheckout = new ByteArrayOutputStream();
ByteArrayOutputStream errCheckout = new ByteArrayOutputStream();
ByteArrayOutputStream fosPush = new ByteArrayOutputStream();