Skip to content

Conversation

@Phillita
Copy link

@Phillita Phillita commented Sep 24, 2025

Motivation

I am currently trying to run a PoC of Shipit over our current manual deploy process. I noticed there are pre and post scripts that can be run, but I found out that on command errors, the post script won't be run.

My current system let's us know when deploys fail, and I think allowing post scripts to run on failure will get me the needed information in my secondary tracking system.

Changes

  • Update the bundler discovery section to let the sed command work with modern macs (issue Disparate Ruby Versions #1371)
  • Add config for post scripts on both deploy and rollback sections to run on_error
  • Updated the code to allow for post scripts to run on command errors
  • Added extra env config (FAILED/FAILURE_MESSAGE) for use in pre-/post-scripts
  • Updated README to include dependencies.bundler.frozen
  • Updated README to include sections on post scripts with on_error flag
  • Refactored README to use mostly pure markdown instead of HTML

Other fixes

  • Restored functionality to the stack show page for previously deployed tasks
    • There was a change to collection rendering which removed a warning but this broke functionality
    • Clicking links when rendering the generic partial led to 500 errors
    • You could no longer rollback to previous deploys or mark health statuses

@Phillita
Copy link
Author

I'm working on the CLA with my org now.

Phillita and others added 2 commits October 7, 2025 13:26
Rendering the tasks with a specific partial was blowing up when tryiong to click links for the generic task partial.
@Phillita
Copy link
Author

I have signed the CLA!

@juice928
Copy link

👋 Hi, I'm an automated AI code review bot. I ran some checks on this PR and found 2 points that might be worth attention (could be false positives, please use your judgment):

  1. The logic for deploy.post might need adjustment to support multiple command steps

    • Location: lib/shipit/deploy_commands.rb:L15-L20
    • Impact: If multiple steps are provided as a list, they might be executed as a single command with arguments instead of sequential tasks.
    • Suggestion: Consider iterating over the deploy_post configuration to ensure each step is initialized as an individual command.
  2. The rollback.post configuration seems to expect a single command rather than a list

    • Location: lib/shipit/rollback_commands.rb:L9-L14
    • Impact: Multi-step rollback hooks might not execute correctly because subsequent steps are treated as parameters for the first command.
    • Suggestion: It would be great to apply a similar iteration pattern here to handle multiple rollback steps correctly.

If you find these suggestions disruptive, you can reply "stop" , and I'll automatically skip this repository in the future.

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.

2 participants