Skip to content

Instantly share code, notes, and snippets.

View npiper's full-sized avatar

Neil Piper npiper

  • Deloitte
  • United Kingdom
View GitHub Profile
@npiper
npiper / README.md
Last active July 1, 2023 22:57
Renaming Master to Main and removing it while retaining history

Renaming Master to Main

Script below is what I've used to industrialise moving from a 'master' branch to 'main' both locally and remotely.

Pre-Requisite

Have a local Github authentication token set in environment variable GIT_TOKEN

Assumes you have a repo with more than 1 commit, and a local master branch tracking a remote master branch.

@npiper
npiper / Versioning.MD
Last active February 14, 2024 13:23
Right way to do versioning in maven for Microservices

A SemVer Microservice CI-CD Pipeline

Preferred:

X.Y.Z_${CI-buildNo}.${gitcommit}

Ensure our POM accepts versions set externally.

for Now Maven: X.Y.Z , Tag X.Y.Z__${CI-buildNo}.${gitcommit} , Docker label ${CI-buildNo}.${gitcommit}

@npiper
npiper / gist:7766fa3708956026acd1e3c2bdf5c833
Last active April 25, 2018 23:46
How to get Travis-CI to push snapshot builds to an S3 Snapshot Repo

Goals

Pre-Requisites

  • 2 AWS S3 Buckets for repo storage
  • AWS Access Key, Secret key for a limited access account (Write / Read access to those buckets)
  • Travis-ci account
  • Github maven project
  • 'Parent Pom' - set your usual Maven snapshot & Release Repo's are set
@npiper
npiper / gist:912e6422e470bb028c58adbfeb1bd23b
Last active April 25, 2018 22:06
Building a CI/CD pipeline with Github, Travis-CI and Heroku

Upgrade Ruby on Mac

Install / Upgrade Jekyll

Didn't work on OS/X for ruby v.2.4.1 had to link puma and re-install jekyll

gem install puma -v '3.4.0' -- --with-opt-dir=/usr/local/opt/openssl

Then.. Rake couldn't build default task - update the Rakefile

@npiper
npiper / gist:9e9c9c03923c420b5a749c3be135dc49
Last active October 13, 2017 17:56
How to create an SFTP server in Openshift

How to create an SFTP Docker image in Openshift

Configure Openshift to allow containers to run as root

Good for demo's, not good for prod.

oc adm policy add-scc-to-user anyuid -z default