Skip to content

Commit d55bcf0

Browse files
authored
chore: ISS-154204 Update manifest, dependencies and readme (#28)
# Description This commit updates some configuration, adds a pull request template and cleans some files up. # DevRev issue https://app.devrev.ai/devrev/works/ISS-154204 # Documentation PR devrev/fern-api-docs#166
1 parent 3bab924 commit d55bcf0

File tree

7 files changed

+95
-97
lines changed

7 files changed

+95
-97
lines changed

.env.example

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
DEV_ORG=
2-
USER_EMAIL=
1+
# Same as the URL path for your org, e.g. app.devrev.ai/my-org
2+
DEV_ORG=my-org
3+
4+
# Your email address
5+

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@patricijabrecko @radovan-jorgic @devrev/airdrop

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Description
2+
<!--
3+
A brief description of what the PR does/changes.
4+
Use active voice and present tense, e.g., This commit fixes ...
5+
-->
6+
7+
# DevRev issue
8+
<!--
9+
A DevRev issue link (https://app.devrev.ai/devrev/works/ISS-00000) or `no-work-item`.
10+
Only dependency updates don't need a work item, all others should have one.
11+
-->
12+
13+
# Documentation PR
14+
<!--
15+
A link to the PR in fern-api-docs if relevant, otherwise `no-docs`.
16+
Any new feature should link to a PR in https://github.com/devrev/fern-api-docs.
17+
Dependency updates or changes to the configuration that are not user-facing do not
18+
require an update to the documentation.
19+
-->

.github/workflows/setup.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
contents: write
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Replace templates
1717
run: |
@@ -52,7 +52,7 @@ jobs:
5252
git commit --amend --no-edit
5353
5454
- name: Push
55-
uses: ad-m/github-push-action@v0.6.0
55+
uses: ad-m/github-push-action@v0.8.0
5656
with:
5757
github_token: ${{ secrets.GITHUB_TOKEN }}
5858
branch: main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Allow run configurations / launch files
77
!/.idea/runConfigurations
88
!/.vscode/launch.json
9+
!/.vscode/extensions.json
910

1011
build.tar.gz
1112
nohup.out

README.md

Lines changed: 59 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,79 @@
11
# ADaaS Template
22

3-
This GitHub repository provides a template with example code to implement an Airdrop as a Service (ADaaS) Snap-in.
3+
This GitHub repository provides a template with example code to implement an Airdrop as a Service (ADaaS) snap-in.
44

55
## Prerequisites
66

7-
1\. Install [DevRev CLI](https://developer.devrev.ai/snapin-development/references/cli-install) by following the instructions as per the Operating System.
8-
9-
2\. Install [jq](https://jqlang.github.io/jq/download/).
10-
11-
3\. Install [Node.js](https://nodejs.org/en/download/).
12-
13-
4\. Install [ngrok](https://ngrok.com/download).
7+
1. Install [DevRev CLI](https://developer.devrev.ai/snapin-development/references/cli-install) by following the instructions as per the Operating System.
8+
2. Install [jq](https://jqlang.github.io/jq/download/).
9+
3. Install [Node.js](https://nodejs.org/en/download/).
10+
4. Install [ngrok](https://ngrok.com/download).
1411

1512
## Getting Started
1613

17-
1\. Create a new repository:
18-
19-
- Create a new repository from this template by clicking the "Use this template" button in the upper right corner and then "Create a new repository".
20-
- The repository name must start with `airdrop-` (e.g., `airdrop-<external system>-snap-in`).
21-
22-
2\. Open the project in your IDE and authenticate to your DevRev organization using the DevRev CLI:
23-
24-
```bash
25-
devrev profiles authenticate --org <your DevRev Organization slug>
26-
```
27-
28-
3\. Install the Snap-in dependencies from the `code` directory:
29-
30-
```bash
31-
npm ci
32-
```
33-
34-
4\. Start the Snap-in development server from the `code` directory:
35-
36-
```bash
37-
npm run test:server -- local
38-
```
39-
40-
This will start the Snap-in server on `http://localhost:8000`.
41-
42-
5\. Start the ngrok tunnel in a separate terminal window:
43-
44-
```bash
45-
ngrok http 8000
46-
```
47-
48-
This will create a tunnel to your local server. The ngrok forwarding URL will be displayed in the terminal window.
49-
50-
6\. Copy the ngrok forwarding URL and create a new Snap-in version and Snap-in package using the DevRev CLI:
51-
52-
```bash
53-
devrev snap_in_version create-one --manifest ./manifest.yaml --create-package --testing-url <ngrok forwarding URL>
54-
```
55-
56-
7\. Create a Snap-in draft using the DevRev CLI:
57-
58-
```bash
59-
devrev snap_in draft
60-
```
61-
62-
8\. After the Snap-in draft is created, install the Snap-in in the DevRev UI (`Settings` -> `Snap-ins` -> `Installed` -> `<your Snap-in>` -> `Install snap-in`) or using the DevRev CLI:
63-
64-
```bash
65-
devrev snap_in activate
66-
```
67-
68-
9\. Start the import (`Airdrops` -> `Start Airdrop` -> `<your Snap-in>`).
14+
1. Create a new repository:
15+
- Create a new repository from this template by clicking the "Use this template" button in the upper right corner and then "Create a new repository".
16+
- The repository name must start with `airdrop-` (e.g., `airdrop-<external system>-snap-in`).
17+
2. Open the project in your IDE and authenticate to your DevRev organization using the DevRev CLI:
18+
```bash
19+
devrev profiles authenticate --org <your DevRev Organization slug>
20+
```
21+
3. Install the Snap-in dependencies from the `code` directory:
22+
```bash
23+
npm ci
24+
```
25+
4. Start the Snap-in development server from the `code` directory:
26+
```bash
27+
npm run test:server -- local
28+
```
29+
This will start the Snap-in server on `http://localhost:8000`.
30+
5. Start the ngrok tunnel in a separate terminal window:
31+
```bash
32+
ngrok http 8000
33+
```
34+
This will create a tunnel to your local server.
35+
The ngrok forwarding URL will be displayed in the terminal window.
36+
6. Copy the ngrok forwarding URL and create a new Snap-in version and Snap-in package using the DevRev CLI:
37+
```bash
38+
devrev snap_in_version create-one --manifest ./manifest.yaml --create-package --testing-url <ngrok forwarding URL>
39+
```
40+
7. Create a Snap-in draft using the DevRev CLI:
41+
```bash
42+
devrev snap_in draft
43+
```
44+
8. After the Snap-in draft is created, install the Snap-in in the DevRev UI (`Settings` -> `Snap-ins` -> `Installed` -> `<your Snap-in>` -> `Install snap-in`) or using the DevRev CLI:
45+
```bash
46+
devrev snap_in activate
47+
```
48+
9. Start the import (`Airdrops` -> `Start Airdrop` -> `<your Snap-in>`).
6949

7050
## Build, Deploy and Run
7151

72-
1\. Open the project in your IDE and set up project environment variables, by following these steps:
73-
74-
- Rename `.env.example` to `.env`.
75-
- In `.env` set the slug of your organization, and your email.
76-
77-
2\. Build the Snap-in using the following command:
78-
79-
```bash
80-
make build
81-
```
82-
83-
3\. Deploy the Snap-in to the organization:
84-
85-
```bash
86-
make deploy
87-
```
88-
89-
NOTE: This process may take some time. Command authenticates you to the org using the DevRev CLI, creates a Snap-in package, its Snap-in version, and finally the Snap-in draft.
90-
91-
4\. After the Snap-in draft is created, install the Snap-in in the DevRev UI (`Settings` -> `Snap-ins` -> `Installed` -> `<your Snap-in>` -> `Install snap-in`) or using the DevRev CLI:
92-
93-
```bash
94-
devrev snap_in activate
95-
```
96-
97-
5\. Start the import (`Airdrops` -> `Start Airdrop` -> `<your Snap-in>`).
52+
1. Open the project in your IDE and set up project environment variables, by following these steps:
53+
- Rename `.env.example` to `.env`.
54+
- In `.env` set the slug of your organization, and your email.
55+
2. Build the Snap-in using the following command:
56+
```bash
57+
make build
58+
```
59+
3. Deploy the Snap-in to the organization:
60+
```bash
61+
make deploy
62+
```
63+
NOTE: This process may take some time.
64+
The command authenticates you to the org using the DevRev CLI,
65+
creates a snap-in package, its snap-in version, and finally the snap-in draft.
66+
4. After the Snap-in draft is created, install the Snap-in in the DevRev UI (`Settings` -> `Snap-ins` -> `Installed` -> `<your Snap-in>` -> `Install snap-in`) or using the DevRev CLI:
67+
```bash
68+
devrev snap_in activate
69+
```
70+
5. Start the import (`Airdrops` -> `Start Airdrop` -> `<your Snap-in>`).
9871

9972
## Common Pitfalls
10073

10174
- `Conflict` error after the `Creating snap-in package...` output during `make deploy`.
102-
10375
- Snap-in package with the same slug already exists. Override the `SNAP_IN_SLUG` variable by explicitly updating the variable in `scripts/vars.sh`.
104-
10576
- Snap-in version `build/deployment failed` after the `Waiting for snap-in version to be ready...` message
106-
10777
- The snap-in version could not be built. Check the logs by running the DevRev CLI command `devrev snap_in_package logs`. For prettier UI, pipe the output to `jq`
108-
10978
- `Token is expired` when deploying or cleaning up.
110-
11179
- Authentication token to the `DEV_ORG` has expired. Run `make auth` to reconnect to the organization.

manifest.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ keyring_types:
2020
description: Example Connection
2121
kind: "Secret"
2222
is_subdomain: true
23-
external_system_name: "Example" # external system name you are importing from. This system name should start with a capital letter.
23+
24+
# Name of the external system you are importing from.
25+
# This system name should start with a capital letter.
26+
external_system_name: "Example"
27+
2428
secret_config:
25-
secret_transform: ".token" # a JQ query
29+
# The transform is a JQ query
30+
secret_transform: ".token"
31+
2632
fields:
2733
- id: token
2834
name: Token

0 commit comments

Comments
 (0)