CDS Workflow Configuration Files, checked into source control, provides several benefits:
This usage of
CDS Workflow Configuration Files is particulary suitable for single repository CI/CD workflows.
CDS Workflow Configuration Files relies on several text files with YAML syntax in a
.cds directory at the root of your repository. Several files may be used to describe each component, such as applications, environments and pipelines in your CDS workflow.
This basic example represents a simple Java application which will be built and deployed from CDS.
➜ cdsdemo git:(master) ls -la total 8 drwxr-xr-x 6 fsamin staff 192 Mar 27 11:01 . drwxr-xr-x 3 fsamin staff 96 Mar 27 11:01 .. drwxr-xr-x 6 fsamin staff 192 Mar 27 11:01 .cds drwxr-xr-x 12 fsamin staff 384 Mar 27 11:07 .git -rw-r--r-- 1 fsamin staff 23 Mar 27 11:01 .gitignore drwxr-xr-x 4 fsamin staff 128 Mar 27 11:01 api
At the root of the repository a
.cds directory contains all the
CDS Configuration Files.
➜ cdsdemo git:(master) cd .cds ➜ .cds git:(master) ls -la total 32 drwxr-xr-x 6 fsamin staff 192 Mar 27 11:01 . drwxr-xr-x 6 fsamin staff 192 Mar 27 11:01 .. -rw-r--r-- 1 fsamin staff 201 Mar 27 11:01 build.pip.yml -rw-r--r-- 1 fsamin staff 104 Mar 27 11:01 deploy.pip.yml -rw-r--r-- 1 fsamin staff 28 Mar 27 11:01 demo.app.yml -rw-r--r-- 1 fsamin staff 178 Mar 27 11:01 democds.yml
Here we have 4 yaml files, two pipelines:
deploy.pip.yml, one application
demo.app.yml and the overall workflow description file
First of all, here is the workflow file:
name: democds workflow: build: pipeline: build-jar application: demo deploy: depends_on: - build pipeline: deploy-jar application: demo
This is the representation of the whole workflow, starting from
deploy. As shown, the workflow file contains the description of pipelines orchestration only.
Read more about CDS workflow syntax
The pipelines files represents the most important part of your workflow. The pipeline file represents the jobs triggered within parallel stages.
Read more about CDS pipeline syntax
The application file describe the application and the way to checkout it. It can also set number of variables.
Read more about CDS application syntax
You can attach an environment to a pipeline in a workflow. An environemnt is basically a set of variables.
Read more about CDS environment syntax