Skip to content
Development
Command

/test-pr-docker

Test PR with Docker image build workflow

From plugin
safe-agentic-workflow
39524 skills11 agents24 commands
Install
$ npx -y skills add bybren-llc/safe-agentic-workflow --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/test-pr-docker

Context preview

What this command does when you run it.

Test PR with Docker image build workflow

Command definition

test-pr-docker.md
description: Test PR with Docker image build workflow
argument-hint: [PR-number]
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob]

> **๐Ÿ“‹ TEMPLATE**: This command is a template. See "Customization Guide" below to adapt for your infrastructure.

Test the Docker registry PR workflow by adding the `build-docker-image` label to a PR and verifying the build.

Workflow

1. Get PR Number

If argument provided ($1):

  • Use as PR number
  • Fetch PR details: `gh pr view $1`

If no argument:

  • Check if current branch has open PR
  • Extract PR number from branch

2. Add Label to PR

Add `build-docker-image` label:

gh pr edit {PR-number} --add-label "build-docker-image"

Confirm label added:

gh pr view {PR-number} --json labels

3. Monitor Build

Explain to user:

  • GitHub Actions will build Docker image (~5-10 min)
  • Image will be tagged as `pr-{number}`
  • Build status visible in PR checks
  • Can monitor at: `https://{{GITHUB_ORG}}/{{PROJECT_NAME}}/actions`

Provide link to PR:

gh pr view {PR-number} --web

4. Verification Steps

Once build completes, guide user through verification:

**On Linux machine**:

# Pull PR-specific image
./scripts/dev-docker.sh pull-pr {PR-number}

# Verify image exists
docker images | grep {{PROJECT_NAME}}

# {{TICKET_PREFIX}}-400: Use {{PROJECT}}_IMAGE_TAG environment variable instead of editing compose file
# Set the tag before running docker compose:
export {{PROJECT}}_IMAGE_TAG=pr-{PR-number}

# Or update docker-compose.staging.yml image tag temporarily:
# Change: image: {{REGISTRY}}/{{PROJECT_NAME}}/dev:${{PROJECT}_IMAGE_TAG:-latest}
# To:     image: {{REGISTRY}}/{{PROJECT_NAME}}/dev:pr-{PR-number}

# Restart with PR image
./scripts/dev-docker.sh restart

# Verify services running
./scripts/dev-docker.sh status

# Check health
curl http://localhost:3000/api/health

5. Testing Complete

After verification:

# Revert docker-compose.dev.yml
# Remove label to stop builds
gh pr edit {PR-number} --remove-label "build-docker-image"

Success Criteria

  • โœ… Label added successfully
  • โœ… GitHub Actions build triggered
  • โœ… Image built with pr-{number} tag
  • โœ… Image pullable on Linux machine
  • โœ… Services start correctly
  • โœ… Hot-reload verified
  • โœ… Health check passes

Output

Report each step's status:

  • PR number and URL
  • Label addition confirmation
  • Build status (link to Actions)
  • Verification instructions
  • Expected next steps

This validates the entire PR Docker workflow before relying on it for future PRs.

Customization Guide

To adapt this command for your infrastructure, replace these placeholders:

| Placeholder | Description | Example | | ----------------- | ------------------------- | --------------------- | | `{{TICKET_PREFIX}}` | Your Linear ticket prefix | `WOR`, `PROJ`, `TASK` |

Read more
Ships withsafe-agentic-workflow

SAW โ€” SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!) Works for any team with repeatable processes: Software, Marketing, Research, Legal, Operations.

Get the whole plugin