Working with Github

This guide includes:

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.