Skip to content

Support mina deploy #576

Open
Open
@risen

Description

@risen

We're using mina instead of capistrano to deploy. It'd be nice to have out of the box support for AppSignal deploy markers.

Right now we're using something like this:

namespace :appsignal do
  task :deploy do
    in_path "#{fetch(:current_path)}" do
      command %{#{fetch(:bundle_prefix)} appsignal notify_of_deploy --revision=`cat #{fetch(:current_path)}/.mina_git_revision` --user=#{ENV['USER'] || ENV['USERNAME']} --environment=#{fetch(:rails_env)}}
    end
  end
end

… which uses the deprecated (?) CLI command.

Or this:

default: &defaults
  push_api_key: "api_key"
  name: "app_name"
  revision: <%= File.read(Rails.root.join('.mina_git_revision')).strip if Rails.root.join('.mina_git_revision').exist? %>

… which works too but doesn't include the username in the deploy.

There's not :current_revision variable in mina, so it's a bit clumsy to use a remote (server-side) revision to execute local ruby code for the deploy notification. Proper support would be nice.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions