Skip to content

Commit bf93376

Browse files
committed
refactor: remove drone CI and update README for deployment instructions
1 parent a19aabb commit bf93376

File tree

3 files changed

+19
-46
lines changed

3 files changed

+19
-46
lines changed

.drone-consider

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ packages/sdk/.drone.yml
33
packages/dataprotector-deserializer/.drone.yml
44
packages/sharing-smart-contract/.drone.yml
55
packages/smart-contract/.drone.yml
6-
packages/subgraph/.drone.yml
76
packages/protected-data-delivery-dapp/.drone.yml
87
packages/protected-data-delivery-dapp/deployment/.drone.yml

packages/subgraph/.drone.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/subgraph/README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,32 @@ npm run create-local
2424
npm run deploy-local
2525
```
2626

27-
The subgraph will be available at: http://localhost:8000/subgraphs/name/DataProtector/graphql
27+
The subgraph will be available at: <http://localhost:8000/subgraphs/name/DataProtector/graphql>
2828

2929
### Thegraph network
3030

3131
To deploy this subgraph on Thegraph network:
3232

33-
1. Update `networks.json` file to use the correct addresses for the correct network.
33+
1. Set up your environment variables in `.env` file:
3434

35-
2. Authenticate: `npx graph auth <token>`
35+
```bash
36+
SUBGRAPH_SLUG=your-subgraph-slug
37+
SUBGRAPH_DEPLOY_KEY=your-deploy-key
38+
SUBGRAPH_NETWORK_NAME=your-network-name
39+
VERSION_LABEL=your-version-label
40+
```
3641

37-
3. Deploy: `npx graph deploy <slug> --network <name>`
42+
2. Deploy using the npm script:
3843

39-
### Hosted Production Environments
44+
```bash
45+
npm run deploy-studio
46+
```
4047

41-
We use CI/CD pipelines to deploy our subgraphs to hosted environments.
48+
This will run: `graph deploy ${SUBGRAPH_SLUG} --deploy-key ${SUBGRAPH_DEPLOY_KEY} --network ${SUBGRAPH_NETWORK_NAME} --version-label ${VERSION_LABEL}`
4249

4350
### Self-Hosted Subgraph Deployment Process
4451

52+
We use CI/CD pipelines to deploy our subgraphs to hosted environments.
4553
For zero-downtime updates to the production subgraph:
4654

4755
1. **Index the New Version (Temporary Deployment)**
@@ -59,7 +67,7 @@ For zero-downtime updates to the production subgraph:
5967
- This swaps the deployments with no service interruption
6068

6169
4. **Verify the Deployment**
62-
- Access the production subgraph at: https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2/graphql
70+
- Access the production subgraph at: <https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2/graphql>
6371

6472
## Query Examples
6573

@@ -108,14 +116,14 @@ query MyQuery($requiredSchema: [String!]!, $start: Int!, $range: Int!) {
108116

109117
1. Update schema.graphql and subgraph.yaml as needed
110118
2. Run codegen to generate TypeScript types: `npm run codegen`
111-
3. Implement mapping handlers in src/ files
119+
3. Implement mapping handlers in `src/` files
112120
4. Build the subgraph: `npm run build`
113121
5. Test locally before deploying to production environments
114122

115123
## CI/CD Integration
116124

117125
Our repository uses automated workflows to build, test, and deploy the subgraph:
118126

119-
- ABI validation checks ensure contract ABIs are up-to-date
120-
- Docker images are built and pushed with appropriate tags based on the source branch
121-
- Deployment follows a staged approach to ensure zero downtime
127+
- **ABI Validation**: Ensures contract ABIs are up-to-date across all packages
128+
- **Testing**: Unit and integration tests validate subgraph functionality (TODO)
129+
- **Zero-Downtime Deployment**: Staged deployment process ensures continuous service availability

0 commit comments

Comments
 (0)