Commit 0c4ffa62 authored by carlosribas's avatar carlosribas
Browse files

Add kubeconfig and namespace to the command

parent b570f6f7
......@@ -28,19 +28,6 @@ pipeline {
stage("deploy") {
steps {
script {
// check if the tag exists
def command = 'curl https://registry.hub.docker.com/v1/repositories/rnacentral/rnacentral-webcode/tags | grep ${params.BRANCH}'
def result = sh(script: command, returnStatus: true)
echo "${result}"
def command2 = $/eval 'curl https://registry.hub.docker.com/v1/repositories/rnacentral/rnacentral-webcode/tags | grep ${params.BRANCH}'/$
def result2 = sh(script: command, returnStdout: true)
echo "${result2}"
//if (result != 0) {
// error('Failed to build')
//}
// set DB with the corresponding Secret file
switch(params.DATABASE) {
case 'PRO':
......@@ -76,7 +63,10 @@ pipeline {
withCredentials([file(credentialsId: 'HX-WP-Config', variable: 'config')]) {
sh """
git checkout python3-version
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE}
echo 'Deleting pods'
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE}
sleep 10
echo 'Creating pods'
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE} --set proxy=proxy-hx,database=${DB},rnacentralBranch=${params.BRANCH} kubernetes/helm
"""
}
......@@ -84,7 +74,10 @@ pipeline {
withCredentials([file(credentialsId: 'HH-WP-Config', variable: 'config')]) {
sh """
git checkout python3-version
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE}
echo 'Deleting pods'
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE}
sleep 10
echo 'Creating pods'
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE} --set proxy=proxy-hh,database=${DB},rnacentralBranch=${params.BRANCH} kubernetes/helm
"""
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment