This repository was archived by the owner on Jul 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 388
Update index.md #1958
Open
stephly07
wants to merge
3
commits into
spinnaker:master
Choose a base branch
from
stephly07:patch-13
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update index.md #1958
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,12 +9,12 @@ sidebar: | |||||
|
|
||||||
| This guide explains how to configure Spinnaker to trigger pipelines based on | ||||||
| changes in a [Google Cloud Storage](https://cloud.google.com/storage/) (GCS) | ||||||
| bucket, and inject changed GCS objects as [artifacts](/reference/artifacts) | ||||||
| bucket and inject changed GCS objects as [artifacts](/reference/artifacts) | ||||||
| into a pipeline. | ||||||
|
|
||||||
| This functionality uses Google's | ||||||
| [Pub/Sub](https://cloud.google.com/pubsub/docs/overview) system for delivering | ||||||
| messages to Spinnaker, and must be configured to send messages to | ||||||
| messages to Spinnaker and must be configured to send messages to | ||||||
| Spinnaker's event bus as shown below. | ||||||
|
|
||||||
| # Prerequisite configuration/setup | ||||||
|
|
@@ -35,22 +35,21 @@ You need the following: | |||||
| auth login` if you have installed `gcloud` for the first time. | ||||||
|
|
||||||
| * [A running Spinnaker instance](/setup/install/). This guide shows you how | ||||||
| to configure an existing one to accept GCS messages, and download the files | ||||||
| to configure an existing one to accept GCS messages and download the files | ||||||
| referenced by the messages in your pipelines. | ||||||
|
|
||||||
| * Artifact support [enabled](/reference/artifacts-with-artifactsrewrite//#enabling-artifact-support). | ||||||
|
|
||||||
| At this point, we will configure Pub/Sub, and a GCS artifact account. The | ||||||
| At this point, you'll configure Pub/Sub and a GCS artifact account. The | ||||||
| Pub/Sub messages will be received by Spinnaker whenever a file is uploaded or | ||||||
| changed, and the artifact account will allow you to download these where | ||||||
| changed. The artifact account will allow you to download these where | ||||||
| necessary. | ||||||
|
|
||||||
| ## 1. Configure Google Pub/Sub for GCS | ||||||
|
|
||||||
| Follow the [Pub/Sub configuration](/setup/triggers/google/), in particular, pay | ||||||
| attention to the [GCS | ||||||
| section](/setup/triggers/google/#receiving-messages-from-google-cloud-storage-gcs) | ||||||
| since this is where we'll be publishing our files to. | ||||||
| Follow the [Pub/Sub configuration](/setup/triggers/google/). | ||||||
| > __Note:__ Pay attention to the [GCS section](/setup/triggers/google/#receiving-messages-from-google-cloud-storage-gcs). | ||||||
| This is where we'll be publishing our files to. | ||||||
|
|
||||||
| ## 2. Configure a GCS artifact account | ||||||
|
|
||||||
|
|
@@ -68,7 +67,7 @@ to apply them in Spinnaker. | |||||
|
|
||||||
| # Using GCS artifacts in pipelines | ||||||
|
|
||||||
| We will need either an existing or a new pipeline that we want to be triggered | ||||||
| You'll need either an existing or a new pipeline that you want to be triggered | ||||||
| on changes to GCS artifacts. If you do not have a pipeline, create one as shown | ||||||
| below. | ||||||
|
|
||||||
|
|
@@ -82,24 +81,22 @@ below. | |||||
|
|
||||||
| ## Configure the GCS trigger | ||||||
|
|
||||||
| Let's add a Pub/Sub trigger to run our pipeline. | ||||||
| Let's add a Pub/Sub trigger to run the pipeline. | ||||||
|
|
||||||
| {% | ||||||
| include | ||||||
| figure | ||||||
| image_path="./add-trigger.png" | ||||||
| %} | ||||||
|
|
||||||
| Next, we must configure the trigger: | ||||||
| Next, you must configure the trigger: | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| * __Type__ is "Pub/Sub". | ||||||
| * __Pub/Sub System Type__ is "Google". | ||||||
| * __Subscription Name__ depends on what you've configured in your Pub/Sub | ||||||
| configuration using Halyard. | ||||||
| * __Attribute Constraints__ must be configured to include the pair `eventType`: | ||||||
| `OBJECT_FINALIZE` (see the | ||||||
| [docs](https://cloud.google.com/storage/docs/pubsub-notifications#events) for | ||||||
| an explanation). | ||||||
| | Field | Value | | ||||||
| |-------|-------| | ||||||
| | __Type__ | Pub/Sub | | ||||||
| | __Pub/Sub System Type__ | Google | | ||||||
| | __Subscription Name__ | Depends on what you've configured in your Pub/Sub configuration using Halyard | | ||||||
| | __Attribute Constraints__ | Must be configured to include the pair `eventType`:`OBJECT_FINALIZE` (see the [docs](https://cloud.google.com/storage/docs/pubsub-notifications#events) for an explanation) | | ||||||
|
|
||||||
| {% | ||||||
| include | ||||||
|
|
@@ -110,14 +107,14 @@ Next, we must configure the trigger: | |||||
|
|
||||||
| ## Configure the GCS artifact | ||||||
|
|
||||||
| Now we need to declare that the Pub/Sub trigger expects that a specific artifact | ||||||
| Now you'll need to declare that the Pub/Sub trigger expects a specific artifact | ||||||
| matching some criteria is available before the pipeline starts executing. In | ||||||
| doing so, you guarantee that an artifact matching your description is present in | ||||||
| the pipeline's execution context; if no artifact for this description is present, | ||||||
| doing so, you'll guarantee that an artifact matching your description is present in | ||||||
| the pipeline's execution context. If no artifact for this description is present, | ||||||
| the pipeline won't start. | ||||||
|
|
||||||
| To configure the artifact, go to the __Artifact Constraints__ dropdown for the | ||||||
| Pub/Sub trigger configuration, and select __"Define a new artifact..."__ to bring | ||||||
| Pub/Sub trigger configuration, and select __"Define a new artifact"__ to bring | ||||||
| up the __Expected Artifact__ form. | ||||||
|
|
||||||
| {% | ||||||
|
|
@@ -126,18 +123,19 @@ up the __Expected Artifact__ form. | |||||
| image_path="./expected-artifact.png" | ||||||
| %} | ||||||
|
|
||||||
| Enter a __Display Name__, or leave the autogenerated default. In the __Account__ | ||||||
| Enter a __Display Name__ or leave the autogenerated default. In the __Account__ | ||||||
| dropdown, select your GCS account. Enter the fully qualified GCS path in the | ||||||
| __Object path__ field. Note: this path can be a regular expression. You can, for | ||||||
| example, set | ||||||
| the object path to be `gs://${BUCKET}/folder/.*` to trigger on any change to an | ||||||
| object inside `folder` in your `${BUCKET}`. | ||||||
| __Object path__ field. | ||||||
|
|
||||||
| > __Note:__ This path can be a regular expression. You can, for | ||||||
| > example, set the object path to be `gs://${BUCKET}/folder/.*` to trigger on any change to an | ||||||
| > object inside `folder` in your `${BUCKET}`. | ||||||
|
|
||||||
| {% | ||||||
| include | ||||||
| figure | ||||||
| image_path="./expected-artifact.png" | ||||||
| caption="`${BUCKET}` is a placeholder for the GCS bucket name that you have | ||||||
| caption="`${BUCKET}` is a placeholder for the GCS bucket name that you | ||||||
| configured to receive Pub/Sub messages from above." | ||||||
| %} | ||||||
|
|
||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.