Skip to content

Commit

Permalink
add armory cd and spinnaker operator install
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeeu committed Sep 14, 2023
1 parent f6414a2 commit ef4ed0a
Show file tree
Hide file tree
Showing 10 changed files with 554 additions and 273 deletions.
29 changes: 29 additions & 0 deletions content/en/includes/plugins/github/accounts-config-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
In this example, you have `company-public` and `company-private` GitHub organizations, so you created two GitHub Apps, one for each org.
* You installed the GitHub App for the `company-private` org with access to all repos in the org.
* You installed the GitHub App for the `company-public` org with access to two specific repos in the org.

Your `accounts` config looks like this:

```yaml
github:
plugin:
accounts:
- name: FirstAppRepo
organization: company-public
repository: first-app-repo
defaultBranch: master
githubAppId: 9753
githubAppPrivateKey: encrypted:k8s!n:spin-secrets!k:github-company-public-token
- name: SecondAppRepo
organization: company-public
repository: second-app-repo
defaultBranch: main
githubAppId: 9753
githubAppPrivateKey: encrypted:k8s!n:spin-secrets!k:github-company-public-token
- name: CompanyPrivateOrgAllRepos
organization: company-private
orgWide: true
defaultBranch: main
githubAppId: 1357
githubAppPrivateKey: encrypted:k8s!n:spin-secrets!k:github-company-private-token
```
3 changes: 3 additions & 0 deletions content/en/includes/plugins/github/compat-matrix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
| Armory CD Version | Spinnaker Version | GitHub API Plugin Version |
|:----------------- |:----------------- | :------------------------ |
| 2.30.x | 1.30.x | 1.0.0 |
15 changes: 15 additions & 0 deletions content/en/includes/plugins/github/install-reqs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* You have read the GitHub API Plugin [overview]({{< ref "plugins/github-api/_index.md" >}}).
* You are familiar with [GitHub Apps](https://docs.github.com/en/apps/overview).
* You need to create and install a GitHub App that interacts with the GitHub API plugin.

1. Create a GitHub App. Follow the instructions in GitHub's [Registering a GitHub App](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) guide.

* Provide values for **GitHub App name**. **Homepage URL**, and **Repository permissions**. You _do not_ need to fill out the **Identifying and authorizing users**, **Post installation**, or **Webhook** sections.
* Your GitHub App should have the following **Repository permissions**:

* **Actions**: `Read and write`
* **Contents**: `Read and write`
* **Deployments**: `Read and write`
* **Metadata**: `Read-only`

1. Install the GitHub App you created either in a specific repo or organization-wide. Follow the instructions in GitHub's [Installing your own GitHub App](https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app) guide.
49 changes: 49 additions & 0 deletions content/en/includes/plugins/github/plugin-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

* `version`: Replace `<version>` with the plugin version compatible with your Spinnaker version.
* `accounts`: Configure the GitHub location(s) where you installed the GitHub App you created. The configuration differs depending on whether you installed the GitHub App organization-wide or with access to individual repositories.

Check failure on line 3 in content/en/includes/plugins/github/plugin-config.md

View workflow job for this annotation

GitHub Actions / Vale

[error] Google.OptionalPlurals

Don't use plurals in parentheses such as in 'location(s)'.

{{< tabpane text=true right=true >}}
{{% tab header="**Account Config**:" disabled=true /%}}
{{% tab header="Individual Repo" %}}

```yaml
- name: <name>
organization: <github_organization>
repository: <github_repository>
defaultBranch: <default_github_branch>
githubAppId: <github_app_id>
githubAppPrivateKey: <your_github_private_key>
```
All fields are required.
* `name`: Unique name; this name appears in the GitHub API stages' `GitHub Account` select list.
* `organization`: GitHub organization that you installed the GitHub App in
* `repository`: The GitHub repository to access
* `defaultBranch`: Default repository branch; for example, main or master
* `githubAppId`: The GitHub App's **App ID**
* `githubAppPrivateKey`: The GitHub App's private key; this field supports encrypted field references; see [Work with Secrets in Spinnaker]({{< ref "continuous-deployment/armory-admin/secrets" >}}) for details.

{{% /tab %}}
{{% tab header="All Repos in Org" %}}

```yaml
- name: <name>
organization: <github_organization>
orgWide: true
defaultBranch: <default_github_branch>
githubAppId: <github_app_id>
githubAppPrivateKey: <your_github_private_key>
```

All fields are required.

* `name`: Unique name; this name appears in the GitHub API stages' `GitHub Account` select list.
* `organization`: GitHub organization that you installed the GitHub App in
* `orgWide`: `true`
* `defaultBranch`: Default repository branch; for example, main or master
* `githubAppId`: The GitHub App's **App ID**
* `githubAppPrivateKey`: The GitHub App's private key; this field supports encrypted field references; see [Work with Secrets in Spinnaker]({{< ref "continuous-deployment/armory-admin/secrets" >}}) for details.

{{% /tab %}}
{{< /tabpane >}}
46 changes: 37 additions & 9 deletions content/en/plugins/github-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ title: GiHub API Plugin for Spinnaker
linkTitle: GitHub API
no_list: true
description: >
TBD
Armory's GitHub API Plugin provides features that enable engineers to trigger Spinnaker pipelines from GitHub workflows, update GitHub deployment status based on pipeline outcome, and view GitHub Action logs in Spinnaker.
---


## What the GitHub API plugin does
## GitHub API Plugin features

Check warning on line 10 in content/en/plugins/github-api/_index.md

View workflow job for this annotation

GitHub Actions / Vale

[warning] Google.Headings

'GitHub API Plugin features' should use sentence-style capitalization.

Spinnaker is not offering a native integration with GitHub actions as it does with other CI systems like Jenkin, Gitlab CI, Travis, etc.
The GitHub API Plugin provides GitHub integration features that Spinnaker lacks:

By using the GitHub API plugin, we offer you multiple integration points between GitHub and Spinnaker:

- Spinnaker stages to trigger GitHub workflows using **workflow_dispatch** or **repo_dispatch** events
- Monitor GH workflow and finish the pipeline execution based on the GitHub Workflow conclusion
- Trigger a Spinnaker pipeline from a GitHub workflow using **workflow_dispatch** or **repo_dispatch** events
- Trigger a Spinnaker pipeline automatically when a GitHub workflow finishes successfully
- Trigger a Spinnaker pipeline when a new GitHub Deployment is created
- Monitor a GitHub workflow and finish pipeline execution based on the GitHub workflow result
- Update GitHub deployment status based on Spinnaker pipeline conclusion
- View Github Action Logs in Spinnaker, meaning there is no need to navigate to GitHub to view the logs
- View Github Action Logs in Spinnaker -- there is no need to navigate to GitHub to view the logs

All the integration points mentioned above use the concept of GitHub Apps.

Expand Down Expand Up @@ -61,5 +59,35 @@ orca ->> gh: "Deployment status update: in_progress, success, failure, or error"

## Compatibility matrix

{{< include "plugins/github/compat-matrix.md" >}}

## Installation paths

{{% cardpane %}}
{{% card header="Armory CD<br>Armory Operator" %}}
Use a Kustomize patch to install the plugin.

1. Create a GitHub App and install it in your repo.
1. Install the plugin using the Armory Operator.

[Instructions]({{< ref "plugins/github-api/install/armory-cd" >}})
{{% /card %}}

{{% card header="Spinnaker<br>Spinnaker Operator" %}}
Use a Kustomize patch to install the plugin.

1. Create a GitHub App and install it in your repo.
1. Install the plugin using the Spinnaker Operator.

[Instructions]({{< ref "plugins/github-api/install/spinnaker-operator" >}})
{{% /card %}}

{{% card header="Spinnaker<br>Halyard" %}}
Use Spinnaker local config files to install the plugin.

1. Create a GitHub App and install it in your repo.
1. Install the plugin in local config files and apply those changes using Halyard.

## Installation paths
[Instructions]({{< ref "plugins/github-api/install/spinnaker-halyard" >}})
{{% /card %}}
{{% /cardpane %}}
Loading

0 comments on commit ef4ed0a

Please sign in to comment.