The configuration file

You create your own configuration file to specify your credentials to the artifact repository. This file is required to use the Wazi Deploy packager and generation commands, except if you enter the credentials in environment variables before you run these commands.

Rather than entering the credentials in a configuration file, you can define the credentials directly as environment variables before you run the command that will trigger these APIs. Here is an example of how to do this:
export DEPLOY_ARTIFACT_REPOSITORY_TYPE="nexus"
export DEPLOY_ARTIFACT_REPOSITORY_URL="http://example.com"
export DEPLOY_ARTIFACT_REPOSITORY_USER="admin"
export DEPLOY_ARTIFACT_REPOSITORY_PASSWORD="password"
export DEPLOY_ARTIFACT_REPOSITORY_VERIFY="False"

Artifactory and Nexus are the only artifact repositories that this Wazi Deploy version supports.

Note:
If the Artifactory or Nexus server is behind a proxy server, you must set these environment variables before you run any Wazi Deploy command (wazideploy-package or wazideploy-generate) that needs a connection to the server.
  • For the HTTP protocol (not to be used in production), indicate the following export lines before you run the Wazi Deploy command (wazideploy-generate in the example):
    export http_proxy="http://<user>:<pass>@<proxy>:<port>"
    export HTTP_PROXY="http://<user>:<pass>@<proxy>:<port>"
    
    wazideploy-package | wazideploy-generate args ....
  • For the HTTPS protocol, indicate the following export lines before you run the Wazi Deploy command (wazideploy-generate in the example):
    export https_proxy="http://<user>:<pass>@<proxy>:<port>"
    export HTTPS_PROXY="http://<user>:<pass>@<proxy>:<port>"
    
    wazideploy-package | wazideploy-generate args ....

The configuration file must not be stored in a Git repository.

It is a .yml file, whose content is constrained. Specify the following parameters:
  • The type of the artifact repository, on a line that starts with type.

    The possible types are artifactory and nexus.

  • The URL to the artifact repository server, on a line that starts with url.
  • The credentials of the user that connects to the artifact repository server. Specify a line that starts with user and another line that starts with password.
    Note: After a command that requires this configuration file is run for the first time, the password is encrypted.
  • The Secure Sockets Layer (SSL) verification level, on a line that starts with verify. You can enter the following values for this parameter:
    • True (default value) to enable the SSL verification for the connection.
    • False to disable the SSL verification for the connection.
      Note: If you set to False, be sure to unset all the SSL environment variables such as CURL_CA_BUNDLE and REQUESTS_CA_BUNDLE.
    • The path to an SSL client certificate to use for the connection.

      Enter the relative path from where the Wazi Deploy command is run or the absolute path to the certificate file. The certificate file must contain the whole client certificate chain that is needed to connect to the Artifactory or Nexus server. The certificate file can be specific to an organization and must be given by the administrator of the Artifactory or Nexus server.

You can use the Wazi Deploy YAML schemas to validate the structure of the file.

The following sample code shows the content of a configuration file with test values that you must replace with your own:
artifact_repository:
   # The type of the artifact repository
   type: "artifactory"
   # The URL to the artifact repository server
   url: https://your.actifact.server.com/artifactory
   # Artifact repository credentials
   user: your_name_in_artifact_repository
   password: your_password
   verify: True