Skip to content

added staging ecr action#12

Merged
mdellabitta merged 1 commit intomainfrom
add-staging-ecr-action
Dec 31, 2024
Merged

added staging ecr action#12
mdellabitta merged 1 commit intomainfrom
add-staging-ecr-action

Conversation

@mdellabitta
Copy link
Contributor

@mdellabitta mdellabitta commented Dec 31, 2024

Important

Adds GitHub Actions workflow to build and push Docker images to ECR for staging, with AWS and Sentry integration.

  • Workflow Addition:
    • Adds ecr-staging.yml to automate Docker image build and push to ECR for staging.
    • Triggered by workflow_dispatch event.
  • Environment Setup:
    • Sets up QEMU and Docker Buildx for multi-platform builds.
    • Configures Node.js environment using .nvmrc.
  • AWS and ECR Configuration:
    • Configures AWS credentials using aws-actions/configure-aws-credentials.
    • Logs into Amazon ECR using aws-actions/amazon-ecr-login.
  • Sentry Integration:
    • Uploads source maps to Sentry using npm run sentry:sourcemaps.
  • Branch Handling:
    • Determines branch name for ECR tagging based on event type.
  • Docker Build and Push:
    • Builds, tags, and pushes Docker images to ECR with tags latest, branch name, and commit SHA.

This description was created by Ellipsis for c695926. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to c695926 in 1 minute and 12 seconds

More details
  • Looked at 83 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. .github/workflows/ecr-staging.yml:76
  • Draft comment:
    Add a newline at the end of the file for better compatibility with Unix-based systems.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The workflow is missing a newline at the end of the file, which is a best practice for text files.
2. .github/workflows/ecr-staging.yml:56
  • Draft comment:
    This shell command is duplicated. Consider extracting this into a reusable workflow or composite action.

  • Get branch name shell command (ecr.yml)

  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    While the comment is technically correct about the duplication, GitHub Actions workflows are often intentionally kept separate and self-contained for clarity and isolation. Creating a reusable workflow for just a single command might add more complexity than it's worth. The duplication is minimal and the command is straightforward.
    The comment identifies a real issue of DRY principle violation. Reusable workflows could make maintenance easier if these files need to be updated in the future.
    However, the tradeoff of increased complexity and indirection for such a simple command likely isn't worth it. GitHub Actions workflows often prioritize clarity and independence over DRY.
    While technically correct, this comment suggests a refactor that would likely add more complexity than value. The current duplication is acceptable for GitHub Actions workflows.

3. .github/workflows/ecr-staging.yml:61
  • Draft comment:
    This branch name extraction step is duplicated. Consider creating a reusable workflow or job to avoid code duplication.

  • Get branch name command (ecr.yml)

  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_CT5NMAZEtB6gqVSo


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@sonarqubecloud
Copy link

@mdellabitta mdellabitta merged commit 8d32676 into main Dec 31, 2024
5 checks passed
@mdellabitta mdellabitta deleted the add-staging-ecr-action branch December 31, 2024 16:28
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