All Projects → ExpediaGroup → spinnaker-pipeline-trigger

ExpediaGroup / spinnaker-pipeline-trigger

Licence: Apache-2.0 license
Pipeline trigger for Spinnaker utilizing SNS

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to spinnaker-pipeline-trigger

setup-hashlink
A github action to install and setup Hashlink
Stars: ✭ 13 (-13.33%)
Mutual labels:  actions
standard-action
Github Action to lint with `standard` and friends
Stars: ✭ 15 (+0%)
Mutual labels:  actions
danger-action
Execute danger action for GitHub Actions.
Stars: ✭ 24 (+60%)
Mutual labels:  actions
mc-publish
GitHub Action that helps you publish your Minecraft mods
Stars: ✭ 76 (+406.67%)
Mutual labels:  actions
setup-sp
This action sets-up, cache and adds sourcemod scripting directory to the path
Stars: ✭ 30 (+100%)
Mutual labels:  actions
clang-tidy-review
Create a pull request review based on clang-tidy warnings
Stars: ✭ 33 (+120%)
Mutual labels:  actions
Real Time Social Media Mining
DevOps pipeline for Real Time Social/Web Mining
Stars: ✭ 22 (+46.67%)
Mutual labels:  actions
deployer-php-action
Deploy PHP projects using Deployer from Github Actions
Stars: ✭ 57 (+280%)
Mutual labels:  actions
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (+146.67%)
Mutual labels:  actions
verify-changed-files
Github action to verify file changes that occur during the workflow execution.
Stars: ✭ 62 (+313.33%)
Mutual labels:  actions
intelirest-cli
A cli interpreter for intelliJ .http files
Stars: ✭ 23 (+53.33%)
Mutual labels:  actions
branch-names
Github action to retrieve branch or tag names with support for all events.
Stars: ✭ 99 (+560%)
Mutual labels:  actions
action-add-labels
🏷️ GitHub Action to add labels
Stars: ✭ 65 (+333.33%)
Mutual labels:  actions
continuous-delivery-spinnaker-gke
Tutorial for deploying, configuring and running Spinnaker on GKE for continuous delivery
Stars: ✭ 34 (+126.67%)
Mutual labels:  spinnaker
html5validator-action
GitHub Action that checks HTML5 syntax.
Stars: ✭ 27 (+80%)
Mutual labels:  actions
unity-test-runner
Run tests for any Unity project
Stars: ✭ 134 (+793.33%)
Mutual labels:  actions
k8s-create-secret
GitHub Action to create Kubernetes cluster secrets
Stars: ✭ 24 (+60%)
Mutual labels:  actions
action-release-label
🏷️ GitHub Action to output a semver update level from a pull request release label
Stars: ✭ 41 (+173.33%)
Mutual labels:  actions
labeler
GitHub Action to assign labels to PRs based on configurable conditions
Stars: ✭ 47 (+213.33%)
Mutual labels:  actions
add-an-issue-reference-action
A GitHub Action for adding a related issue reference to a pull request.
Stars: ✭ 19 (+26.67%)
Mutual labels:  actions

spinnaker-pipeline-trigger

Trigger Spinnaker pipelines from Actions

Build Release

Usage

Include ExpediaGroup/spinnaker-pipeline-trigger as final step in workflow to trigger Spinnaker.

Basic

steps:
  - name: Spinnaker
    uses: ExpediaGroup/spinnaker-pipeline-trigger@v1
    with:
      topic_arn: ${{ secrets.SPINNAKER_TOPIC_ARN }}

Configure the pipeline trigger as example below, adjusting the Payload Constraints as needed:

  • repository: the org/repo repository key.
  • ref: match the ref used to trigger the workflow. Ex. main if the ref is for a merge to the main branch or refs/tags/* for when a new tag is created.

Spinnaker Automated Trigger

Default Parameters

The action sends the following information in the payload:

  • repository: The owner and repository name. For example, octocat/Hello-World.
  • commit: The commit SHA that triggered the workflow. For example, ffac537e6cbbf934b08745a378932722df287a53.
  • ref: The branch or tag ref that triggered the workflow. For example, refs/heads/feature-branch-1. If neither a branch or tag is available for the event type, the variable will not exist.
  • githubEventName: The name of the webhook event that triggered the workflow.
  • githubActor: The name of the person or app that initiated the workflow. For example, octocat.
  • githubAction: Always set to true when GitHub Actions is running the workflow. You can use this variable to differentiate when tests are being run locally or by GitHub Actions.

Additional Parameters

To pass additional parameters to the pipeline execution context, include the parameters input. Each key/value pair will be passed to Spinnaker and can be used in pipeline steps.

steps:
  - name: Spinnaker
    uses: ExpediaGroup/spinnaker-pipeline-trigger@v1
    with:
      topic_arn: ${{ secrets.SPINNAKER_TOPIC_ARN }}
      parameters: |
        parameter1: value1

Parameters are automatically added to Parameters of the pipeline. There is no need to define them separately.

Spinnaker Parameter Config

Message Attributes

To trigger a particular pipeline in a Spinnaker project with multiple pipelines, include the message_attributes input. Then add the corresponding message attributes to the Payload Constraints of the pipeline you wish to trigger.

steps:
  - name: Spinnaker
    uses: ExpediaGroup/spinnaker-pipeline-trigger@v1
    with:
      topic_arn: ${{ secrets.SPINNAKER_TOPIC_ARN }}
      parameters: |
        parameter1: value1
      message_attributes: awesome-attribute

Spinnaker Message Attributes

Requirements

This action uses SNS to send the message to Spinnaker. Permissions and configuraiton are needed for the runner and Spinnaker.

Runner

The runner requires sns:Publish permissions. If using a public runner, something like configure-aws-credentials can be used.

Spinnaker

Follow Spinnaker's directions for setting up a topic and queue with the following modifications.

  • Do not set up the S3 notification
  • messageFormat should be CUSTOM
  • Include the template below with the echo portion of the config.

Sample message format based on the default parameters being sent:

[
  {
    "reference": "{{ reference }}",
    "repository": "{{ repository }}",
    "commit": "{{ commit }}",
    "ref": "{{ ref }}",
    "githubEventName": "{{ githubEventName }}",
    "githubActor": "{{ githubActor }}",
    "githubAction": "{{ githubAction }}"
  }
]

License

The scripts and documentation in this project are released under the Apache 2 License.

Contributions

  • Run yarn all locally before committing.
  • Coverage limits are set at 90%.
  • Follow semantic-release commit formatting.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].