Skip to content

Instantly share code, notes, and snippets.

View jcmcneal's full-sized avatar

Jason McNeal jcmcneal

View GitHub Profile
@jcmcneal
jcmcneal / README.md
Last active February 12, 2018 23:04 — forked from hofmannsven/README.md
My Git Cheat Sheet
@jcmcneal
jcmcneal / build stage
Last active September 28, 2020 17:22
Custom Auto DevOps Build Stage
build:
stage: build
image: docker:19.03.13
services:
- docker:19.03.13-dind
script:
- |
apk add bash ruby wget
wget https://github.com/buildpacks/pack/releases/download/v0.12.0/pack-v0.12.0-linux.tgz && \
tar xvf pack-v0.12.0-linux.tgz && \
#!/bin/bash -e
# Custom Variables
NODE_ARCH=$([ "$CI_RUNNER_EXECUTABLE_ARCH" == "linux/arm64" ] && echo "arm64v8" || echo "amd64")
echo "NODE_ARCH: $NODE_ARCH"
if [[ -z "$CI_COMMIT_TAG" ]]; then
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG}
export CI_APPLICATION_TAG=${CI_APPLICATION_TAG:-$CI_COMMIT_SHA}
else
apiVersion: v1
kind: ServiceAccount
metadata:
name: gitlab
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: gitlab-admin
## GitLab Runner Image
##
## By default it's using gitlab/gitlab-runner:alpine-v{VERSION}
## where {VERSION} is taken from Chart.yaml from appVersion field
##
## ref: https://hub.docker.com/r/gitlab/gitlab-runner/tags/
##
## Note: If you change the image to the ubuntu release
## don't forget to change the securityContext;
## these images run on different user IDs.
apiVersion: v1
kind: Secret
metadata:
name: gitlab-runner-secret
namespace: gitlab-managed-apps
type: Opaque
data:
runner-registration-token: 'token here' #base64 encoded registration token
runner-token: ''
---
image: alpine:latest
variables:
REVIEW_DISABLED: "true"
SAST_DISABLED: "true"
DAST_DISABLED: "true"
CONTAINER_SCANNING_DISABLED: "true"
CODE_QUALITY_DISABLED: "true"
PERFORMANCE_DISABLED: "true"
POSTGRES_ENABLED: "false"
@jcmcneal
jcmcneal / cert-manager.sh
Last active January 12, 2021 18:52
Be sure to replace CHANGE-ME@example.com with your own email
#!/bin/bash
# Derived from https://www.reddit.com/r/kubernetes/comments/g3z5sp/microk8s_with_certmanager_and_letsecncrypt/fxcmq5k?utm_source=share&utm_medium=web2x&context=3
# Setup cert-manager
kubectl create namespace cert-manager
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager --version v1.1.0 \
--set installCRDs=true \