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 / 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:41
Parallel build in Circle using workflows
workflows:
version: 2
build_and_test:
jobs:
- build
- openjdk-8:
filters:
branches:
ignore:
- release
@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 / install.sh
Created June 24, 2018 07:32
Automated deployment and build
#!/bin/bash
#Install Gogs
docker run --name=gogs -p 10022:22 -p 3000:3000 -v /tmp/gitlab:/data gogs/gogs
#Install Jenkins
docker run -d -p 8080:8080 -p 50000:50000 -v /tmp/jenkins:/var/jenkins_home jenkins
#Install Ansible tower
docker run -t -d -v /tmp/certs:/certs -p 443:443 --privileged -e SERVER_NAME=localhost ybalt/ansible-tower
@parj
parj / role-bind-jenkins-robot.yml
Created May 23, 2018 05:15
Bind the jenkins-robot user to the jenkins-readwrite role for Kubernetes
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
namespace: jenkins
subjects:
- kind: ServiceAccount
name: jenkins-robot
namespace: default
roleRef:
@parj
parj / role-readwrite.yml
Created May 23, 2018 05:11
Kubernetes role to read and write to pods for a namespace called Jenkins
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: jenkins-readwrite
namespace: jenkins
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
@parj
parj / service-account.yml
Created May 23, 2018 05:01
Jenkins service account in Kubernetes
apiVersion: v1
kind: ServiceAccount
metadata:
name: jenkins-robot
namespace: jenkins
@parj
parj / jenkins-deployment.yaml
Created May 23, 2018 04:56
Jenkins deployment for Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: jenkins
@parj
parj / Dockerfile
Created May 23, 2018 04:49
Kubernetes Jenkins Dockerfile
from jenkins/jenkins:lts
# Distributed Builds plugins
RUN /usr/local/bin/install-plugins.sh ssh-slaves
# Artifacts
@parj
parj / gist:5939457
Created July 6, 2013 10:03
Gradle using SQL driver
import groovy.sql.Sql
repositories {
mavenCentral()
}
configurations {
driver
}