Our current build and tests are supporting different versions of python and using different options for our tests. Since tests are parameterizable I was able to minimize code in a very great fashion. The last part to keep it DRY would be to parameterize my workflows since I am using the exactly same workflow only once with executor python 3.7 and executor python 3.6. I would like to pass this parameter to a workflow to not duplicate the whole job sequence for both. It could look something like this:
workflow-template: generic-build-and-test: parameters: py-version: description: "python version to be used in the executor" default: latest type: string jobs: - build: python: << parameters.py-version >> # (you could also pass eecutor type) - test: python: << parameters.py-version >> # (you could also pass eecutor type)
#and thenworkflows: generic-build-and-test: name: build-and-test-3.6 py-version: "3.6" generic-build-and-test: name: build-and-test-3.7 py-version: "3.7"
In this example I followed the idea of jobs, how to use multiple jobs in the same workflow, also how to distinguish between them and ported this to workflows.
CCI-I-668