Skip to content

Conversation

@jcabrero
Copy link
Member

@jcabrero jcabrero commented Jun 19, 2025

This PR introduces a CD pipeline to upload the Docker images of nilAI to AWS ECR.

It also fixes an issue where tag was treated as rev in pyproject.toml

@jcabrero jcabrero requested review from cmacrae, Copilot and lumasepa June 23, 2025 13:56
@jcabrero jcabrero marked this pull request as ready for review June 23, 2025 13:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a continuous deployment pipeline to build and publish nilAI Docker images to AWS ECR and corrects the version specifier in two pyproject.toml files from tag to rev.

  • Switches the nuc-py source in both projects to use rev instead of tag.
  • Renames and extends the GitHub Actions workflow with new triggers, permissions, and a deploy-images job.
  • Adds a deploy-images job that builds and pushes component images to AWS ECR.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
nilai-auth/nuc-helpers/pyproject.toml Update nuc-py source entry to use rev instead of tag
nilai-api/pyproject.toml Apply the same rev update for the API project
.github/workflows/cicd.yml Rename workflow, add release trigger, permissions, and a job to deploy images to ECR
Comments suppressed due to low confidence (4)

.github/workflows/cicd.yml:182

  • The if condition is not wrapped in ${{ }} and will be treated as a literal string. It should be written as if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release' }}.
    if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release'

.github/workflows/cicd.yml:217

  • Since you're using Buildx and the --push flag, replace docker build with docker buildx build to ensure the push step is supported.
          docker build \

nilai-auth/nuc-helpers/pyproject.toml:24

  • The nuc entry is not indented under [tool.uv.sources], which will cause a TOML parse error. It should be indented to match the existing source entries (e.g., two spaces).
nuc = { git = "https://github.com/NillionNetwork/nuc-py.git", rev = "4922b5e9354e611cc31322d681eb29da05be584e" }

nilai-api/pyproject.toml:47

  • The nuc entry should be indented under [tool.uv.sources] to align with the other source definitions (e.g., two spaces), otherwise the TOML parser will fail.
nuc = { git = "https://github.com/NillionNetwork/nuc-py.git", rev = "4922b5e9354e611cc31322d681eb29da05be584e" }

@jcabrero jcabrero merged commit fd0a941 into main Jun 23, 2025
5 checks passed
@jcabrero jcabrero deleted the feat/add_cd_pipeline branch July 1, 2025 07:42
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