Commit 9290728
authored
feat: support NETLIFY_DEPLOY_SOURCE env var (#8183)
π Thanks for submitting a pull request! π
#### Summary
- Lets callers that embed the CLI (e.g. the Agent Runner orchestrator)
override the hardcoded `deploy_source: 'cli'` in create-deploy requests
by setting a `NETLIFY_DEPLOY_SOURCE` env var. Default behavior is
unchanged β when the var is unset, the CLI still sends `'cli'`.
- This unblocks the orchestrator from tagging AR-originated deploys as
`agent_runner` so the dashboard can show "Last deployed from Agent
Runners" instead of "CLI" / "API" on the site overview.
- Applied to both deploy paths in `src/commands/deploy/deploy.ts` (build
and `--no-build`), with a new integration test covering the override.
- Fixes:
https://linear.app/netlify/issue/EX-2032/last-deployed-from-ardrop-label-followup
- netlify/agent-runner-orchestrator#750
<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve and how?
-->
---
For us to review and ship your PR efficiently, please perform the
following steps:
- [ ] Open a
[bug/issue](https://github.com/netlify/cli/issues/new/choose) before
writing your code π§βπ». This ensures we can discuss the changes and get
feedback from everyone that should be involved. If you\`re fixing a typo
or something that\`s on fire π₯ (e.g. incident related), you can skip
this step.
- [ ] Read the [contribution guidelines](../CONTRIBUTING.md) π. This
ensures your code follows our style guide and
passes our tests.
- [ ] Update or add tests (if any source code was changed or added) π§ͺ
- [ ] Update or add documentation (if features were changed or added) π
- [ ] Make sure the status checks below are successful β
**A picture of a cute animal (not mandatory, but encouraged)**1 parent 32a18d6 commit 9290728
2 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
| 588 | + | |
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| |||
1363 | 1363 | | |
1364 | 1364 | | |
1365 | 1365 | | |
1366 | | - | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1367 | 1372 | | |
1368 | 1373 | | |
1369 | 1374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1507 | 1507 | | |
1508 | 1508 | | |
1509 | 1509 | | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
1510 | 1538 | | |
1511 | 1539 | | |
1512 | 1540 | | |
| |||
0 commit comments