Skip to content

Instantly share code, notes, and snippets.

View naviat's full-sized avatar
🪲

Harry Dam naviat

🪲
View GitHub Profile
@naviat
naviat / Jenkinsfile
Created July 6, 2021 02:05 — forked from danielgehr/Jenkinsfile
Jenkins pipeline template with environment configuration using gitflow
// ***********************
//
// Build and deploy different environments with jenkins pipeline
//
// Merge to develop -> triggers development release
// Merge to master without tag -> triggers staging release
// Merge to master with tag -> triggers staging and production release
// Production release requires manual approval on the jenkins job
//
// Configure jenkins pipeline project to pull tags! By default, tags are not pulled!
@naviat
naviat / Dockerfile
Created June 30, 2021 16:02 — forked from migueldoctor/Dockerfile
Dockerfile including open jdk8 + maven 3.6.1 + gradle 4.0.1
FROM openjdk:8-jdk-alpine
LABEL Miguel Doctor <[email protected]>
RUN apk add --no-cache curl tar bash procps
# Downloading and installing Maven
ARG MAVEN_VERSION=3.6.1
ARG USER_HOME_DIR="/root"
ARG SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544
@naviat
naviat / pyenv-cheat-sheet.md
Created June 26, 2021 07:26
pyenv cheat sheet

Python environment cheatsheet

Tool for creating isolated Python environments

The common use-cases:

  • Handling different versions of same libraries per each service
  • Same plus no access to site-packages
@naviat
naviat / sources.list
Created June 23, 2021 11:07 — forked from vczb/sources.list
Ubuntu 20.04 /etc/apt/sources.list
#deb cdrom:[Ubuntu 20.04.2.0 LTS _Focal Fossa_ - Release amd64 (20210209.1)]/ focal main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://br.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted
@naviat
naviat / logging.go
Created May 21, 2021 10:38 — forked from panta/logging.go
zerolog with file log rotation (lumberjack) and console output
package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"gopkg.in/natefinch/lumberjack.v2"
"os"
"path"
"io"
)
@naviat
naviat / Update_go_version.md
Last active May 10, 2021 06:52
Update go version to latest
  1. Download new go version at: https://golang.org/dl/

  2. Extract the archive you downloaded into /usr/local, creating a Go tree in /usr/local/go.

Important: This step will remove a previous installation at /usr/local/go, if any, prior to extracting. Please back up any data before proceeding.

For example, run the following as root or through sudo:

`rm -rf /usr/local/go && tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz`
# Maintainer: Jakub Hajek, [email protected]
#
# docker stack deploy -c stack-elastic.yml elastic
#
# The stack creates Elasticsearch cluster consiting of
# - 3 dedicated master nodes in order to keep quorum
# - 4 dedicated data nodes to manage CRUD,
#
# Docker compose file to easily deploy Elasticsearch cluster 7.x on Docker Swarm cluster.
@naviat
naviat / Jenkinsfile
Created April 22, 2021 03:56 — forked from mesaglio/Jenkinsfile
Jenkinsfile - Test - Package - Sonar - Quality Gate - Artifactory
pipeline {
agent any
tools {
maven 'Maven_3.6.2'
jdk 'Java_1.8u161'
}
environment {
GIT_VERSION = sh (returnStdout: true, script: 'git rev-parse HEAD | cut -c 1-10').trim()
pipeline {
agent any
triggers {
bitbucketPush()
}
tools {
jdk 'OpenJDK_1_8_0'
}
@naviat
naviat / Jenkinsfile.cd
Created April 20, 2021 08:05 — forked from dmclean62/Jenkinsfile.cd
My Jenkins pipeline
#!groovy
// Load the dsbjenkins library for some Jenkins pipeline utilities
@Library('[email protected]') _
// Start the pipeline
pipeline {
    // Run this pipeline in the dmsbuildsys docker agent
    agent { label 'DMS-2019.2-DMSBUILDSYS' }