Skip to content

Conversation

@anilnatha
Copy link
Collaborator

@anilnatha anilnatha commented Apr 1, 2024

Purpose

Add CI/CD to the unity-ui application to build the application as a container.

Note: Additional work is still needed to resolve SSM param integration. This ticket was to get the CI/CD functional.

Proposed Changes

  • [ADD] CI/CD workflow to build application as a docker image.
  • [FIXED] Removed stateful information from project configuration by allowing environment variables to be supplied to the container at startup which in turn get injected into the Unity UI Codebase. This is in support of moving to dynamic configuration of the application via Unity Marketplace.

Issues

Testing

  • Tested build using local Docker Desktop
  • Tested workflow by using the workflow against a feature branch to test it's ability to be executed when the branch is updated
  • Tested environment variable injection by building and running docker image using Docker Desktop and passing environment variables through docker run arguments which models how AWS ECS will also inject ENV vars

@anilnatha anilnatha requested a review from rtapella April 1, 2024 19:55
rtapella
rtapella previously approved these changes Apr 12, 2024
…. Environment variables will be set by AWS ECS and at container startup they will be injected into the application using a sequence of scripts integrated in the Dockerfile. This can be tested locally by using a .env.docker.local file in the .env folder and then building and running the docker image locally. This setup will allow the continued normal development using the npm run dev command. Stateful build information has been removed from the package.json as well as the corresponding .env files that are no longer necessary.
@anilnatha anilnatha requested a review from rtapella April 12, 2024 22:09
@anilnatha
Copy link
Collaborator Author

@rtapella I've pushed modifications in support of environment variable injection so that when marketplace stands up the UI, it can inject configuration information into the application (e.g. WPST URL, Cognito URLs, etc.).

Luckily I was also able to figure out how to retain the normal development tooling using the typical npm run dev command, but the docker image that is built by our CI/CD can also be built locally for testing which will be helpful.

Can you please review again when you have a chance so that we can cut a release. I'll have to circle back and add documentation to the README.

@anilnatha anilnatha dismissed rtapella’s stale review April 12, 2024 22:12

Additional changes have been made.

Copy link
Contributor

@rtapella rtapella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wfm

@rtapella rtapella merged commit 847dd0d into develop Apr 15, 2024
@rtapella rtapella deleted the features/ci-integration branch April 15, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants