Packaging and deploying HFS build artifacts

The artifacts that are produced by the HFS build feature can be packaged and deployed.

For explanations about the packaging and deployment process in Enterprise Extensions, see Packaging and deploying with Enterprise Extensions.

Packaging

A packaging request can be based on outputs from work items or a manually created list of resources and the outputs and listed resources can refer to HFS artifacts.

The packaging creates a single package archive (package.zip) and manifest (packageManifest.xml). The manifest entries use containers (directory type) and resources (file type), like with Linux® and UNIX package definitions.

In the z/OS Packaging tab of the Package Definition editor, specify the HFS root directory if the ship list contains HFS files. When a Build Definition is selected, the HFS root directory field automatically contains the value of the HFS outputs directory from the Build Definition.

If obsolete files are detected in the work item packaging, the manifest is updated and it lists the files to be deleted during deployment.

Before you run a packaging build, create a ship list filter file on the Linux or UNIX build machine where the packaging build is to run. The ship list filter file is a text file that is mandatory for Linux and UNIX, and optional for z/OS® and IBM® i. In the ship list filter file, indicate which build files are to be included or excluded in the package archive. See the explanations in Creating a ship list filter file.

The following code is a sample ship list that contains both PDS and HFS:
<?xml version="1.0" encoding="UTF-8"?>
<manifest type="MANIFEST_SHIPLIST">
   <container name="SPADEA.MORT.BUILD.BMSCPYBK" type="PDS">
      <resource name="EPSMORT" type="PDSMember"/>
   </container>
   <container name="SPADEA.MORT.BUILD.LOAD" type="PDS">
      <resource name="EPSMORT" type="PDSMember"/>
   </container>
   <container name="javaProject" type="directory">
      <resource name="*.jar" type="file"/>
      <resource name="*.wsdl" type="file"/>
   </container>
</manifest>
The following code is the content of the resulting packageManifest.xml file:
<?xml version="1.0" ?>
<manifest type="MANIFEST_LIST">
   <container name="SPADEA.MORT.BUILD.LOAD" type="PDS">
      <resource name="EPSMORT" type="PDSMember" lastModifiedTimestamp="2016/06/06 10:49:13"/>
   </container>
   <container name="SPADEA.MORT.BUILD.BMSCPYBK" type="PDS">
      <resource name="EPSMORT" type="PDSMember" lastModifiedTimestamp="2016/06/06 10:49:13"/>
   </container>
   <container name="javaProject" type="directory">
      <resource name="com.ibm.test.project.ear" type="file" lastModifiedTimestamp="1465224537000"/>
      <resource name="com.ibm.test.project.wsdl" type="file" lastModifiedTimestamp="1465224537000"/>
   </container>
</manifest>

Deployment

When you create a Deployment Definition, specify an HFS root directory in the z/OS deployment tab if the package that is deployed contains HFS files. The HFS files within the archive are then unpacked to this directory, and any HFS deletions in the manifest are removed from the file system. The backup archive that is used by the rollback feature then includes previous copies of the HFS files, just like with MVS™ resources.