Working with GitHub in Spinnaker Pipelines
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
goodwould list all files that start with “good”. In regexes, a * character simply “matches 0 or more of the preceding character” –
goodwould then match “goo”, “good”, and “goodddddd”, but wouldn’t match “goodbar”. If you need help with the regex syntax, this is a good introduction.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.