Skip to content

Instantly share code, notes, and snippets.

View rgoomar's full-sized avatar

Rishi Goomar rgoomar

View GitHub Profile
plugins {
id 'maven-publish'
}
#!groovy
pipeline {
stages {
stage('Check for CHANGELOG update') {
when { expression { env.BRANCH_NAME != 'master' } }
steps {
script {
sshagent(['CREDENTIAL_NAME']) {
sh "git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master"
sh "git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master"
sh "git fetch --no-tags"
@rgoomar
rgoomar / git-commands-blog.Jenkinsfile
Created July 28, 2020 17:16
Jenkinsfile with git comamnds
#!groovy
pipeline {
stages {
stage('Check for CHANGELOG update') {
when { expression { env.BRANCH_NAME != 'master' } }
steps {
script {
// Replace this with your SSH creds for git
sshagent(['CREDENTIAL_NAME']) {
List<String> sourceChanged = sh(returnStdout: true, script: "git diff --name-only origin/master..origin/$").split()
@rgoomar
rgoomar / git-commands-blog-1.sh
Created July 28, 2020 17:15
Git Diff Command for blog post
git diff --name-only origin/master..origin/branch-to-compare
@rgoomar
rgoomar / Makefile
Last active July 28, 2020 17:13
Terraform Version Manager Makefile
TERRAFORM_VERSION := 0.11.7
TERRAFORM_LOCATION := .tf
TERRAFORM_BINARY := $(CURDIR)/.tf/terraform
PLATFORM := $(shell uname | tr '[:upper:]' '[:lower:]')
# Download the correct terraform version
get-terraform:
@curl -o tf_tmp.zip https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_$(PLATFORM)_amd64.zip
@unzip -o -d .tf tf_tmp.zip
@rm tf_tmp.zip
# Check if Terraform binary exists, otherwise download it
@rgoomar
rgoomar / home.js
Created August 18, 2014 18:33
Meteor Rendered
Template.home.rendered = function() {
$('body').html('blah');
}
@rgoomar
rgoomar / gist:38ee38dab5838d82ee03
Created August 6, 2014 15:02
Example LESS Media Query
.container {
font-size: 18px;
@media (min-width: 768px) {
font-size: 12px;
}
}
@rgoomar
rgoomar / gist:6179f5cbf5d279b15919
Created July 24, 2014 16:21
Bootstrap Grid System Centering
// Add in row and column centering
.row-centered {
text-align:center;
}
.col-centered {
display:inline-block;
float:none;
/* reset the text-align */
text-align:left;
/* inline-block space fix */
function test() {
console.log("This is a test");
}