Skip to content

Commit

Permalink
backend update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadar authored and Hadar committed Jun 9, 2024
1 parent e003c67 commit 373cd06
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Azure Pipelines Self-Service Actions
# Azure pipeline actions

Port can trigger [Azure pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines) using [incoming webhooks triggers](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-webhooks-resource).
Port can trigger [Azure pipelines](https://azure.microsoft.com/en-us/products/devops/pipelines) for both self-service actions and automations, using [incoming webhook triggers](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-webhooks-resource).

![AzurePipelinesArchitecture](/img/self-service-actions/portAzurePipelineArchitecture.png)

The steps shown in the image above are as follows:

1. An action is invoked in Port;
1. A self-service action or automation is invoked in Port.
2. Port signs the action payload using SHA-1 with the [`clientSecret`](/build-your-software-catalog/custom-integration/api/api.md#find-your-port-credentials) value and puts it in the `X-Port-Signature` request header.

:::info
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Examples",
"label": "Self-service examples",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Examples",
"label": "Self-service examples",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# GitHub Workflow Self-Service Actions
# GitHub workflow actions

[Port's GitHub application](/build-your-software-catalog/sync-data-to-catalog/git/github/installation.md) can trigger a [GitHub workflow](https://docs.github.com/en/actions/using-workflows) using a customer provided input and [`port_payload`](/actions-and-automations/reflect-action-progress/#action-run-json-structure).
[Port's GitHub application](/build-your-software-catalog/sync-data-to-catalog/git/github/installation.md) can trigger a [GitHub workflow](https://docs.github.com/en/actions/using-workflows) using a customer provided input and [`port_payload`](/actions-and-automations/reflect-action-progress/#action-run-json-structure), for both self-service actions and automations.

:::tip
Self-service actions using GitHub workflows are available both with the standard Port [GitHub app](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md), and with the [self-hosted version](/build-your-software-catalog/sync-data-to-catalog/git/github/self-hosted-installation.md)
Actions using GitHub workflows are available both with the standard Port [GitHub app](/build-your-software-catalog/sync-data-to-catalog/git/github/github.md), and with the [self-hosted version](/build-your-software-catalog/sync-data-to-catalog/git/github/self-hosted-installation.md)
:::

![Port GitHub workflow Architecture](/img/self-service-actions/portGithubWorkflowArchitecture.png)

The steps shown in the image above are as follows:

1. Port publishes an invoked `Action` message to a topic;
2. A secure topic (`ORG_ID.github.runs`) holds all the action invocations;
1. Port publishes an invoked `Action` message to a topic.
2. A secure topic (`ORG_ID.github.runs`) holds all the action invocations.
3. A listener implemented on Port's GitHub application receives the new topic message and runs GitHub workflow defined by the DevOps team.

An example flow would be:

1. A developer asks to deploy a new version of an existing `Microservice`;
2. The `create` action is sent to the `github.runs` topic;
3. Port's GitHub application event handler is triggered by this new action message;
4. Port's GitHub application triggers the GitHub workflow that deploys a new version of the service;
5. As part of the workflow, the new microservice `Deployment` is reported back to Port;
1. A developer asks to deploy a new version of an existing `Microservice`.
2. The `create` action is sent to the `github.runs` topic.
3. Port's GitHub application event handler is triggered by this new action message.
4. Port's GitHub application triggers the GitHub workflow that deploys a new version of the service.
5. As part of the workflow, the new microservice `Deployment` is reported back to Port.
6. When the workflow is done, Port's GitHub application reports back to Port about the status of the action run (`SUCCESS` or `FAILURE`), according to workflow's `conclusion`.

:::info triggering workflow chains
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Examples",
"label": "Self-service examples",
"position": 2
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitLab Pipelines Actions

Port's GitLab Pipeline Action can trigger a [GitLab Pipeline](https://docs.gitlab.com/ee/ci/pipelines/) using a customer provided input and [`port_payload`](/actions-and-automations/reflect-action-progress/#action-run-json-structure).
Port's GitLab Pipeline Action can trigger a [GitLab Pipeline](https://docs.gitlab.com/ee/ci/pipelines/) using a customer provided input and [`port_payload`](/actions-and-automations/reflect-action-progress/#action-run-json-structure), for both self-service actions and automations.

![Port Kafka Architecture](/img/self-service-actions/setup-backend/gitlab-pipeline/gitlab-pipeline-agent-architecture.jpg)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Examples",
"label": "Self-service examples",
"position": 2
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import DefineVars from "/static/img/self-service-actions/setup-backend/jenkins-p

# Triggering Jenkins using webhooks

In this guide, you will learn how to trigger your [Jenkins](https://www.jenkins.io/) Pipelines from Port, using [Webhook Actions](../webhook/).
Port supports triggering Jenkins pipelines for both self-service actions and automations, using webhooks.

This page will guide you in triggering your [Jenkins](https://www.jenkins.io/) Pipelines from Port, using [Webhook Actions](../webhook/).

![Illustration](/img/self-service-actions/setup-backend/jenkins-pipeline/jenkins-illustration.png)

The steps shown in the image above are as follows:

1. An action is invoked in Port;
1. A self-service action or automation is invoked in Port.
2. Port signs the action payload using SHA-1 with the [`clientSecret`](/build-your-software-catalog/custom-integration/api/api.md#find-your-port-credentials) value and puts it in the `X-Port-Signature` request header.

:::info
Expand All @@ -24,10 +26,10 @@ The steps shown in the image above are as follows:

An example flow would be:

1. A developer asks to run a Jenkins pipeline;
2. Port sends a `POST` request with the action payload to the Jenkins webhook `URL`;
3. The Jenkins webhook receives the new action request;
4. The Jenkins webhook triggers the pipeline;
1. A developer asks to run a Jenkins pipeline.
2. Port sends a `POST` request with the action payload to the Jenkins webhook `URL`.
3. The Jenkins webhook receives the new action request.
4. The Jenkins webhook triggers the pipeline.

## Prerequisites

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Examples",
"label": "Self-service examples",
"position": 3
}
6 changes: 3 additions & 3 deletions docs/actions-and-automations/setup-backend/webhook/webhook.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Webhook Self-Service Actions
# Webhook actions

## Overview

Port can trigger webhooks based on a customer provided `URL` Both for `Action` and `Changelog` events.
Port can trigger custom webhooks based on a customer provided URL, for both self-service actions and automations.

![Port Kafka Architecture](/img/self-service-actions/portWebhookArchitecture.jpg)

Expand Down Expand Up @@ -60,7 +60,7 @@ Alternatively, you can set the execution type to **synchronous**, which will cau

## Next steps

To get started with webhook Self-Service Actions, please check the sources below:
To get started with webhook actions, check out the sources below:

### Examples

Expand Down

0 comments on commit 373cd06

Please sign in to comment.