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
@Test | |
public void testBatch(){ | |
/*Preparing sample data. */ | |
MzRolesRecord admin = new MzRolesRecord(); | |
admin.setCreatedDate(new Timestamp(System.currentTimeMillis())); | |
admin.setRoleDesc("Admin"); | |
MzRolesRecord user = new MzRolesRecord(); | |
user.setCreatedDate(new Timestamp(System.currentTimeMillis())); |
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
public static Field<String> toChar(Field<Timestamp> timestampField, | |
String format) { | |
return Factory.function("to_char", String.class, timestampField, | |
Factory.val(format)); | |
} | |
@Test | |
public void testToChar() { |
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
Committing project to own repository for first time | |
//Configure username, email | |
git config --global user.name "userx" | |
git config --global user.email "[email protected]" | |
//Go to the folder where code is to be committed first time into repo (assuming repo //exists and no code present) | |
git init | |
//First thing will be to add the test-service project folder with all subfolders and //files into local repository. |
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
RestTemplate restTemplate = new RestTemplate(); | |
try { | |
ResponseEntity<List<Claim>> claimResponse = restTemplate.exchange( | |
uri, | |
HttpMethod.GET, | |
null, | |
new ParameterizedTypeReference<List<Claim>>() {}); | |
if(claimResponse != null && claimResponse.hasBody()){ | |
claims = claimResponse.getBody(); |
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 'Dev' | |
node { | |
git url: 'https://github.com/jglick/simple-maven-project-with-tests.git' | |
mvn 'clean package' | |
} | |
def mvn(args) { | |
sh "${tool 'M3'}/bin/mvn ${args}" | |
} |
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
{ | |
"kind": "ReplicationController", | |
"apiVersion": "v1", | |
"metadata": { | |
"name": "claims-web-controller", | |
"labels": { | |
"state": "serving" | |
} | |
}, |
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
node{ | |
docker.image('buildpack-deps:jessie-scm').inside { | |
sh "echo 'hello' >> a.txt" | |
stash includes: 'a.txt', name: 'pom' | |
} | |
docker.image('buildpack-deps:jessie-scm').inside { | |
unstash 'pom' | |
sh "cat a.txt" | |
} |
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.dh.ts.repo; | |
import java.net.URI; | |
import java.nio.charset.Charset; | |
import org.apache.commons.codec.binary.Base64; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpMethod; |
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
{ | |
"kind": "Namespace", | |
"apiVersion": "v1", | |
"metadata": { | |
"name": "geolocus-ns" | |
} | |
} |
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
{ | |
"apiVersion": "v1", | |
"kind": "ResourceQuota", | |
"metadata": { | |
"name": "bs-quota" | |
}, | |
"spec": { | |
"hard": { | |
"memory": "1Gi", | |
"cpu": "1", |
OlderNewer