Skip to content

Instantly share code, notes, and snippets.

View WoodProgrammer's full-sized avatar

Emir Özbir WoodProgrammer

View GitHub Profile
#!/bin/sh
get_current_branch(){
export BRANCH=$(git branch --show-current)
}
check_remote_master(){
git log ${BRANCH} --pretty=format:'%h' > /tmp/local_branch
git fetch --all
git log origin/master --pretty=format:'%h' > /tmp/remote_master
unclassified:
globalLibraries:
libraries:
- name: "awesome-lib"
retriever:
modernSCM:
scm:
git:
remote: "https://github.com/jenkins-infra/pipeline-library.git"
jobs:
- script: >
pipelineJob('default-agent') {
definition {
cps {
script("""\
pipeline {
agent any
stages {
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deployment-first
spec:
replicas: 2
template:
metadata:
labels:
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: podinfo
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: deployment-first
apiVersion: apps/v1
kind: Deployment
metadata:
name: af-deployment
labels:
app: nginx
spec:
replicas: 2
selector:
matchLabels:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cloudsecrets.woodprogrammer.cloudops.local
spec:
group: woodprogrammer.cloudops.local
version: v1
scope: Namespaced
names:
plural: cloudsecrets
@WoodProgrammer
WoodProgrammer / di_terraform.tf
Created April 5, 2019 22:41 — forked from arunvelsriram/di_terraform.tf
Terraform dependency injection style de-coupling resources
# di_terraform.tf
# Example Terraform configuration that shows de-coupling resources (Amazon S3 bucket and bucket policy)
# with the help of modules analogous to dependency injection technique
# modules/s3_bucket/main.tf
# Base S3 bucket that can be attached a policy
variable "bucket_name" {}
variable "region" {
apiVersion: v1
kind: Pod
metadata:
name: jenkins-dind-test
spec:
securityContext:
runAsUser: 1000
fsGroup: 2000
volumes:
- name: sec-ctx-vol
@WoodProgrammer
WoodProgrammer / Dockerfile
Created October 14, 2018 12:18 — forked from alexellis/Dockerfile
Go with of-watchdog
FROM golang:1.8.3-alpine3.6
RUN apk --no-cache add curl \
&& echo "Pulling watchdog binary from Github." \
&& curl -sSL https://github.com/openfaas-incubator/of-watchdog/releases/download/0.2.2/of-watchdog > /usr/bin/fwatchdog \
&& chmod +x /usr/bin/fwatchdog \
&& apk del curl --no-cache
WORKDIR /go/src/handler
COPY . .