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

queue engine for deploys #6

Merged
merged 1 commit into from
Mar 1, 2024
Merged

queue engine for deploys #6

merged 1 commit into from
Mar 1, 2024

Conversation

NicolasLopes7
Copy link
Owner

No description provided.

Copy link

github-actions bot commented Mar 1, 2024

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan

terraform
aws_s3_bucket.shipthing: Refreshing state... [id=shipthing]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

Pushed by: @NicolasLopes7, Action: pull_request

Comment on lines +52 to +58
cmd := config.RedisClient.LPush(redisCtx, "builds", deployId.String())
if cmd.Err() != nil {
ctx.JSON(500, gin.H{
"error": cmd.Err().Error(),
})
return
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

creates (if not exists) an array record called builds and pushes the build to there.

["3834e721-78a7-4e05-85ea-91b14895b70c", "bcc9dac6-4db3-4595-8918-db4fa1029cfb"]

Copy link
Owner Author

Choose a reason for hiding this comment

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

a subscriber will consume it

Comment on lines +60 to +67
cmd = config.RedisClient.HSet(redisCtx, "status", deployId.String(), "uploaded")

if cmd.Err() != nil {
ctx.JSON(500, gin.H{
"error": cmd.Err().Error(),
})
return
}
Copy link
Owner Author

Choose a reason for hiding this comment

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

mantains a state of each deploy status

{
    "bcc9dac6-4db3-4595-8918-db4fa1029cfb": "uploaded",
    "3834e721-78a7-4e05-85ea-91b14895b70c": "uploaded"
}

@NicolasLopes7 NicolasLopes7 merged commit ab21017 into main Mar 1, 2024
1 check passed
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.

1 participant