Skip to content

Commit

Permalink
Add node variables to exec hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ffNethive committed Aug 8, 2024
1 parent b9c0b29 commit d720dab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/oxidized/hook/exec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require 'json'

class Exec < Oxidized::Hook
include Process

Expand Down Expand Up @@ -70,7 +72,8 @@ def make_env(ctx)
"OX_REPO_COMMITREF" => ctx.commitref.to_s,
"OX_REPO_NAME" => ctx.node.repo.to_s,
"OX_ERR_TYPE" => ctx.node.err_type.to_s,
"OX_ERR_REASON" => ctx.node.err_reason.to_s
"OX_ERR_REASON" => ctx.node.err_reason.to_s,
"OX_NODE_VARS" => JSON.dump(ctx.node.vars)
)
end
if ctx.job
Expand Down

0 comments on commit d720dab

Please sign in to comment.