Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
e254b816
Commit
e254b816
authored
May 17, 2021
by
carlosribas
Browse files
Use gitParameter again
parent
f644ef82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
jenkins/wp-kubernetes.jenkinsfile
jenkins/wp-kubernetes.jenkinsfile
+9
-9
No files found.
jenkins/wp-kubernetes.jenkinsfile
View file @
e254b816
...
...
@@ -16,18 +16,18 @@ pipeline {
choices: ['PRO', 'DEV', 'TEST', 'FB', 'HH'],
description: 'Which database instance to use?'
)
gitParameter(
branchFilter: 'origin/(.*)',
defaultValue: 'master',
name: 'BRANCH',
type: 'PT_BRANCH',
description: 'Name of the branch to test and deploy'
)
}
stages {
stage("deploy") {
steps {
script {
// get Docker Hub tags
def DOCKER_TAGS = sh (script: 'curl https://registry.hub.docker.com/v1/repositories/rnacentral/rnacentral-webcode/tags | grep -zoP "name\":\s*\K[^\s,]*(?=\s*,)" | sed -e "s/^\"//" -e "s/\"}$//"', returnStdout:true).trim()
input(
message: "Select a Docker Hub tag",
parameters: [choice(name: "TAG", choices: "${DOCKER_TAGS}", description: "Docker Hub tag")]
)
// set DB with the corresponding Secret file
switch(params.DATABASE) {
case 'PRO':
...
...
@@ -66,7 +66,7 @@ pipeline {
echo ${params.DOCKER_IMAGE_TAG}
git checkout python3-version
cd kubernetes/helm
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} . --kubeconfig ${config} --namespace ${NAMESPACE} --set proxy=proxy-hx,database=${DB},rnacentralBranch=${
TAG
}
/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
}
"""
}
} else if (params.CLUSTER == 'HH') {
...
...
@@ -74,7 +74,7 @@ pipeline {
sh """
git checkout python3-version
cd kubernetes/helm
/net/isilonP/public/rw/homes/xfm_adm/.jenkins/helm upgrade --install ${RELEASE} . --kubeconfig ${config} --namespace ${NAMESPACE} --set proxy=proxy-hh,database=${DB},rnacentralBranch=${
TAG
}
/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
}
"""
}
}
...
...
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