Import a CDS Workflow from a repository

In this tutorial, you will create a CDS Workflow from an existing git repository.

  • The repository have to add .cds/ directory.
  • With the web UI, on will create a CDS Workflow ‘as code’.

Prerequisites

Prepare your git repository

The easiest way to initialize cds files in your repository is to follow first tutorial

Create the pipeline file .cds/build.pip.yml

version: v1.0
name: build-pipeline
jobs:
- job: First job
  steps:
  - checkout: '{{.cds.workspace}}'
  - script: mvn package
  - artifactUpload: target/*.jar
  requirements:
  - binary: git

Create the application file .cds/cdsdemo.app.yml

version: v1.0
name: cdsdemo
vcs_server: github
repo: your-orga/cdsdemo
vcs_branch: '{{.git.branch}}'
vcs_default_branch: master
vcs_pgp_key: app-pgp-github

Create the workflow file .cds/cdsdemo.yml

name: cdsdemo
version: v1.0
pipeline: build-pipeline
payload:
  git.branch: "master"
  git.repository: yesnault/cdsdemo
application: cdsdemo  
pipeline_hooks:
- type: Git Repository Poller

Create workflow from UI

Attach repo manager

Workflow tab

Choose a repo manager - create workflow

Choose repo

Create workflow

Resume page

See Workflow