cleaning up build

Change-Id: Ic3b8b72e3edc94a2234777878f641ba2a8f67165
diff --git a/build.gradle.new b/build.gradle.new
index 89b65b5..55f7664 100644
--- a/build.gradle.new
+++ b/build.gradle.new
@@ -215,6 +215,7 @@
 }
 
 task publish {
+    //FIXME: This works because the upstream project primes the nodes before running this.
     comps.each { name, spec -> if (spec.type == 'image') { dependsOn "publish" + name } }
     dependsOn publishBootstrapImage
     dependsOn publishHarvesterImage
@@ -225,9 +226,6 @@
     dependsOn publishSwitchqImage
 }
 
-tasks.addRule(new DockerFetchRule(project))
-tasks.addRule(new DockerPublishRule(project))
-tasks.addRule(new DockerTagRule(project))
 
 // ~~~~~~~~~~~~~~~~~~~ Deployment / Test Tasks  ~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -377,8 +375,12 @@
     args = args.p(skipTags.asParam("skip-tags", ",")).p(extraVars.asParam("extra-vars", " ")) << "head-node.yml"
 }
 
-publish.mustRunAfter prime
-
 prime.dependsOn {
     updateDocker
 }
+
+tasks.addRule(new DockerFetchRule(project))
+tasks.addRule(new DockerPublishRule(project, project(':maas').prime))
+tasks.addRule(new DockerTagRule(project))
+
+