Link Search Menu Expand Document
Consortium of European Social Science Data Archives

Adding the Deployment Jenkinsfile


See Naming Conventions.


The component deployment code is stored in a different repository to the build code. It uses a parametrised Jenkinsfile so an exact version of the application can be deployed (for example, a specific version for production). This parameter can be manually or automatically specified by calling jobs.

parameters {
    string(name: 'imageTag', defaultValue: 'latest', description: 'The version of the application to deploy, default is latest if unspecified')

From this the environment should match the build environment.

If the chart has external dependencies, these must be updated before the deployment starts. This can be done with the following stage.

stage('Update Dependencies') {
    steps {
        sh 'helm dependency update .'

This stage deploys the application with the image tag specified in the job parameters.

stage('Create deployment') {
    steps {
        echo 'Run Coffeepot Creation Deployment'
        echo "Using image tag ${imageTag}"
        sh "helm upgrade ${productName} . -n ${productName} -i --atomic --set image.tag=${imageTag}"

Helm deploys the component with the name ${productName} to the namespace ${productName} using the image tag ${imageTag}. See the Helm documentation and using Helm to deploy products for more information.