Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
Moved symlink current command so it runs after deploy tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Oct 16, 2016
1 parent b8ffe74 commit 9bf74cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fabrik/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,10 @@ def deploy():
except Exception, e:
return report("Error occurred on copy. Aborting deploy", err=e)

# Symlink current folder
if not env.exists(paths.get_source_path(release_name)):
return report("Source path not found '%s'" %
paths.get_source_path(release_name))

paths.symlink(paths.get_source_path(release_name),
paths.get_current_path())

try:
run_hook("deploy")
except Exception, e:
Expand All @@ -129,6 +125,10 @@ def deploy():
run_task("rollback")
return report("Error occurred on deploy")

# Symlink current folder
paths.symlink(paths.get_source_path(release_name),
paths.get_current_path())

# Clean older releases
if "max_releases" in env:
cleanup_releases(int(env.max_releases))
Expand Down Expand Up @@ -196,6 +196,7 @@ def debug():
from fabric.network import ssh

init_tasks()

ssh.util.log_to_file("fabrik-debug.log", 10)


Expand All @@ -207,5 +208,4 @@ def test():

init_tasks()

# TODO: Added local test support
env.run("cat /etc/*-release") # List linux dist info

0 comments on commit 9bf74cd

Please sign in to comment.