Skip to content

Instantly share code, notes, and snippets.

View codetinkerhack's full-sized avatar

Evgeniy Shatokhin codetinkerhack

View GitHub Profile
@ariesmcrae
ariesmcrae / DBHelper.java
Created May 12, 2017 03:14
Amazon EC2 Systems Manager Parameter Store - get environment key/value pairs using AWS SDK Java
private static Map<String, String> parameterStore() {
final AWSSimpleSystemsManagement client = AWSSimpleSystemsManagementClientBuilder.defaultClient();
GetParametersRequest request = new GetParametersRequest();
request.withNames("driver", "host", "port", "schema", "username", "password").setWithDecryption(true);
GetParametersResult result = client.getParameters(request);
Map<String, String> store = new HashMap<>();
@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8