Skip to content

feat: Add CDS Containers with GHCR build workflow#15

Merged
mmou-nv merged 7 commits into
mainfrom
feat/add-cds-containers
Jan 19, 2026
Merged

feat: Add CDS Containers with GHCR build workflow#15
mmou-nv merged 7 commits into
mainfrom
feat/add-cds-containers

Conversation

@mmou-nv

@mmou-nv mmou-nv commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

🐳 Add CDS Container Images

This PR adds CDS container images to the dsx-github-actions repository with GitHub Container Registry (GHCR) support.

📦 Container Images

  1. cds-tools - Comprehensive tooling container

    • Bazel (6.5.0 & 8.4.0), kubectl, helm, terraform, terragrunt
    • NGC CLI, Docker CLI, regctl
    • Node.js 24, Python 3, uv
  2. cds-go-dev-1.24-alpine - Go development (Alpine)

    • Minimal size (~50MB)
    • Go 1.24.3 + golangci-lint + goimports + delve
  3. cds-go-dev-1.24-debian - Go development (Debian)

    • Better compatibility (~300MB)
    • For CGO-enabled packages
  4. cds-grafana-backup-tool - Grafana backup utility

✨ Features

  • Version Management: Uses VERSION.md file (currently 0.0.1)
  • GHCR Integration: Pushes to ghcr.io/nvidia/dsx-github-actions/cds-*
  • Path-Filtered Pipeline: Only triggers on cds-containers/ changes
  • Automated Testing: Tests built images before completion
  • Documentation: Comprehensive README with usage examples

🔧 Usage Example

jobs:
  build:
    runs-on: ubuntu-latest
    permissions:
      packages: read
    
    container:
      image: ghcr.io/nvidia/dsx-github-actions/cds-tools:0.0.1
      credentials:
        username: ${{ github.actor }}
        password: ${{ secrets.GITHUB_TOKEN }}
    
    steps:
      - uses: actions/checkout@v4
      - run: bazel build //...

📝 Key Differences from GitLab Version

  • ❌ Removed nvault (requires internal URM access)
  • ❌ Removed cds-cli (requires internal GitLab access)
  • ✅ Version from VERSION.md instead of Git tags
  • ✅ Path-filtered pipeline for efficiency
  • ✅ GHCR instead of GitLab Container Registry

🧪 Testing

Tested in test-dsx-ci repo:

  • ✅ All 4 images build successfully
  • ✅ Images push to GHCR as private packages
  • ✅ Test jobs can consume built images
  • ✅ Version tagging works correctly

📂 Files Added

  • cds-containers/ - Container definitions and Dockerfiles
  • .github/workflows/build-cds-containers.yml - Build pipeline
  • cds-containers/VERSION.md - Version file (0.0.1)
  • cds-containers/README.md - Documentation

@github-actions

github-actions Bot commented Jan 19, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

Add CDS container images for DSX projects with GitHub Actions support:

Container Images:
- cds-tools: Comprehensive tooling (Bazel, kubectl, helm, terraform, NGC CLI, etc.)
- cds-go-dev-1.24-alpine: Go 1.24 dev environment (Alpine, minimal)
- cds-go-dev-1.24-debian: Go 1.24 dev environment (Debian, compatibility)
- cds-grafana-backup-tool: Grafana backup utility

Key Features:
- Version management via VERSION.md (currently 0.0.1)
- Automatic GHCR push: ghcr.io/nvidia/dsx-github-actions/cds-*
- Path-filtered pipeline (only triggers on cds-containers/ changes)
- Removed internal dependencies (nvault, cds-cli) for GitHub compatibility
- Comprehensive documentation and usage examples

Pipeline:
- Build all 4 images in parallel
- Push to GHCR with version tags
- Automated testing of built images
- Only triggers when cds-containers/ files change

Signed-off-by: mmou <mmou@nvidia.com>
Issue: PRs don't have permission to push to GHCR, causing 403 Forbidden errors.

Solution: Set push: ${{ github.event_name == 'push' }} to only push images
when merging to main, while PRs still build and test images without pushing.

Signed-off-by: mmou <mmou@nvidia.com>
Test jobs try to pull images that don't exist in PR context.
Only run tests when images are actually pushed (push events).

Signed-off-by: mmou <mmou@nvidia.com>
@mmou-nv mmou-nv force-pushed the feat/add-cds-containers branch from 4fe6cc8 to ff7080c Compare January 19, 2026 07:08
@mmou-nv

mmou-nv commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

I have read the DCO Document and I hereby sign the DCO

@mmou-nv

mmou-nv commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

recheck

Simplify CHANGELOG to only include v0.0.1 initial release notes.

Signed-off-by: mmou <mmou@nvidia.com>
Changes:
- Remove CODEOWNERS file
- Replace VERSION.md with VERSION file
- Update workflow to read from VERSION file
- Update all documentation references from VERSION.md to VERSION
- Keep version at 0.0.1

Signed-off-by: mmou <mmou@nvidia.com>
Current issue: workflow triggers on all branch pushes, causing
unnecessary failed builds on feature branches.

Solution: Add branches: [main] to push trigger to only build and
push images when code is merged to main branch.

Signed-off-by: mmou <mmou@nvidia.com>
Issue: Job log shows 'Image pushed to GHCR' even in PRs where
images are NOT actually pushed, causing confusion.

Solution: Make the message conditional:
- Push event: 'Image built and pushed to GHCR'
- PR event: 'Image built successfully (not pushed in PR)'

Signed-off-by: mmou <mmou@nvidia.com>
@mmou-nv mmou-nv self-assigned this Jan 19, 2026
@mmou-nv mmou-nv merged commit 46d6b0b into main Jan 19, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants