Content Packages are collection of content items like cards, workspace templates, workflows and workspaces that are bundled in a ZIP file that can be easily uploaded and installed in sub account.
For more details on the Content packages, refer the sap help link – Content Packages
Today I will be illustrating the creation of Local Content Packages which contains custom cards.
Steps to setup Local Content Package
First step is to create a content package in Business Application Studio.
Prerequisite:
Make sure you have created a dev space with Development Tools for SAP Build Work Zone extension.
In the Dev Space created, choose New Project from Template. Select Content Package and click on Start.
In the details. fill the name, title and set Include Content Samples field to true if you need a sample included. The workspace opens with your project.
We will add a custom UI card into the Content Repository today. First, keep the zip file for the UI card ready.
Click on File->Import Project and upload the zip file for the card. Once the project is imported, you would see that there are two folders within the project. Delete the second folder. But before deleting, move the contents within the second folder to main folder. (Refer below image)
Next, create a folder ‘.card’ within the imported project. This is not necessary if the card is created in the same BAS.
Next, right click on the manifest of the imported project. And select ‘UI Integration Card: Package’ and create a zip file.
Next, go to our content package project created first. Right click on content.json file and click ‘Content Package: Content Edit’. Click on Add artifact. Enter the Name and fill the below details.
Copy the path of the imported project by right clicking on the project. Enter the path in the from field as shown above. Enter the zip package name of the imported project created in the package field, as done in the previous step. Once done, save it.
P.S. You can also select the mode as Git and use the github path too.
Next, right click on the manifest.json file in Content Package project and choose ‘Content Package: Package’. This will create a zip package. This package is used to upload into Work Zone to extract the cards.
P.S. You can also deploy it directly to Work Zone by right clicking and selecting ‘Content Package: Deploy to SAP Build Work Zone’.
To manually deploy it, go to Administrator console in your Work Zone Tenant, and Select Content Packages under UI Integration. Click on Upload Content Package and choose your zip file. Once Uploaded, install the content package.
Enable the card, and you can use the card in workspaces.
Conclusion
Above example explains how to create content packages to move cards, workflows or workspaces between various work zone tenants.