Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update k8s pipeline #78

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.