You are viewing version 2.21 of the documentation, which is no longer maintained. For up-to-date documentation, see the latest version.

Working with Github

Trigger a Pipeline with a Github commit

Before you start, you’ll need to configure your Github repositories. You’ll be able to configure a pipeline trigger without having configured your Github webhook, but the trigger won’t fire until Spinnaker can receive those calls from Github.

To add a Github trigger to your pipeline, go to your configurations stage and select “Add Trigger”, then select “Git” from the Type dropdown menu. Then select “github”. You can then enter your organization (ex. “armory”) and the repository name to monitor (ex. “demoapp”). Branch and Secret are optional, although it’s recommended you set Branch to whatever the name of your production branch is (usually master) so you only trigger pipelines when code is committed to the production branch. The Branch field also supports regular expressions, so you can limit the trigger to several branches with common patterns or partial matches.

A Regular Expression (“regex”) is similar to, but different than, a wildcard. You may be familiar with wildcards on your command line, where good would list all files that start with “good”. In regexes, a * character simply “matches 0 or more of the preceding character” – good would then match “goo”, “good”, and “goodddddd”, but wouldn’t match “goodbar”. If you need help with the regex syntax, this is a good introduction.

Configure Github Trigger

Using artifacts from Github

Before you start, you’ll need to configure Github as an artifact source You won’t see the Github artifact type until this is configured.

Last modified June 16, 2020: fix rest of 404s (7a31ec9)