Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DEPLOY_WHOAMI to deployment metadata in API #3149

Closed
coilysiren opened this issue Dec 9, 2024 · 0 comments · Fixed by #3186
Closed

Add DEPLOY_WHOAMI to deployment metadata in API #3149

coilysiren opened this issue Dec 9, 2024 · 0 comments · Fixed by #3186
Assignees

Comments

@coilysiren
Copy link
Collaborator

coilysiren commented Dec 9, 2024

Summary

add $(whoami) to the deployment environment variables, and output that via the API as well

follow-up to #3003

Acceptance criteria

  • data added to infra layer
  • data added to API layer
@coilysiren coilysiren self-assigned this Dec 9, 2024
coilysiren added a commit that referenced this issue Dec 9, 2024
## Summary

Relates to #3003, followup from
#3072

Completes 50% of #3149

### Time to review: __2 mins__

## Changes proposed

- adds DEPLOY_WHOAMI to the deploy metadata environment variables
- adds them to the module layer so they're present on every service we
deploy
- removes from the CLI inputs because they're being input by terraform
shell commands now (which is something I should have thought about
sooner!)

## Testing

From Github actions:

<img width="325" alt="image"
src="https://github.com/user-attachments/assets/a9417006-5a00-4aea-98e7-8885995ccb1d">

Locally:

<img width="313" alt="image"
src="https://github.com/user-attachments/assets/61972d42-eb2e-46ae-8857-acb9e5655782">
@coilysiren coilysiren assigned chouinar and unassigned chouinar and coilysiren Dec 9, 2024
@chouinar chouinar moved this from Icebox to Todo in Simpler.Grants.gov Product Backlog Dec 10, 2024
@chouinar chouinar moved this from Todo to In Review in Simpler.Grants.gov Product Backlog Dec 11, 2024
chouinar added a commit that referenced this issue Dec 11, 2024
## Summary
Fixes #3149

### Time to review: __2 mins__

## Changes proposed
Add who did a deploy to the deployment metadata info

## Context for reviewers
In prod, this will basically always be `runner`, has some additional
usage for non-prod environments to see if someone overrode an
environment

## Additional information
Example response locally:
```json
{
  "data": {
    "commit_link": "ffaca64",
    "commit_sha": "ffaca647223e0b6e54344122eefa73401f5ec131",
    "deploy_whoami": "local-developer",
    "last_deploy_time": "2024-12-02T16:25:18-05:00",
    "release_notes_link": "https://github.com/HHS/simpler-grants-gov/releases"
  },
  "message": "Service healthy",
  "status_code": 200
}
```

---------

Co-authored-by: nava-platform-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants