Skip to content

Instantly share code, notes, and snippets.

View melvinpetix's full-sized avatar

melvinpetix melvinpetix

View GitHub Profile
@giuseppeborgese
giuseppeborgese / devops.yml
Created March 26, 2021 15:41
ms teams notification
---
AWSTemplateFormatVersion: "2010-09-09"
Description: this is the notification project with ms teams
Parameters:
ProjectName:
Description: this name will prefix many names
Type: String
Default: notif
@mosesliao
mosesliao / DormaJenkinsfile
Last active May 20, 2021 22:55
Example of use of shared libraries
library identifier: 'jenkins-shared-libraries@master', retriever: modernSCM(
[$class: 'GitSCMSource',
remote: 'ssh://git@bitbucket.mycompany.net/smar/jenkins-shared-libraries.git',
credentialsId: 'jenkins-bitbucket-ssh-private-key'])
pipeline {
agent any
environment {
TEAMS_WEBHOOK_URL = credentials('digital-apac-webhook-url-for-ms-teams')
@NSnietol
NSnietol / docker-compose.yml
Last active June 20, 2021 16:23
Jenkins_slave_docker_compose
version: '3.7'
services:
jenkins_master:
image: jenkins/jenkins:lts
container_name: jenkins-lts
user: root
restart: always
volumes:
- $HOME/jenkins:/var/jenkins_home
ports:
# MASTER PRE-REQS
# Install docker, docker-compose
# mkdir -p ~/{jenkins,jnlp_slave}
# master
# docker run -d \
# -u root \
# --name=jenkins \
# -e TZ=America/Denver \
@liningtan
liningtan / calling_jenkin_remote.sh
Last active May 25, 2021 14:31
Remote Jenkin build
#https://JENKINS_URL/user/username/configure -> API Token
#token_auth under BuildItem -> Configure -> Build Trigger -> Trigger builds remotely
curl -X POST https://{api_token_name}:{api_token}@JENKINS_URL/job/item/buildWithParameters?token={token_auth}&PARAM=value1&PARAM2=value2
@wdrdres3qew5ts21
wdrdres3qew5ts21 / Jenkinsfile
Last active August 31, 2021 21:05
Deploy Spring Boot Application ที่ใช้ Maven package ไปยัง Azure Kubernetes Service
/*
เราตั้งใจสร้าง List ขึ้นมาเพื่อให้เป็น Template สำหรับ choice ในการเลือก
Environment Server สำหรับ Deploy เช่นบน Dev Server อาจจะมี IP
อยู่คนล่ะเครื่องกับ Production และ Database ก็อาจจะไมไ่ด้แยกแค่ระดับ Schema
แต่อาจจะแยกเป็นคนล่ะ DB อยู่คนล่ะที่กันเลย ซึ่งเราจะใช้ตัวแปรที่เป็น Constant เหล่านี้ในการทำเงื่อนไข
ว่าถ้าหากเป็น Dev Server ตัวแปร DB Server ก็จะมี Value คนล่ะอย่างกับ Prodcution นั่นเอง
*/
def getServerEnvironmentList(){
return ['DEV', 'SIT', 'UAT', 'PROD']
}
@gerlie-reyes
gerlie-reyes / DevOps - Jenkins Tutorial.md
Last active March 4, 2023 15:30
DevOps - Jenkins Tutorial

Jenkins from Zero to Hero

Jenkins

@Lukas238
Lukas238 / readme.md
Created June 5, 2020 19:42
Jenkins to Teams Job Deploy notification Incomming Webhook

Jenkins to Teams Job Deploy notification Incomming Webhook

I wanted to have a Teams channel where to inform the team each time a deloy was successful.

Initialy I used the "Jenkins" connector, but found the posted information too generic. No branch nor commit number.

So I switched to use the "Incoming Webhook" connector, with allows me to create a Teams chat webhook URL to receive a JSON formated accordingly to the [Teams message card format], with whate ever information I requiere.

Then, in the Build section of the Jenkins Job, I added an "Execute Shell" build step, with the following code:

@klolivei
klolivei / JenkinsFile
Created May 26, 2020 17:54
JenkinsFile
def label = 'ci-runner'
def npmToken = <PROJECT_NPM_TOKEN>
podTemplate(
label: label,
containers: [
containerTemplate(
name: 'jnlp',
image: <YOUR_IMAGE>,
workingDir: '/home/jenkins',

Continuous Integration with Gitlab and Jenkins: Gitlab Configuration and Jenkins Setup

This is the second part of the three-part gist for setting up a basic CI environment on a single machine (e.g., a laptop), for dev / test / proof-of-concept, etc.
This CI environment consists of:

  1. Gitlab (Community Edition) as a source-code repository
  2. Jenkins for build and continuous integration Gitlab cannot be used without a mail server (Postfix). So, we also set up Postfix.

Gist Breakup