This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file provider.pkr.hcl | |
######################### | |
packer { | |
required_plugins { | |
googlecompute = { | |
source = "github.com/hashicorp/googlecompute" | |
version = "~> 1" | |
} | |
ansible = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Please create the required secrets | |
#Script path- jenkins-series/scripts/send_slack.sh | |
#!/bin/bash | |
set -e | |
usage() { | |
echo "usage: ${0##*/} -u <SLACK_URL> -t <TEXT> -w <GITHUB_WOFKFLOW>" | |
exit 1 | |
} | |
send_slack() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#######Get the Workflow id using GitHub API############### | |
% curl -L -H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer XXXXXXXXXXXXXXXX"\ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/parjun8840/gha01/actions/workflows | |
{ | |
"total_count": 10, | |
"workflows": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def roleArn = "arn:aws:iam:123467890:role/jenkins-iam" | |
def profile = "--profile devops" | |
//In Terraform I prefer using argumnet "ignore_changes" inside "lifecycle" block for the NodeGroup | |
//and manage the Nodes count independentely to control the cost & easy operations | |
pipeline{ | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def call(String repoUrl) { | |
pipeline { | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: | |
- name: maven |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
folder('operations') { | |
displayName('operations') | |
description('Operations related all Jobs') | |
} | |
folder('operations/sre') { | |
displayName('operations-sre') | |
description('Operations related all Jobs for sre') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
folder('operations') { | |
displayName('operations') | |
description('Operations related all Jobs') | |
} | |
folder('operations/sre') { | |
displayName('operations-sre') | |
description('Operations related all Jobs for sre') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def friends_name = ["TOM", "JACk", "HARRY"] | |
pipeline{ | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: | |
- name: kubectl-image | |
image: alpine/k8s:1.24.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 | |
kind: Pod | |
spec: | |
containers: | |
- name: maven | |
image: maven:alpine |
NewerOlder