Skip to content

post-deployment pipeline steps #55

Description

@rsgalloway

After all targets are deployed, distman checks for "post_deploy" key.

  • It runs each step, in order, similar to how pipeline steps are handled now.
  • Optional: allow "env" injection for variable substitution, same as regular pipelines.
  • Can be implemented exactly like "pipeline" at the top level, just deferred to the end.

Use cases:

  • [Reload systemd for new unit files "script": ["systemctl daemon-reload"]
  • Enable or restart services "script": ["systemctl restart apache2"]
  • Run migration or setup script "script": ["bash /opt/scripts/initialize.sh"]
  • Notify via webhook or Slack "script": ["curl -X POST ..."]
{
  "author": "ryan@rsg.io",
  "targets": {
    ...
  },
  "post_deploy": {
    "reload_systemd": {
      "script": ["systemctl daemon-reexec", "systemctl daemon-reload"]
    },
    "enable_timers": {
      "script": [
        "systemctl enable --now deploy@api.timer"
      ]
    }
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions