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

[CAI-252] Chatbot/deploy workflow #1231

Closed
wants to merge 9 commits into from
Closed

Conversation

batdevis
Copy link
Collaborator

@batdevis batdevis commented Nov 5, 2024

List of Changes

Deploy workflow of Chatbot backend

Motivation and Context

We need a pipeline to deploy the lambda function.

@batdevis batdevis requested a review from a team as a code owner November 5, 2024 15:21
Copy link

changeset-bot bot commented Nov 5, 2024

⚠️ No Changeset found

Latest commit: db71dc4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@batdevis batdevis changed the title [draft] [CAI-252] Chatbot/deploy workflow [CAI-252] Chatbot/deploy workflow Nov 11, 2024
@batdevis batdevis changed the title [CAI-252] Chatbot/deploy workflow [draft][CAI-252] Chatbot/deploy workflow Nov 11, 2024
Copy link
Contributor

Branch is not up to date with base branch

@batdevis it seems this Pull Request is not updated with base branch.
Please proceed with a merge or rebase to solve this.

@batdevis batdevis changed the title [draft][CAI-252] Chatbot/deploy workflow [CAI-252] Chatbot/deploy workflow Nov 11, 2024
Copy link
Contributor

github-actions bot commented Nov 12, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue CAI-252

Comment on lines +91 to +97
- name: Update ImageTag in task-definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@4225e0b507142a2e432b018bc3ccb728559b437a # v1.2.0
with:
task-definition: apps/chatbot/task-definition.json
container-name: chatbot-docker
image: ${{ steps.login-ecr.outputs.registry }}/chatbot:${{ github.sha }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is only necessary when deploying to ECS. In this case where we use Lambda, a task definition is not needed

Suggested change
- name: Update ImageTag in task-definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@4225e0b507142a2e432b018bc3ccb728559b437a # v1.2.0
with:
task-definition: apps/chatbot/task-definition.json
container-name: chatbot-docker
image: ${{ steps.login-ecr.outputs.registry }}/chatbot:${{ github.sha }}

Comment on lines +99 to +104
- name: Deploy new ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a # v1.4.11
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: chatbot-ecs
cluster: chatbot-ecs-cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

Suggested change
- name: Deploy new ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a # v1.4.11
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: chatbot-ecs
cluster: chatbot-ecs-cluster

Comment on lines +154 to +171
- name: Generate task-definition file
run: aws ecs describe-task-definition --task-definition chatbot-task-def --query taskDefinition > task-definition.json

- name: Update ImageTag in task-definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@4225e0b507142a2e432b018bc3ccb728559b437a # v1.2.0
with:
task-definition: apps/chatbot/task-definition.json
container-name: chatbot-docker
image: ${{ steps.login-ecr.outputs.registry }}/chatbot:${{ github.sha }}

- name: Deploy new ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a # v1.4.11
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: chatbot-ecs
cluster: chatbot-ecs-cluster

Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Suggested change
- name: Generate task-definition file
run: aws ecs describe-task-definition --task-definition chatbot-task-def --query taskDefinition > task-definition.json
- name: Update ImageTag in task-definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@4225e0b507142a2e432b018bc3ccb728559b437a # v1.2.0
with:
task-definition: apps/chatbot/task-definition.json
container-name: chatbot-docker
image: ${{ steps.login-ecr.outputs.registry }}/chatbot:${{ github.sha }}
- name: Deploy new ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@df9643053eda01f169e64a0e60233aacca83799a # v1.4.11
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: chatbot-ecs
cluster: chatbot-ecs-cluster

Copy link
Contributor

This pull request is stale because it has been open for 14 days with no activity. If the pull request is still valid, please update it within 21 days to keep it open or merge it, otherwise it will be closed automatically.

@github-actions github-actions bot added the stale label Nov 29, 2024
Copy link
Contributor

This pull request was closed because it has been inactive for 21 days since being marked as stale.

@github-actions github-actions bot closed this Dec 22, 2024
@github-actions github-actions bot deleted the chatbot/deploy-workflow branch December 22, 2024 02:30
@christian-calabrese christian-calabrese restored the chatbot/deploy-workflow branch January 8, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants