Skip to content

Instantly share code, notes, and snippets.

View parj's full-sized avatar
💭
I may be slow to respond.

Parjanya Mudunuri parj

💭
I may be slow to respond.
View GitHub Profile
@parj
parj / pom.xml
Last active May 19, 2019 10:37
Sample springboot pom which enables uploading to ossrh
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.parj</groupId>
<artifactId>samplespringbootapp</artifactId>
<packaging>jar</packaging>
<version>1.6-SNAPSHOT</version>
<name>samplespringbootapp</name>
<url>https://github.com/parj/SampleSpringBootApp</url>
@parj
parj / config.yml
Created May 19, 2019 10:41
Parallel build in Circle using workflows
workflows:
version: 2
build_and_test:
jobs:
- build
- openjdk-8:
filters:
branches:
ignore:
- release
@parj
parj / config.yml
Last active May 19, 2019 10:46
CircleCI default java build
openjdk-8:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
@parj
parj / config.yml
Created May 19, 2019 10:50
CircleCI continuous CI job
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:11-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
@parj
parj / settings.xml
Created May 19, 2019 10:53
Maven settings.xml
<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<servers>
<server>
<id>ossrh</id>
<username>${env.username}</username>
<password>${env.OSS_PASSWORD}</password>
</server>
@parj
parj / importKeys.sh
Created May 19, 2019 10:56
Decrypting gpg private key and importing gpg
#!/bin/bash
# Stop on error
set -e
main() {
decryptAndImportPrivateKeys
}
# From gist - https://gist.github.com/Bost/54291d824149f0c4157b40329fceb02c
@parj
parj / build.sh
Last active May 19, 2019 11:12
Multi CI - Travis CI and Circle CI
#!/bin/bash
# Stop on error
set -e
main() {
init
setup_git
buildArtifact
}
@parj
parj / travis.yml
Created May 19, 2019 11:20
TravisCI
language: java
jdk:
- openjdk8
- openjdk11
- openjdk12
cache:
directories:
- ".autoconf"
- "$HOME/.m2"
@parj
parj / service-deployment-ingress.jsonnet.template
Created October 26, 2019 05:24
Jsonnet template for Kubernetes
// Template for a basic service, deployment and ingress
{
// Required arguments for this template
serviceName:: error "serviceName must be specified",
dockerImage:: error "dockerImage must be specified",
servicePort:: error "servicePort must be specified",
servicePortType:: "ClusterIP",
namespace:: "default",
host:: "mysterious-grass-savages.github",
local serviceDeployment = import "service-deployment-ingress.jsonnet.template";
local samplespringbootapp() = serviceDeployment + {
serviceName:: "samplespringbootapp",
dockerImage:: "parjanya/samplespringbootapp:1.6-SNAPSHOT",
servicePort:: 9999,
url:: "/hello",
readinessProbe::
{