Source Directory

Source directory can be used to specify a custom directory that a pipeline is based upon. You can specify it when you create the pipeline in Screwdriver UI or update your current pipeline to add the directory. This can be useful for running workflows based on subdirectories in a monorepo. With custom source directory, now you can create multiple pipelines on a single repository.

Source Directory format

The directory path is relative to the root of the repository. You must have a screwdriver.yaml under your source directory.

Example

Given a repository with the file structure depicted below:

┌── README.md
├── screwdriver.yaml
├── myapp1/
│   └── ...
├── myapp2/
│   ├── app/
│   │   ├── main.js
│   │   ├── ...
│   │   └── package.json
│   └── screwdriver.yaml
│
...
Create pipeline with source directory

Create UI

Update pipeline with source directory

Update UI

In this example, jobs that requires: [~commit, ~pr] will be triggered if there are any changes to files under myapp2.

Example repo: https://github.com/screwdriver-cd-test/source-dir-example

Caveats