Skip to content

Commit

Permalink
fix: nomad didn't create dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayeu committed Oct 28, 2024
1 parent f8f6f70 commit fa5dca9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/std/fwlib/blockTypes/nomad.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ in
declare job_path="$PRJ_DATA_HOME/${job_path}"
render() {
echo "Rendering to $job_path..."
mkdir -p "$PRJ_DATA_HOME/${dirOf fragmentRelPath}"
rm -rf "$job_path"
ln -s "${jobWithGitRevision target}" "$job_path"
if status=$(nomad validate "$job_path"); then
Expand All @@ -69,7 +70,7 @@ in
render
if ! plan_results=$(nomad plan -force-color "$job_path"); then
echo "$plan_results"
run() { echo "$plan_results" | grep 'nomad job run -check-index'; }
run() { eval "$(echo "$plan_results" | grep 'nomad job run -check-index')"; }
${askUserToProceedSnippet "deploy" "run"}
else
echo "Job hasn't changed since last deployment, nothing to deploy"
Expand Down

0 comments on commit fa5dca9

Please sign in to comment.