Last year, Expedia Group™ started a refresh of the internal CI/CD systems being used. Spinnaker was chosen for the CD part and GitHub Actions was being eyed for CI. When Actions was released for GitHub Enterprise Server, we decided to trial it as our CI tool.

Seamless Workflows

One of the unknowns identified during our evaluations was how to trigger a pipeline after a workflow had been run. When migrating to Spinnaker, we went with the GitHub trigger that would start a pipeline from a event.

The pipeline would start a Jenkins job that would do the release and publish parts. With Actions now consuming that event, we needed another trigger. There were two more trigger types that could accomplish our goal: webhook and Pub/Sub.

For webhook, a job would make an API call to Gate to trigger the intended pipeline. This requires an API key and IP connectivity to Gate from the runner.

Pub/Sub would use an AWS SNS Topic that a job would publish a message to. Spinnaker would then pick up that message from an AWS SQS queue and trigger the pipeline. Pub/Sub requires AWS AIAM permissions to publish but no IP connectivity.

We did not want to have to worry about supplying an API key to each GitHub Org and IP connectivity may or may not be there. The default runner pool could be given a role with publish permissions, thus eliminating passing around IAM User access keys and making Pub/Sub the winner.

Developing a Solution

To stitch it all together, we needed an Action that would publish a message. Any AWS CLI Action could do that. Even an SNS Publish Action would accomplish that task. However, Spinnaker requires a specific format and requiring users to keep that format in their workflow file would not yield positive results. For anyone.

This led us to building a new Action for this task. The requirements were simple:

  • Construct a message based on the context variables
  • Accept additional parameters to include with the message
  • Publish the message to a specific topic

We released the Open Source code on GitHub and it is available for use here: https://github.com/marketplace/actions/spinnaker-pipeline-trigger.

Trigger Overview

Attachments

  • Original document
  • Permalink

Disclaimer

Expedia Group Inc. published this content on 16 September 2021 and is solely responsible for the information contained therein. Distributed by Public, unedited and unaltered, on 16 September 2021 13:21:08 UTC.