Skip to content

Commit

Permalink
Merge pull request #78 from hyun357123/main
Browse files Browse the repository at this point in the history
update k8s pipeline
  • Loading branch information
hyun357123 authored Oct 10, 2024
2 parents 8a6ad9d + 7c3bf1b commit dea4236
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 8 deletions.
16 changes: 12 additions & 4 deletions bin/main/jenkins/kubernetes_helm_install_pipeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pipeline {
}
stages {
stage('Check and Install kubectl and Helm') {
steps {
script {
Expand All @@ -75,22 +77,28 @@ pipeline {
mkdir -p $HOME/bin
mv kubectl $HOME/bin/
'''
env.PATH = "${env.HOME}/bin:${env.PATH}"
env.KUBECTL_INSTALLED = true
}
sh "kubectl version --client"
// Check and install Helm
if (sh(script: "command -v helm", returnStatus: true) != 0) {
sh '''
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
HELM_INSTALL_DIR=$HOME/bin ./get_helm.sh --no-sudo
rm get_helm.sh
'''
env.PATH = "${env.HOME}/bin:${env.PATH}"
env.HELM_INSTALLED = true
}
sh "helm version"
}
}
}
}
stage('Check Tumblebug Connection') {
steps {
script {
Expand Down Expand Up @@ -153,7 +161,7 @@ pipeline {
if (helmCommands.containsKey(chart)) {
echo "Checking if ${chart} is already installed..."
def releaseName = "${chart}-release"
def isInstalled = sh(script: "helm list | grep ${releaseName}", returnStatus: true) == 0
def isInstalled = sh(script: "helm list --kubeconfig ${WORKSPACE}/kubeconfig | grep ${releaseName}", returnStatus: true) == 0
if (isInstalled) {
echo "${chart} is already installed. Upgrading..."
} else {
Expand Down
1 change: 1 addition & 0 deletions bin/main/jenkins/kubernetes_helm_uninstall_pipeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pipeline {
}
stages {
stage('Check and Install Tools') {
steps {
script {
Expand Down
16 changes: 12 additions & 4 deletions src/main/resources/jenkins/kubernetes_helm_install_pipeline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pipeline {
}
stages {
stage('Check and Install kubectl and Helm') {
steps {
script {
Expand All @@ -75,22 +77,28 @@ pipeline {
mkdir -p $HOME/bin
mv kubectl $HOME/bin/
'''
env.PATH = "${env.HOME}/bin:${env.PATH}"
env.KUBECTL_INSTALLED = true
}
sh "kubectl version --client"
// Check and install Helm
if (sh(script: "command -v helm", returnStatus: true) != 0) {
sh '''
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
HELM_INSTALL_DIR=$HOME/bin ./get_helm.sh --no-sudo
rm get_helm.sh
'''
env.PATH = "${env.HOME}/bin:${env.PATH}"
env.HELM_INSTALLED = true
}
sh "helm version"
}
}
}
}
stage('Check Tumblebug Connection') {
steps {
script {
Expand Down Expand Up @@ -153,7 +161,7 @@ pipeline {
if (helmCommands.containsKey(chart)) {
echo "Checking if ${chart} is already installed..."
def releaseName = "${chart}-release"
def isInstalled = sh(script: "helm list | grep ${releaseName}", returnStatus: true) == 0
def isInstalled = sh(script: "helm list --kubeconfig ${WORKSPACE}/kubeconfig | grep ${releaseName}", returnStatus: true) == 0
if (isInstalled) {
echo "${chart} is already installed. Upgrading..."
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pipeline {
}
stages {
stage('Check and Install Tools') {
steps {
script {
Expand Down
Binary file added src/main/resources/static/images/apache.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/grafana.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/mariadb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/nexus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/nginx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/redis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/images/tomcat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dea4236

Please sign in to comment.