The Wazi Deploy packager command

The Wazi Deploy packager creates a build in the artifact repository to upload the content of a local folder that contains the artifacts of an application, or creates a local package file in a specified working folder. It also produces the application manifest file that will be used by the Wazi Deploy generation command.

This local folder is not created by Wazi Deploy. It is typically a z/OS UNIX System Services partition in a z/OS environment or a standard folder in a distributed environment. The structure of the local folder is free. It can have folders and files. The files must have an explicit extension, which will be used as the type that you define in the deployment method. Wazi Deploy does not provide any facility to create the content of this folder.

To start the packager, enter a wazideploy-package UNIX command line.

The following code shows the syntax of the command.

usage: wazideploy-package [-h] [-mn manifestName] [-mv manifestVersion] [-md manifestDescription] [-m manifest] [-me manifestExtension] [-meo manifestExtensionOptions]
                          [-bn buildName] [-bN buildNumber] [-bu buildUrl] [-lf localFolder] [-cf configFile] [-r repository] [-rp repositoryPath] [-ut {archive,folder}]
                          [-lcf logConfigFile] [-wf workingFolder] [-an archiveName] [-v]

Packager Program Description

options:
  -h, --help            show this help message and exit
  -mn manifestName, --manifestName manifestName
                        The name of the application to mention in the manifest file
  -mv manifestVersion, --manifestVersion manifestVersion
                        The version of the application to mention in the manifest file (required).
  -md manifestDescription, --manifestDescription manifestDescription
                        The description of the application to mention in the manifest file (optional), replaced by the name if not present
  -m manifest, --manifest manifest
                        The new manifest file to generate (required).
  -me manifestExtension, --manifestExtension manifestExtension
                        The Python module extension path to amend the generated manifest
  -meo manifestExtensionOptions, --manifestExtensionOptions manifestExtensionOptions
                        The optional options transmitted to the Python module manifest extension
  -bn buildName, --buildName buildName
                        The artifactory build name (required for Artifactory).
  -bN buildNumber, --buildNumber buildNumber
                        The artifactory build number. If not provided it will be the last Artifactory build number.
  -bu buildUrl, --buildUrl buildUrl
                        The orchestrator build URL (optional).
  -lf localFolder, --localFolder localFolder
                        The local folder in which getting the files (required).
  -cf configFile, --configFile configFile
                        The path to the configuration file (required).
  -r repository, --repository repository
                        The name of the artifacts repository to store the build (required).
  -rp repositoryPath, --repositoryPath repositoryPath
                        The root path in the artifacts repository to store the build (optional)(default: buildName).
  -ut {archive,folder}, --uploadType {archive,folder}
                        Upload type (default: folder)
  -lcf logConfigFile, --logConfigFile logConfigFile
                        The logging configuration file (optional)
  -wf workingFolder, --workingFolder workingFolder
                        The path to the working folder (default: OS system tmp folder)
  -an archiveName, --archiveName archiveName
                    The name of the archive only for uploadType=archive (default: manifestName.manifestVersion.tar)
  -v, --version         Print product version and exit

The following table describes the arguments of the command line. Each argument has a long name and a short name, which are equivalent.

Table 1. Arguments of the command line
Argument long name Argument short name Description Required
--help -h The command line help. No
--manifestName -mn The name of the application in the manifest file. If no name is specified, the default name is None.

If --uploadType is archive (default value), the package name will be constituted of the concatenation of --manifestName and --manifestVersion. So the package name will be manifestName.manifestVersion.tar.

No
--manifestVersion -mv The version of the application in the manifest file.

If --uploadType is archive (default value), the package name will be constituted of the concatenation of --manifestName and --manifestVersion. So the package name will be manifestName.manifestVersion.tar.

Yes
--manifestDescription -md The description of the application in the manifest file. It is replaced by the --manifestName if it is not specified. No
--manifest -m
The new manifest file to generate.

Enter the local path to the manifest file.

Yes
--manifestExtension -me
The Python module extension path to amend the generated manifest file.
For example, if you pass a Python module that respects the following method signature, you can add external information to the generated manifest file.
def process_manifest_extension (manifest: dict, options: str):
    manifest['metadata']['annotations']['extension'] = 'myextension'
Note: Wazi Deploy controls the schema of the manifest file during the generation step with the --yamlValidationType argument of the generation command. The default value of this argument is strict. It means that you can add information only in metadata>annotations and in the properties fields of the artifact.
No
--manifestExtensionOptions -meo
The options transmitted to the Python module manifest extension.
No
--buildName -bn
The Artifactory build name.

It is required for Artifactory when the --uploadType is set to folder. If it is not indicated when --uploadType is set to archive, an Artifactory Build Info is not created.

It is forbidden for Nexus.

Yes only for Artifactory if --uploadType is folder.
--buildNumber -bN
The Artifactory build number (only for Artifactory. Forbidden for Nexus).

If you do not specify it, the last Artifactory build number is used.

No
--buildUrl -bu
The orchestrator build URL.

It can be the URL of the Jenkins pipeline of the build, for example.

No
--localFolder -lf
The local folder that contains the files to upload.
Yes
--configFile -cf
The path to the configuration file that contains the credentials to the artifact repository.
Yes only if --uploadType is folder and if the artifact repository credentials are not entered as environment variables
--repository -r
The name of the artifact manager repository to store the build.
Yes only if --uploadType is folder and if the artifact repository credentials are not entered as environment variables
--repositoryPath -rp
The root path of the repository to store the build (required for Nexus).

It is replaced by the --buildName if it is not specified.

For more information about the repository path that will be created in the artifact repository, see Naming conventions in the artifact repository.

No
--uploadType -ut
The following upload types are available:
  • folder to upload the whole content of the local folder to the artifact repository manager with the content of the local file and with the same folder structure. The created application manifest will reflect the content of the local folder.
  • archive (default value) to upload and archive the whole content of the local folder in a .tar file in the artifact repository manager. This .tar file can be used only in a static deployment.
    The file attributes on z/OS, such as tags and owner, are preserved. This is important to know when you use this package at deployment time.
Note: For Artifactory, an Artifactory Build Info is always created, unless --buildName is not specified.
No
--logConfigFile -lcf
The logging configuration file to customize the default log file.

If you do not specify the --logConfigFile argument,the log file (message.log by default) is generated to the path indicated in --workingFolder (if it is specified) instead of the current folder.

No
--workingFolder -wf The path to the working folder.

If you specify the --workingFolder argument without the --logConfigFile argument, the log file (message.log by default) is generated to the path indicated in --workingFolder instead of the current folder.

No
--archiveName -an
The name of the archive file.

It is valid only for an upload type that is set to archive. The default name of the archive file is manifestName.manifestVersion.tar.

For more information about the archive file path that will be created in the artifact repository, see Naming conventions in the artifact repository.

No
--version -v The Wazi Deploy version. No
The following code shows the example of a Wazi Deploy packager command line:
wazideploy-package\
  --manifestName genapp\
  --manifestVersion 1.0.1\
  --manifest deploy\new_manifest.yml\  
  --buildUrl http://example.com\
  --buildName genapp_build\
  --localFolder genapp_test\
  --configFile wazi_deploy_test/myconfig.yml\
  --repository wazi_deploy_repo
The following code shows the example of a Wazi Deploy packager command line that creates a local package file in the specified working folder. In the following example, the local package will be created in the mywork folder and its name will be cics-appl.1.0.0.tar.
wazideploy-package\
  --localFolder ./upload\ 
  --manifestName cics-appl\
  --manifestVersion 1.0.0\
  --manifest ./upload/wazideploy_manifest.yml\  
  --uploadType archive\
  --workingFolder ./mywork

Naming conventions in the artifact repository

If you indicate a path in the --repositoryPath argument, the repository path that will be created by the command in the artifact repository will differ according to the artifact repository:
  • In Nexus, the path will be repositoryPath/manifestVersion/manifestName.manifestVersion.tar.
  • In Artifactory, the path will be repositoryPath/manifestVersion/buildNumber/manifestName.manifestVersion.tar.
If you indicate a file name in the --archiveName argument, the archive file path that will be created by the command in the artifact repository will differ according to the artifact repository:
  • In Nexus, the path will be repositoryPath/manifestVersion/archiveName.
  • In Artifactory, the path will be repositoryPath/manifestVersion/buildNumber/archiveName.