Skip to content

Commit

Permalink
Add targets to transfer files from new signing node
Browse files Browse the repository at this point in the history
See ukf/ukf-meta#356 for details
  • Loading branch information
Alex Stuart committed Sep 21, 2022
1 parent 3ecf61c commit e43264e
Showing 1 changed file with 71 additions and 8 deletions.
79 changes: 71 additions & 8 deletions orchestration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@
* jenkins.url.to.trigger.publication - full URL to trigger the Jenkins task responsible for publication
-->

<!-- git config -->
<property name="git.repo.project.products" value="ukf-products"/>

<!-- directories on the orchestration machine -->
<property name="build.dir" value="${shared.ws.dir}/build"/>
<property name="tooling.dir" value="${shared.ws.dir}/ukf-meta"/>
<property name="aggregates.dir" value="${shared.ws.dir}/${git.repo.project.products}/aggregates"/>

<!-- remote working directory may not be the same as the orchestrator (they are the same in production) -->
<property name="remote.ws.dir" value="${shared.ws.dir}"/>
Expand All @@ -111,6 +115,20 @@
<property name="md.cdsall.unsigned" value="ukfederation-cdsall-unsigned.xml"/>
<property name="md.wugen.unsigned" value="ukfederation-wugen-unsigned.xml"/>

<!-- filenames of the signed aggregates -->
<property name="md.prod.signed" value="ukfederation-metadata.xml"/>
<property name="md.test.signed" value="ukfederation-test.xml"/>
<property name="md.export.signed" value="ukfederation-export.xml"/>
<property name="md.export.preview.signed"
value="ukfederation-export-preview.xml"/>
<property name="md.back.signed" value="ukfederation-back.xml"/>
<property name="md.wayf.signed" value="ukfederation-wayf.xml"/>
<property name="md.cdsall.signed" value="ukfederation-cdsall.xml"/>
<property name="md.wugen.signed" value="ukfederation-wugen.xml"/>

<!-- other files -->
<property name="mdq.cache" value="mdqcache.tar.gz"/>

<!--
*************************************
*** ***
Expand Down Expand Up @@ -193,17 +211,62 @@

<!-- Step 4.1.3 create tarfile of signed MDQ products is no orchestration -->

<!-- Step 4.2 copy signed files from node to orchestrator -->
<!--
<target name="process.create-mdq-cache.scp.and.push" depends="
fs.scp.signed.files.from.keymaster,
fs.scp.mdqcache.from.keymaster,
fs.cp.other.files.to.aggregates.dir,
<!-- Step 4.2 collates products (signed and otherwise) on orchestrator -->
<target name="process.collate.products.on.orchestrator" depends="
fs.rsync.products.from.node,
fs.rsync.mdqcache.from.node,
fs.copy.stats.file.to.aggregates.directory,
git.products.addallnewfiles,
git.products.commit.signed">
<echo>Signed aggregates and stats file committed to data repository.</echo>
<echo>Collated products on orchestrator</echo>
</target>

<target name="fs.rsync.products.from.node">
<echo>Copying signed products from node</echo>
<exec executable="rsync" dir="${aggregates.dir}" failonerror="true">
<arg value="-a"/>
<!-- use ssh with default identity and known_hosts -->
<arg value="-e"/>
<arg value="ssh"/>
<!-- source files on remote node -->
<arg value="${node.build.dir.url}/${md.prod.signed}"/>
<arg value="${node.build.dir.url}/${md.test.signed}"/>
<arg value="${node.build.dir.url}/${md.export.signed}"/>
<arg value="${node.build.dir.url}/${md.export.preview.signed}"/>
<arg value="${node.build.dir.url}/${md.back.signed}"/>
<arg value="${node.build.dir.url}/${md.wayf.signed}"/>
<arg value="${node.build.dir.url}/${md.cdsall.signed}"/>
<arg value="${node.build.dir.url}/${md.wugen.signed}"/>
<!-- bring them back to orchestrator working directory -->
<arg value="${aggregates.dir}"/>
</exec>
</target>

<target name="fs.rsync.mdqcache.from.node">
<echo>Copying mdqcache from node</echo>
<exec executable="rsync" dir="${build.dir}" failonerror="true">
<arg value="-a"/>
<!-- use ssh with default identity and known_hosts -->
<arg value="-e"/>
<arg value="ssh"/>
<!-- source files on remote node -->
<arg value="${node.build.dir.url}/${mdq.cache}"/>
<!-- bring them back to orchestrator working directory -->
<arg value="${build.dir}"/>
</exec>
</target>

<target name="fs.copy.stats.file.to.aggregates.directory">
<echo>Not needed the now</echo>
</target>

<target name="git.products.addallnewfiles">
<echo>Not needed the now</echo>
</target>

<target name="git.products.commit.signed">
<echo>Not needed the now</echo>
</target>
-->

<!-- Step 5 transfer files back to repo -->
<!--
Expand Down

0 comments on commit e43264e

Please sign in to comment.