Skip to content

Issues/442 prod pipeline - #56

Open
godsonten wants to merge 3 commits into
mainfrom
issues/442-prod-pipeline
Open

Issues/442 prod pipeline#56
godsonten wants to merge 3 commits into
mainfrom
issues/442-prod-pipeline

Conversation

@godsonten

@godsonten godsonten commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

What changed

Why


Summary by CodeRabbit

  • New Features

    • Added a manual production deployment workflow for the documentation site.
    • Added support for deploying selected release branches.
    • Added deployment validation, build verification, artifact handling, dry-run checks, and post-deployment smoke testing.
    • Added rollback guidance using the previous known-good release.
  • Documentation

    • Updated the release process to document staging and production deployment steps using release branches.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7915d786-a61b-4206-aeae-80a544e08eaf

📥 Commits

Reviewing files that changed from the base of the PR and between 82c2244 and f616671.

📒 Files selected for processing (2)
  • .github/workflows/40-deploy-prod.yml
  • docs/release-process.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/40-deploy-prod.yml

📝 Walkthrough

Walkthrough

The pull request adds a manual production deployment workflow for docs.zcp.zsoftly.ca. It validates release inputs, builds and uploads an artifact, deploys it on the zsoftly-yow runner, runs a smoke test, and updates release process documentation.

Changes

Production deployment

Layer / File(s) Summary
Release validation and artifact build
.github/workflows/40-deploy-prod.yml, .github/actionlint.yaml, docs/release-process.md
The workflow validates main dispatches and release/* inputs, retrieves shared deployment logic, builds the selected release, and uploads the artifact. Runner lint configuration and release instructions support the workflow.
Artifact deployment and smoke test
.github/workflows/40-deploy-prod.yml
The deployment job runs on zsoftly-yow, checks out the exact build commit, installs the artifact, runs an Ansible dry run, deploys the docs site, and runs a smoke test.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: clintonche, ditahkk, ditahm6

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant BuildJob as GitHub Actions build job
  participant IaaS as shared iaas deployment script
  participant Artifact as GitHub artifact store
  participant DeployJob as zsoftly-yow deployment job
  participant Docs as docs site
  Maintainer->>BuildJob: Dispatch with source_ref
  BuildJob->>IaaS: Prepare and build selected release
  BuildJob->>Artifact: Upload artifact and resolved source commit
  DeployJob->>Artifact: Download artifact
  DeployJob->>IaaS: Prepare source and deploy docs site
  IaaS->>Docs: Deploy documentation and run smoke test
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the template headings and placeholder comments, with no summary of changes or reasons. Describe the production workflow changes, explain the motivation, and link issue 442.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the production pipeline change and references issue 442.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issues/442-prod-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/40-deploy-prod.yml (1)

37-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use [ERROR] instead of [FAIL].

These messages use [FAIL]. The workflow guideline permits [ERROR], not [FAIL]. Replace each [FAIL] marker.

Also applies to: 60-60, 163-164

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/40-deploy-prod.yml around lines 37 - 45, Update the
validation error messages in the production deploy workflow, including the
checks around SOURCE_REF and the additional occurrences at the referenced
locations, to use the “[ERROR]” prefix instead of “[FAIL]”; keep the existing
messages and validation behavior unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/40-deploy-prod.yml:
- Around line 40-47: Update the production workflow validation around SOURCE_REF
to require immutable staging provenance, such as a staging promotion record,
workflow run, or commit SHA, and verify that the successful staging deployment
corresponds to the exact commit selected for production rather than only
validating a movable release/* branch. Update docs/release-process.md lines
30-31 to document promoting the exact validated commit; both listed sites
require changes.
- Around line 53-54: Update the build and deploy jobs in the workflow so the
IaaS repository revision is resolved to one commit SHA during the build, exposed
as a job output, and consumed by the deploy job. Replace the deploy job’s
IAAS_REF main reference with that immutable SHA and ensure checkout validates or
uses the same revision before running deployment scripts.

---

Nitpick comments:
In @.github/workflows/40-deploy-prod.yml:
- Around line 37-45: Update the validation error messages in the production
deploy workflow, including the checks around SOURCE_REF and the additional
occurrences at the referenced locations, to use the “[ERROR]” prefix instead of
“[FAIL]”; keep the existing messages and validation behavior unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f269eb3-942b-49ee-8dab-7807fb97b9e2

📥 Commits

Reviewing files that changed from the base of the PR and between 168b6f6 and 82c2244.

📒 Files selected for processing (3)
  • .github/actionlint.yaml
  • .github/workflows/40-deploy-prod.yml
  • docs/release-process.md

Comment on lines +40 to +47
if [[ "$SOURCE_REF" != release/* ]]; then
echo "[FAIL] source_ref must start with release/ (got: $SOURCE_REF)"
exit 1
fi
if ! git check-ref-format --branch "$SOURCE_REF" >/dev/null 2>&1; then
echo "[FAIL] source_ref must be a valid branch name (got: $SOURCE_REF)"
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Require immutable staging provenance before production deployment.

The workflow accepts any syntactically valid release/* branch. It does not verify a successful staging deployment or identify the staged commit. A branch ref can move after staging.

  • .github/workflows/40-deploy-prod.yml#L40-L47: require a staging promotion record, workflow run, or commit SHA, and verify that its successful staging deployment matches the commit selected for production.
  • docs/release-process.md#L30-L31: document promotion of the exact validated commit instead of promotion of the same branch ref.
📍 Affects 2 files
  • .github/workflows/40-deploy-prod.yml#L40-L47 (this comment)
  • docs/release-process.md#L30-L31
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/40-deploy-prod.yml around lines 40 - 47, Update the
production workflow validation around SOURCE_REF to require immutable staging
provenance, such as a staging promotion record, workflow run, or commit SHA, and
verify that the successful staging deployment corresponds to the exact commit
selected for production rather than only validating a movable release/* branch.
Update docs/release-process.md lines 30-31 to document promoting the exact
validated commit; both listed sites require changes.

Comment thread .github/workflows/40-deploy-prod.yml
@godsonten

Copy link
Copy Markdown
Collaborator Author

Addressed the actionable workflow comments in this branch:

  • Updated production workflow validation messages from [FAIL] to [ERROR].
  • Resolved zsoftly/iaas main to an immutable commit SHA during the build job and made the deploy job fetch that exact SHA before running the shared deploy script.
  • Kept the operator UI simple: production deploy still only asks for source_ref=release/.

For the staging provenance suggestion: the workflow now pins the selected release commit during prod and fails if the release branch moves between build and deploy. Verifying that the same commit came from a specific successful staging workflow run is a larger promotion-record feature, so I recommend tracking that separately instead of expanding this PR.

  Run the shared iaas deploy script with PHASE=dry_run before the real production deploy while keeping the public docs build on GitHub-hosted runners and deploy secrets on the YOW
  production job.
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