The purpose of this document is to make a how-to for having a conda package build on Jenkins. This document includes templates for accomplishing this goal. The first step is to create a conda recipe for a CSC. A template for doing so has been included on this page.

Creating the Recipe#

Create a conda folder inside the root directory CSC repository. Then copy the contents of the meta.yaml template into a meta.yaml file inside of the conda folder. Change the csc-name so that it becomes the name of the csc. Another thing is to add requirements so that they match the CSC’s. Keep in mind that the test requirements need to include test framework dependencies. It is suggested to sort dependencies as that increases readability of the recipe. To find the configuration repo, look for the get_config_pkg() in the CSC class.

{% set data= load_setup_py_data() %}
    name: csc-name
    version: {{ data.get('version') }}

    path: ../

    noarch: python
    script: {{ PYTHON }} -m pip install --no-deps --ignore-installed .

        - ts-conda-build =0.3
        - ts-idl {{ idl_version }}
        - ts-salobj {{ salobj_version }}
        - bin
        - pyproject.toml
        - python
        - tests
        - pytest

        - python {{ python }}
        - setuptools
        - setuptools_scm
        - python {{ python }}
        - setuptools
        - setuptools_scm
        - ts-conda-build =0.3
        - python {{ python }}
        - setuptools
        - setuptools_scm
        - ts-idl
        - ts-salobj
        # Add any other runtime dependencies here

Locally test the recipe by running the following command

docker run -e {config_repo}=/path/to/config/repo \\
    -v /path/to/your/repos:/home/saluser/develop \\

Then run the following inside of the container.

cd path/to/conda/recipe
conda build --variants "{salobj_version: '', idl_version: ''}" --prefix-length 100 .

Creating the Jenkinsfile#

Once that is passing, move onto creating the Jenkinsfile.conda file. A template has been included below. It takes the following arguments


A list of configuration repos, can be empty, one or many.


The name of the package.


This is the namespace location for the module, for the coverage extension.


This is the architecture of the conda package to create. It can be linux-64 or noarch. It may be omitted and defaults to linux-64. When specifying noarch in the conda recipe, this argument must be set to noarch.

CondaPipeline(["configuration_repo"], "package_name", "module_namespace", "arch")

Adding the Job#

Add the job by creating a new item on the Jenkins server and selecting Multibranch Pipeline.


In Branch Sources click the github source selection and type in the path of the repo into the Respository HTTPS URL.


Then in the behaviors subsection click the add button and find the Custom GitHub Notification Context behavior.


Check the Apply Suffix box and in the label field add /conda to the end of the value.

Then in Build strategies click the add button and find the Tags strategies and leave the default values.


Then in Build Configuration add .conda to the Script Path field.


Then click Apply and Save.


If your job has a build strategy for regular branches, remove it as these jobs are not yet ready to be run on PR or branches.