diff --git a/bin/main/jenkins/kubernetes_helm_install_pipeline.xml b/bin/main/jenkins/kubernetes_helm_install_pipeline.xml index d63e97c..b00e2d5 100644 --- a/bin/main/jenkins/kubernetes_helm_install_pipeline.xml +++ b/bin/main/jenkins/kubernetes_helm_install_pipeline.xml @@ -64,6 +64,8 @@ pipeline { } stages { + + stage('Check and Install kubectl and Helm') { steps { script { @@ -75,6 +77,7 @@ pipeline { mkdir -p $HOME/bin mv kubectl $HOME/bin/ ''' + env.PATH = "${env.HOME}/bin:${env.PATH}" env.KUBECTL_INSTALLED = true } sh "kubectl version --client" @@ -82,15 +85,20 @@ pipeline { // 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 { @@ -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 { diff --git a/bin/main/jenkins/kubernetes_helm_uninstall_pipeline.xml b/bin/main/jenkins/kubernetes_helm_uninstall_pipeline.xml index 84b4d82..eac0b26 100644 --- a/bin/main/jenkins/kubernetes_helm_uninstall_pipeline.xml +++ b/bin/main/jenkins/kubernetes_helm_uninstall_pipeline.xml @@ -56,6 +56,7 @@ pipeline { } stages { + stage('Check and Install Tools') { steps { script { diff --git a/src/main/resources/jenkins/kubernetes_helm_install_pipeline.xml b/src/main/resources/jenkins/kubernetes_helm_install_pipeline.xml index d63e97c..b00e2d5 100644 --- a/src/main/resources/jenkins/kubernetes_helm_install_pipeline.xml +++ b/src/main/resources/jenkins/kubernetes_helm_install_pipeline.xml @@ -64,6 +64,8 @@ pipeline { } stages { + + stage('Check and Install kubectl and Helm') { steps { script { @@ -75,6 +77,7 @@ pipeline { mkdir -p $HOME/bin mv kubectl $HOME/bin/ ''' + env.PATH = "${env.HOME}/bin:${env.PATH}" env.KUBECTL_INSTALLED = true } sh "kubectl version --client" @@ -82,15 +85,20 @@ pipeline { // 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 { @@ -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 { diff --git a/src/main/resources/jenkins/kubernetes_helm_uninstall_pipeline.xml b/src/main/resources/jenkins/kubernetes_helm_uninstall_pipeline.xml index 84b4d82..eac0b26 100644 --- a/src/main/resources/jenkins/kubernetes_helm_uninstall_pipeline.xml +++ b/src/main/resources/jenkins/kubernetes_helm_uninstall_pipeline.xml @@ -56,6 +56,7 @@ pipeline { } stages { + stage('Check and Install Tools') { steps { script { diff --git a/src/main/resources/static/images/apache.png b/src/main/resources/static/images/apache.png new file mode 100644 index 0000000..524d314 Binary files /dev/null and b/src/main/resources/static/images/apache.png differ diff --git a/src/main/resources/static/images/grafana.jpg b/src/main/resources/static/images/grafana.jpg new file mode 100644 index 0000000..87eb195 Binary files /dev/null and b/src/main/resources/static/images/grafana.jpg differ diff --git a/src/main/resources/static/images/mariadb.png b/src/main/resources/static/images/mariadb.png new file mode 100644 index 0000000..434f12f Binary files /dev/null and b/src/main/resources/static/images/mariadb.png differ diff --git a/src/main/resources/static/images/nexus.png b/src/main/resources/static/images/nexus.png new file mode 100644 index 0000000..5f2a03f Binary files /dev/null and b/src/main/resources/static/images/nexus.png differ diff --git a/src/main/resources/static/images/nginx.png b/src/main/resources/static/images/nginx.png new file mode 100644 index 0000000..10df564 Binary files /dev/null and b/src/main/resources/static/images/nginx.png differ diff --git a/src/main/resources/static/images/redis.png b/src/main/resources/static/images/redis.png new file mode 100644 index 0000000..49c74bc Binary files /dev/null and b/src/main/resources/static/images/redis.png differ diff --git a/src/main/resources/static/images/tomcat.png b/src/main/resources/static/images/tomcat.png new file mode 100644 index 0000000..f9710da Binary files /dev/null and b/src/main/resources/static/images/tomcat.png differ