Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Add info command to deployer CLI (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
amarthadan authored Sep 27, 2022
1 parent bbb1a2e commit 48aadb9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 4 deletions.
36 changes: 36 additions & 0 deletions docs/airnode/v0.10/grp-providers/docker/deployer-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ they exist.

- [deploy](./deployer-image.md#deploy)
- [list](./deployer-image.md#list)
- [info](./deployer-image.md#info)
- [remove-with-receipt](./deployer-image.md#remove-with-receipt)
- [remove-with-deployment-details](./deployer-image.md#remove-with-deployment-details)

Expand Down Expand Up @@ -206,6 +207,41 @@ docker run -it --rm ^

::::

### `info`

You can retrieve more information about the deployment with the
[info](../../reference/packages/deployer.md#info) command. Use the deployment ID
from the [list](./deployer-image.md#list) command above to request information
about a specific deployment. The retrieved information include deployment's
Airnode address, stage, Airnode version and the update history. Files for cloud
provider authentication are needed for the command to run correctly: `aws.env`
(for AWS) and/or `gcp.json` (for GCP).

:::: tabs

::: tab Linux/Mac/WSL2

```sh
docker run -it --rm \
-v "$(pwd):/app/config" \
api3/airnode-deployer:0.10.0 info 2c6ef2b3
```

:::

::: tab Windows

```batch
# For Windows, use CMD (not PowerShell).
docker run -it --rm ^
-v "%cd%:/app/config" ^
api3/airnode-deployer:0.10.0 info 2c6ef2b3
```

:::

::::

### `remove-with-receipt`

When an Airnode was deployed using the `deploy` command, a `receipt.json` file
Expand Down
23 changes: 23 additions & 0 deletions docs/airnode/v0.10/reference/packages/deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,29 @@ airnode-deployer list
airnode-deployer list --cloud-providers gcp
```
### Fetching deployment information
You can use the `info` command to retrieve information about one of your
deployments. The retrieved information include deployment's Airnode address,
stage, Airnode version and the update history.
#### info
```bash
# Displays info about deployed Airnode
Positionals:
deployment-id ID of the deployment (from 'list' command) [string] [required]
Options:
--version Show version number [boolean]
--debug Run in debug mode [boolean] [default: false]
--help Show help [boolean]
# Example
airnode-deployer info 2c6ef2b3
```
### Airnode Removal
An Airnode can be removed in two different ways:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ contract mySmartContract {

::: tip dAPI name

If you want to check the status for a dAPI `name`, you first need to encode
the dAPI `name` to bytes32 then calculate the hash off-chain of the encoded `name` as shown below.
Afterwards, pass the value of `dapiNameHash` as `_datafeedId` in the example above.

If you want to check the status for a dAPI `name`, you first need to encode the
dAPI `name` to bytes32 then calculate the hash off-chain of the encoded `name`
as shown below. Afterwards, pass the value of `dapiNameHash` as `_datafeedId` in
the example above.

```solidity
encodedDapiName = ethers.utils.formatBytes32String(dapiName);
Expand Down

1 comment on commit 48aadb9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.