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

Build CodePipeline and CodeBuild for the UI #81

Closed
briri opened this issue Dec 15, 2023 · 8 comments
Closed

Build CodePipeline and CodeBuild for the UI #81

briri opened this issue Dec 15, 2023 · 8 comments

Comments

@briri
Copy link
Collaborator

briri commented Dec 15, 2023

Build our the CF definition for a CodePipeline that watches the dmsp_ui_prototype repository and a CodeBuild that runs tests, builds and then deploys to CloudFront.

@briri
Copy link
Collaborator Author

briri commented Jan 12, 2024

Initial build and pipeline have been created. The pipeline current watches the development branch and will build the dmsp_ui_prototype application and auto-deploy to the S3 bucket in the /ui path (for now).

The new dev will need to update the buildspec.yaml in that project to do the build appropriately.

Depending on timing, if we can get the landing pages rebuilt in the new UI, we can stop using the /ui path and instead deploy to the bucket's root. If we cannot get that done in the short term we should create a separate CloudFront distro (and S3 bucket) to host the UI.

@jupiter007
Copy link
Collaborator

jupiter007 commented May 14, 2024

Hi @briri , I added my codebuild and codepipeline changes directly to the "ecs" branch of "dmsp_aws_prototype" repo. Let me know if that's ok.

It looks like they were created, but the codepipeline had an error because I think it couldn't find the buildspec.yaml file in the development branch of dmsp_frontend_prototype.

As you mentioned, a lot of the settings and commands are similar between backend and frontend, but I wasn't sure how you wanted to store the shared specifications.

@briri
Copy link
Collaborator Author

briri commented May 15, 2024

Excellent! We can touch base today to take a look at the build and see what's going on.

@jupiter007
Copy link
Collaborator

jupiter007 commented May 28, 2024

Just an update. The CodePipelines builds for frontend and backend succeeded.

We incorporated AWS Chatbot into the Cloudformation template, and I tested it and it is successfully creating the client and sending Slack messages to dmptool-ci on pipeline builds. Marisa requested that we try and keep the "replied to a thread" messages from also showing up in the dmptool-ci channel, and be restricted to the same thread. I will create a separate ticket to work on that.

I'm currently working on trying to set environment variables in my Cloudformation template that will be accessible by the app to retrieve the correct graphql endpoint.

@jupiter007
Copy link
Collaborator

I set the environmental variable in the Dockerfiles in the frontend app, and that worked. I am now able to get the graphql endpoint for https://ui.dmphub.uc3dev.cdlib.net/ and we are able to see the contributor roles displaying on the page.

@briri
Copy link
Collaborator Author

briri commented May 29, 2024

Excellent!

@briri
Copy link
Collaborator Author

briri commented Jun 4, 2024

I have one final task to do for this before we can close it out. I need to get the notification hooks for both the frontend and backend code pipelines defined in CloudFormation

@briri
Copy link
Collaborator Author

briri commented Jun 11, 2024

This is complete. We still need to setup the AWS Chatbot in CloudFormation, but I ran into a wall so opened a separate ticket to track that work #146. We can address that prior to building out our stage environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants