Skip to content

Commit f419801

Browse files
kwschulzclaude
andcommitted
chore: remove deploy_updates.sh, use local HA for dogfooding
Remove SSH-based deployment script. Dogfooding now uses the local HA instance via VS Code Dev Container or docker-compose.test.yml. Updated: CLAUDE.md release flow, CONTRIBUTING.md, TESTING_ON_HA.md, scripts/README.md, Makefile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a340cee commit f419801

6 files changed

Lines changed: 39 additions & 79 deletions

File tree

‎CLAUDE.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ ruff check . # Full project lint
144144
pytest # Full test suite
145145
```
146146

147-
### 2. Dogfood on Local HA (if applicable)
148-
- Deploy to local Home Assistant via SSH or HACS beta
149-
- Verify core functionality works on real hardware
147+
### 2. Dogfood on Local HA
148+
- Ask the user to launch HA via VS Code task ("HA: Start (Fresh)") or `make docker-start`
149+
- User verifies: integration loads, sensors created, no blocking I/O warnings in logs
150+
- **Never deploy automatically** — no SSH, no SCP, no remote scripts
150151
- Fix any issues found, commit to release branch
151152

152153
### 3. Merge to Main

‎CONTRIBUTING.md‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,17 @@ Make sure all tests pass before submitting your changes.
225225
pytest tests/ -v
226226
```
227227

228-
### 5. Deploy for Manual Testing (Optional)
228+
### 5. Test on Local HA (Optional)
229229

230-
You can deploy your changes to a real Home Assistant instance for manual testing.
230+
You can test your changes on a local Home Assistant instance via Docker:
231231

232232
```bash
233-
# Interactive mode - guides you through deployment options
234-
./scripts/deploy_updates.sh
233+
# Start HA with integration bind-mounted
234+
make docker-start
235235

236-
# Or specify directly:
237-
./scripts/deploy_updates.sh --local ~/homeassistant/config
238-
./scripts/deploy_updates.sh --ssh root@192.168.1.100
239-
./scripts/deploy_updates.sh --docker homeassistant --restart
236+
# Open http://localhost:8123 and add the integration
237+
# After code changes, restart to pick them up:
238+
make docker-restart
240239
```
241240

242241
See [Testing on HA](./docs/setup/TESTING_ON_HA.md) for detailed instructions and troubleshooting.

‎Makefile‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ validate-host:
122122
validate-ci:
123123
@./scripts/ci-check.sh
124124

125-
# Deploy to Home Assistant
126-
deploy:
127-
@bash scripts/maintenance/deploy_updates.sh
128-
129125
# Sync version numbers
130126
sync-version:
131127
@python3 scripts/maintenance/update_versions.py

‎docs/setup/TESTING_ON_HA.md‎

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
# Testing on Home Assistant
22

3-
This guide explains how to deploy a development branch of Cable Modem Monitor to a real Home Assistant instance for testing.
3+
This guide explains how to test a development branch of Cable Modem Monitor on Home Assistant.
44

55
> **For local development** (running tests, working on code): See [Getting Started](./GETTING_STARTED.md)
66
>
77
> **For stable installation** (released versions): See [README.md Installation](../README.md#installation)
88
99
---
1010

11-
## Quick Start
11+
## Quick Start (Docker — Recommended)
1212

13-
### Using the Deploy Script (Recommended)
13+
The VS Code Dev Container or `docker-compose.test.yml` runs a real HA instance with your code bind-mounted:
1414

1515
```bash
16-
# Clone the repo (or switch to the branch you want to test)
17-
git clone https://github.com/solentlabs/cable_modem_monitor.git
18-
cd cable_modem_monitor
19-
git checkout feature/your-branch-name
16+
# From VS Code Dev Container:
17+
# Ctrl+Shift+P → Tasks: Run Task → "HA: Start (Fresh)"
2018

21-
# Run the deployment script
22-
./scripts/maintenance/deploy_updates.sh
19+
# Or from the command line:
20+
make docker-start
2321
```
2422

25-
The script supports multiple deployment methods:
26-
- **Local path**: Direct copy to a local HA config directory
27-
- **SSH**: Remote deployment via SSH
28-
- **Docker**: Copy into a running Docker container
23+
Then open http://localhost:8123, complete onboarding, and add the integration.
24+
25+
Your `custom_components/cable_modem_monitor/` is mounted directly — changes are reflected after restarting HA:
26+
27+
```bash
28+
make docker-restart
29+
```
30+
31+
View logs:
32+
```bash
33+
make docker-logs
34+
```
2935

3036
---
3137

3238
## Manual Deployment
3339

34-
If the script doesn't work for your setup, follow these manual steps.
40+
For testing on a remote or standalone HA instance.
3541

3642
### Step 1: Get the Code
3743

@@ -150,15 +156,15 @@ To test a specific pull request:
150156
git fetch origin pull/44/head:pr-44
151157
git checkout pr-44
152158

153-
# Deploy
154-
./scripts/maintenance/deploy_updates.sh
159+
# Use docker-compose or copy manually (see above)
160+
make docker-start
155161
```
156162

157163
Or use GitHub CLI:
158164

159165
```bash
160166
gh pr checkout 44
161-
./scripts/maintenance/deploy_updates.sh
167+
make docker-start
162168
```
163169

164170
---

‎scripts/README.md‎

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Scripts for maintaining the integration in production:
4444
| Script | Purpose | Exit Codes | Environment Variables |
4545
|--------|---------|------------|----------------------|
4646
| `cleanup_entities.py` | Cleans up Home Assistant entities | 0: Success, 1: Error | None |
47-
| `deploy_updates.sh` | Deploy to Home Assistant via SSH | 0: Success, 1: Error | SSH configured for `homeassistant` host |
4847
| `update_versions.py` | Sync version from const.py to manifest.json | 0: Success, 1: Error | None |
4948

5049
## Usage
@@ -122,14 +121,6 @@ code .
122121
123122
### Maintenance Operations
124123

125-
**Deploy to Home Assistant:**
126-
```bash
127-
# SSH must be configured for 'homeassistant' host
128-
bash scripts/maintenance/deploy_updates.sh
129-
# OR use Make
130-
make deploy
131-
```
132-
133124
**Version Management:**
134125
```bash
135126
# Sync version from const.py to manifest.json and hacs.json
@@ -171,19 +162,12 @@ pre-commit run --all-files
171162
make check
172163
```
173164

174-
## SSH Configuration for Deployment
165+
## Testing on Home Assistant
175166

176-
To use `deploy_updates.sh`, configure SSH access to your Home Assistant server:
177-
178-
```bash
179-
# Add to ~/.ssh/config
180-
Host homeassistant
181-
HostName 192.168.1.100 # Your HA server IP
182-
User your-username
183-
IdentityFile ~/.ssh/id_rsa
184-
```
167+
Use the Docker-based local HA instance for testing. See [TESTING_ON_HA.md](../docs/setup/TESTING_ON_HA.md) for details.
185168

186-
Test connection:
187169
```bash
188-
ssh homeassistant "echo Connection successful"
170+
make docker-start # Start HA with integration mounted
171+
make docker-logs # View logs
172+
make docker-restart # Restart after code changes
189173
```

‎scripts/maintenance/deploy_updates.sh‎

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

0 commit comments

Comments
 (0)