Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4149 run a runtime operation from the console #4205

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions sites/platform/src/create-apps/runtime-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,39 @@ The name of the runtime operation in this case is `clear-rebuild`.

For more possibilities, see other [runtime operation examples](#runtime-operation-examples).

## Run a runtime operation
## Run a runtime operation

{{< codetabs >}}
+++
title=In the Console
+++



First, make sure that you have [defined a runtime operation](#define-a-runtime-operation). Then:

1. Navigate to the environment where you want to run the operation.
2. Click {{< icon more >}} **More**.
3. Click **Run runtime operation**.
4. Select the operation you want to run.
5. Click **Run**.

<--->
+++
title=Using the CLI
+++

Once you've [defined a runtime operation](#define-a-runtime-operation),
you can trigger it through the {{% vendor/name %}} CLI.
To do so, run the following command:

A runtime operation can be triggered through the {{% vendor/name %}} CLI once it has been [defined](#define-a-runtime-operation).

Run the following command:

```bash
{{% vendor/cli %}} operation:run {{< variable "RUNTIME_OPERATION_NAME" >}} --project {{< variable "PROJECT_ID" >}} --environment {{< variable "ENVIRONMENT_NAME" >}}
```

You can only trigger a runtime operation if you have permission to do so.
Permissions are granted through the `role` option specified in the [runtime operation configuration](#define-a-runtime-operation).
Permissions are granted through the `role` option specified in the [runtime operation configuration](#define-a-runtime-operation). This can only be done if a [runtime operation has been defined](#define-a-runtime-operation).

For example, to trigger the runtime operation [defined previously](#define-a-runtime-operation),
you could run the following command:
Expand All @@ -71,6 +92,8 @@ you could run the following command:
{{% vendor/cli %}} operation:run clear-rebuild --project {{< variable "PROJECT_ID" >}} --environment {{< variable "ENVIRONMENT_NAME" >}}
```

{{< /codetabs >}}

## List your runtime operations

To list all the runtime operations available on an environment,
Expand Down
33 changes: 28 additions & 5 deletions sites/upsun/src/create-apps/runtime-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,39 @@ The name of the runtime operation in this case is `clear-rebuild`.

For more possibilities, see other [runtime operation examples](#runtime-operation-examples).

## Run a runtime operation
## Run a runtime operation

{{< codetabs >}}
+++
title=In the Console
+++



First, make sure that you have [defined a runtime operation](#define-a-runtime-operation). Then:

1. Navigate to the environment where you want to run the operation.
2. Click {{< icon more >}} **More**.
3. Click **Run runtime operation**.
4. Select the operation you want to run.
5. Click **Run**.

<--->
+++
title=Using the CLI
+++

Once you've [defined a runtime operation](#define-a-runtime-operation),
you can trigger it through the {{% vendor/name %}} CLI.
To do so, run the following command:

A runtime operation can be triggered through the {{% vendor/name %}} CLI once it has been [defined](#define-a-runtime-operation).

Run the following command:

```bash
{{% vendor/cli %}} operation:run {{< variable "RUNTIME_OPERATION_NAME" >}} --project {{< variable "PROJECT_ID" >}} --environment {{< variable "ENVIRONMENT_NAME" >}}
```

You can only trigger a runtime operation if you have permission to do so.
Permissions are granted through the `role` option specified in the [runtime operation configuration](#define-a-runtime-operation).
Permissions are granted through the `role` option specified in the [runtime operation configuration](#define-a-runtime-operation). This can only be done if a [runtime operation has been defined](#define-a-runtime-operation).

For example, to trigger the runtime operation [defined previously](#define-a-runtime-operation),
you could run the following command:
Expand All @@ -76,6 +97,8 @@ you could run the following command:
{{% vendor/cli %}} operation:run clear-rebuild --project {{< variable "PROJECT_ID" >}} --environment {{< variable "ENVIRONMENT_NAME" >}}
```

{{< /codetabs >}}

## List your runtime operations

To list all the runtime operations available on an environment,
Expand Down
Loading