Skip to content

ENH: set up workflows to deploy the backend#39

Merged
YektaY merged 1 commit intomainfrom
yektay/workflows
Apr 8, 2026
Merged

ENH: set up workflows to deploy the backend#39
YektaY merged 1 commit intomainfrom
yektay/workflows

Conversation

@YektaY
Copy link
Copy Markdown
Collaborator

@YektaY YektaY commented Mar 6, 2026

Description

Pass deployment secrets (database_url, redis_url, ghcr_token, ghcr_user) via client-payload to build-system-playbooks
Add manual "Deploy to Production" workflow (deploy-prod.yml) that triggers deploy-container-prod in build-system-playbooks

Prod deploy flow
Create a release → build-release.yml builds and pushes image
Go to Actions → "Deploy to Production" → enter release tag → Run
Triggers deploy-container-prod in build-system-playbooks → webhook → Deployment Controller → Ansible

Motivation

Set up CI/CD pipeline for the project

Where Has This Been Documented?

Screenshots

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions

@YektaY YektaY marked this pull request as ready for review March 9, 2026 21:01
@YektaY YektaY force-pushed the yektay/workflows branch from f43c5d0 to 0567e65 Compare March 10, 2026 18:46
@github-actions github-actions Bot requested a deployment to CONTAINER_DEV March 10, 2026 21:43 Abandoned
@YektaY YektaY force-pushed the yektay/workflows branch 2 times, most recently from 8a9e9f7 to 0234486 Compare March 13, 2026 16:51
@YektaY YektaY requested a review from a team March 13, 2026 16:52
@YektaY YektaY self-assigned this Mar 17, 2026
@YektaY YektaY linked an issue Mar 17, 2026 that may be closed by this pull request
@YektaY YektaY linked an issue Mar 25, 2026 that may be closed by this pull request
Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy-prod.yml
Comment thread docker/Dockerfile.prod Outdated
Comment thread docker/Dockerfile.prod
@YektaY YektaY force-pushed the yektay/workflows branch from 0234486 to aba6750 Compare March 31, 2026 23:13
Copy link
Copy Markdown
Contributor

@zdomke zdomke left a comment

Choose a reason for hiding this comment

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

Approved

This set of workflows looks good to me. I talked through the workflows with Yekta and they seemed good.

... But one concern

The deployment workflows seem like they may work for downgrading sometimes depending on any alembic migrations. If alembic does intend to revert to a previous version, then alembic upgrade head will throw an error. If the alembic version stays the same in a downgrade, then nothing happens.

Possible Solutions

All alembic downgrades will need to be run manually before starting the workflows using alembic downgrade <revision>.

@zdomke
Copy link
Copy Markdown
Contributor

zdomke commented Apr 6, 2026

Possible Solutions

All alembic downgrades will need to be run manually before starting the workflows using alembic downgrade <revision>.

I looked briefly into taking the intended downgrade revision ID as a workflow dispatch input and running the downgrade command using the given ID. My issue was that I'm not sure how to confirm the command would be run prior to deployment rather than after.

  workflow_dispatch:
    inputs:
      is_downgrade:
        description: 'Is this a downgrade to a previous release?'
        required: false
        type: boolean
        default: false
      downgrade_revision:
        description: 'Alembic revision ID to downgrade to (only used if downgrading, e.g., 61476c608fc3)'
        required: false
        type: string
        default: 'head'

@YektaY
Copy link
Copy Markdown
Collaborator Author

YektaY commented Apr 8, 2026

I will make a new ticket to support the rollback with alembic downgrade

- Add build-and-deploy-dev, build-release, deploy-prod, deploy workflows
- Add config.yaml and Dockerfile.prod for software factory onboarding
- RM: deploy.yml, deprecated code
@YektaY YektaY force-pushed the yektay/workflows branch from 29728af to 024da8a Compare April 8, 2026 22:52
@YektaY YektaY merged commit 915b6eb into main Apr 8, 2026
2 checks passed
@YektaY YektaY deleted the yektay/workflows branch April 8, 2026 22:59
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.

[FEATURE] - Set up deployment workflow targeting dev and prod [FEATURE] - Dev-Ops: set up backend for Dev and Prod

3 participants