Autoupdate static assets (jquery, xterm)
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Overview of the Issue
We currently have static versioned web assets used by the internal site. These static assets are committed to the code and manually updated.
The reference in the code looks like
https://github.com/runatlantis/atlantis/blob/a1fb082b1c8625d94f5cbc4935a51dca453b9011/server/controllers/templates/web_templates.go#L489-L494
https://github.com/runatlantis/atlantis/tree/main/server/static/js
This is handy to keep the build consistent however it doesn't allow for an automatable upgrade path.
To make it upgradeable, we can do the following
- manage the static dependencies in a file like package.json
- this will automatically get picked up by renovate bot
- webpack or similar could be used as well for bundling
- pin the dependencies there
- run package manager commands to download the assets in the beginning of the build process
- remove the committed static js assets
Another task that may be needed is
-
to move all the inline html code into separate template files like we do with the github pr and comment templates
https://github.com/runatlantis/atlantis/blob/a1fb082b1c8625d94f5cbc4935a51dca453b9011/server/controllers/templates/web_templates.go#L436-L440
Additional Context
- Related PR #4257 that could be automated