ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1503311 - /ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh
Date Mon, 15 Jul 2013 15:52:38 GMT
Author: bramk
Date: Mon Jul 15 15:52:37 2013
New Revision: 1503311

URL: http://svn.apache.org/r1503311
Log:
[sandbox] Example continuous deployment go script

Added:
    ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh

Added: ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh
URL: http://svn.apache.org/viewvc/ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh?rev=1503311&view=auto
==============================================================================
--- ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh (added)
+++ ace/sandbox/bramk/org.apache.ace.cli/deploy.gosh Mon Jul 15 15:52:37 2013
@@ -0,0 +1,68 @@
+
+
+sourceindex = (repo:index /tmp/testrepo)
+sourcerepo  = (repo:repo R5 $sourceindex)
+targetrepo = (repo:repo OBR http://localhost:8080/obr/repository.xml)
+releaserepo = (repo:repo OBR http://localhost:9091/obr/repository.xml)
+
+#repo:ls $sourcerepo "(osgi.identity=org.amdatu.opensocial)"
+#repo:ls $targetrepo "(osgi.identity=org.amdatu.opensocial)"
+#echo "delete"
+#repo:rm $targetrepo "(osgi.identity=org.amdatu.opensocial)"
+#echo "copy"
+#repo:cp $sourcerepo $targetrepo "(osgi.identity=org.amdatu.opensocial)"
+
+echo "Deploying release"
+deployed = repo:cd $releaserepo $sourcerepo $targetrepo
+
+echo "Opening workspace"
+workspace = (ace:cw)
+
+echo "Purging artifacts"
+artifacts = ($workspace la)
+each $artifacts {
+  $workspace da $it
+}
+
+echo "Checking cdfeature"
+feature = $workspace lf "(name=cdfeature)"
+if { math:eq ($feature size) 0 } { $workspace cf "cdfeature" }
+
+echo "Checking cddistribution"
+distribution = $workspace ld "(name=cddistribution)"
+if { math:eq ($distribution size) 0 } { $workspace cd "cddistribution" }
+
+echo "Checking f2d association"
+associations = $workspace lf2d
+found = 0
+each $associations {
+  if { ($it getAttribute "leftEndpoint") equals "(name=cdfeature)" } { echo "FOUND"; found
= 1 }
+}
+if { math:eq $found 0 } { $workspace cf2d "(name=cdfeature)" "(name=cddistribution)" "1"
"1" }
+
+echo "Checking a2f association"
+associations = $workspace la2f
+found = 0
+each $associations {
+  if { ($it getAttribute "rightEndpoint") equals "(name=cdfeature)" } { echo "FOUND"; found
= 1 }
+}
+if { math:eq $found 0 } { $workspace ca2f "(cdartifact=true)" "(name=cdfeature)" "10000"
"1" }
+
+
+echo "Creating artifacts"
+each $deployed {
+
+  identity = $it getIdentity
+  version = $it getVersion
+  name = "$identity - $version"
+  url = $it getUrl
+  mimetype = $it getMimetype
+
+  if { $mimetype equals "application/xml:osgi-autoconf" } \
+  { $workspace ca [ artifactName="$name" url="$url" mimetype="$mimetype" filename="$name"
processorPid="org.osgi.deployment.rp.autoconf" cdartifact="true" ] } \
+  { $workspace ca [ artifactName="$name" url="$url" mimetype="$mimetype" Bundle-SymbolicName="$identity"
Bundle-Version="$version" cdartifact="true" ] }
+}
+
+echo "Comitting workspace"
+$workspace commit
+ace:rw $workspace



Mime
View raw message