Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
7bd3dcad
Commit
7bd3dcad
authored
Jul 20, 2021
by
carlosribas
Browse files
Use a different variable name for each cluster
parent
c2d4807b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
jenkins/wp-kubernetes.jenkinsfile
jenkins/wp-kubernetes.jenkinsfile
+10
-10
No files found.
jenkins/wp-kubernetes.jenkinsfile
View file @
7bd3dcad
...
...
@@ -83,7 +83,7 @@ pipeline {
}
if ("${CLUSTER}" == "HX") {
withCredentials([file(credentialsId: 'HX-WP-Config', variable: 'config')]) {
withCredentials([file(credentialsId: 'HX-WP-Config', variable: 'config
-hx
')]) {
sh """
# update repository
git reset --hard
...
...
@@ -95,14 +95,14 @@ pipeline {
curl -X POST -H 'Content-type: application/json' --data '{"text":"Starting deployment of ${params.BRANCH} in ${params.WEB}"}' $SLACK
# clear the cache
POD=`/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config} get pod -l app=memcached -o jsonpath="{.items[0].metadata.name}"`
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config} exec -it \$POD -- sh -c "echo flush_all | nc localhost 11211"
POD=`/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config
-hx
} get pod -l app=memcached -o jsonpath="{.items[0].metadata.name}"`
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config
-hx
} exec -it \$POD -- sh -c "echo flush_all | nc localhost 11211"
# reinstall everything
cd kubernetes/helm
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE}
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config
-hx
} --namespace ${NAMESPACE}
sleep 10
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE} ${VALUES} --set proxy=proxy-hx,database=${DB},searchIndex=${SEARCH_INDEX},rnacentralBranch=${params.BRANCH} .
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config
-hx
} --namespace ${NAMESPACE} ${VALUES} --set proxy=proxy-hx,database=${DB},searchIndex=${SEARCH_INDEX},rnacentralBranch=${params.BRANCH} .
sleep 10
# send final message on Slack
...
...
@@ -110,7 +110,7 @@ pipeline {
"""
}
} else if ("${CLUSTER}" == "HH") {
withCredentials([file(credentialsId: 'HH-WP-Config', variable: 'config')]) {
withCredentials([file(credentialsId: 'HH-WP-Config', variable: 'config
-hh
')]) {
sh """
# update repository
git reset --hard
...
...
@@ -122,14 +122,14 @@ pipeline {
curl -X POST -H 'Content-type: application/json' --data '{"text":"Starting deployment of ${params.BRANCH} in ${params.WEB}"}' $SLACK
# clear the cache
POD=`/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config} get pod -l app=memcached -o jsonpath="{.items[0].metadata.name}"`
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config} exec -it \$POD -- sh -c "echo flush_all | nc localhost 11211"
POD=`/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config
-hh
} get pod -l app=memcached -o jsonpath="{.items[0].metadata.name}"`
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/kubectl --kubeconfig=${config
-hh
} exec -it \$POD -- sh -c "echo flush_all | nc localhost 11211"
# reinstall everything
cd kubernetes/helm
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE}
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm uninstall ${RELEASE} --kubeconfig ${config
-hh
} --namespace ${NAMESPACE}
sleep 10
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config} --namespace ${NAMESPACE} ${VALUES} --set proxy=proxy-hh,database=${DB},searchIndex=${SEARCH_INDEX},rnacentralBranch=${params.BRANCH} .
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} --kubeconfig ${config
-hh
} --namespace ${NAMESPACE} ${VALUES} --set proxy=proxy-hh,database=${DB},searchIndex=${SEARCH_INDEX},rnacentralBranch=${params.BRANCH} .
sleep 10
# send final message on Slack
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment