Add a new material to an existing GoCD pipeline

Now that you have a pipeline, lets add another material to it.

  • Navigate to the new pipeline you created by clicking on the Edit link under the Actions against it. You can also click on the name of the pipeline. Add Material to Existing Pipeline - 图1
  • Click on the Materials tab. Add Material to Existing Pipeline - 图2
  • You will notice an existing material . Click on the “Add new material” link. Add Material to Existing Pipeline - 图3
  • You will get the following message Add Material to Existing Pipeline - 图4
  • Edit the existing material and specify the destination directory Add Material to Existing Pipeline - 图5
  • Click “Save”.

Blacklist

Often you do want to specify a set of files that GoCD should ignore when it checks for changes. Repository changesets which contain only these files will not automatically trigger a pipeline. These are detailed in the ignore section of the configuration reference.

  • Enter the items to blacklist using ant-style syntax below Add Material to Existing Pipeline - 图6
  • Click “Save”.

Whitelist

There are cases where instead of ignoring those files or folder/s, you want GoCD to consider only the specified files or folders when checking for changes and ignore the rest. With GoCD whitelisting, you can allow a pipeline to trigger on certain repository changesets.

  • Click on “Invert the file filter….” to enable whitelisting Add Material to Existing Pipeline - 图7
  • Click “Save”.

Note - GoCD uses '**' for folder/path and '*' for files.

Examples:

  1. <ignore pattern="doc/**/*" />

Ignore everything under the folder ‘doc’, even deeper levels of subfolders/files under doc folder.

  1. <ignore pattern="doc/*" />

Ignore files under the folder ‘doc’, excluding any subfolder.

  1. <ignore pattern="framework/helper/*.doc" />

Ignore files that are under the directory ‘framework/helper’ and the file extension is .doc.

  1. <ignore pattern="*.pdf" />

Ignore files that are under the root directory of SCM repository and the file extension is .pdf.

  1. <ignore pattern="**/helper/*.pdf" />

Ignore all the files that is under any ‘helper’ folder and the file extension is .pdf.

  1. <ignore pattern="helper/**/*.pdf" />

Ignore all the files that are in the nested directory under folder ‘helper’ of the repository and the file extension is .pdf.