Delivery Builder Worker.
Proceeding principles.
- Listens to cdt.dlbuild.input queue for build requests. Queue may be re-defined.
- Gets delivery data from Subversion link specified in the request.
- Builds delivery using Subversion and Maven sources.
- Registers files used for build in delivery database by means of queue requests (cdt.dlcontents.input/cdt.dlartifacts.input)
- Saves final delivery to Maven.
- Sends requests to (cdt.dlcontents.input/cdt.dlartifacts.input) for registering delivery and its contents.
This job is responsible for wrapping (obfuscating) SQL code using Oracle wrap utility - if specified in the source.
Installation.
python -m pip install oc-dltool
Running
python -m oc_dltool
Short arguments description
python -m oc_dltool --help
Runtime settings:
Most of them are done via environment variables and several only can be re-defined from command line arguments.
NOTE: AMQP queue is now hardcoded to cdt.dlbuild.input and may not be redefined for now.
- ORACLE_HOME - folder where Oracle database is installed. Necessary for wrap functionality to work. Oracle wrap binary is to be then at path
${ORACLE_HOME}/bin/wrap
- PSQL_URL, PSQL_USER, PSQL_PASSWORD - credentials for PostgerSQL database connection, used for Django models. PSQL_URL should contan database schema as a parameter. Format:
{hostFQDN}:{port}/{instance}?search_path={schema}
- AMQP_URL, AMQP_USER, AMQP_PASSWORD - credentials for queue connection (RabbitMQ or other AMQP implementation)
- SMTP_URL, SMTP_USER, SMTP_PASSWORD - credentials for mail server SMTP protocol - to send an e-mail notifications to delivery authors about delivery being ready.
- SVN_CLIENTS_URL, SVN_CLIENTS_USER, SVN_CLIENTS_PASSWORD - credentials for SubVersion section of clients-related data.
- MVN_URL, MVN_USER, MVN_PASSWORD - credentials for maven-like repository connection (Sontatype Nexus and JFrog Artifactory are currently supported only)
- MVN_DOWNLOAD_REPO - Maven repository to download delivery components from
- MVN_UPLOAD_REPO - Maven repository to upload packed deliveries to
- MVN_PREFIX - GroupID prefix for packed delivery GAV.
- MVN_RN_SUFFIX - Release Notes GroupID suffix for GAV. Necessary for Release Notes auto-append.
- MVN_DOC_SUFFIX - Documentation GroupID suffix for GAV. Necessary for Documentation auto-append.
- DELIVERY_PORTAL_URL - URL for delivery-tool web-interface to see delivery information, used for e-mail notification.
- PORTAL_RELEASE_NOTES_ENABLED - enable or disable appending Release Notes. Default:
"False"
- DISTRIBUTIVES_API_CHECK_ENABLED - enable or disable check if distributives included to the delivery are deliverable. Default:
"False"
- DISTRIBUTIVES_API_URL - URL for Distributives API microservice. Mandatory if DISTRIBUTIVES_API_CHECK_ENABLED is set to
"True"
- MAIL_DOMAIN - mail domain for notifications where delivery authors mailboxes are.
- MAIL_CONFIG_FILE - path to mailer configuration file.
- MAIL_CONFIG_DIR - path to mailer configuration directory.
- COUNTERPARTY_ENABLED - enable or disable client counterparty functionality for Release Notes and Documentation appending. Default:
"False"
- CLIENT_PROVIDER_URL - URL for Client Provider microservice. Mandatory if COUNTERPARTY_ENABLED is set to
"True"
- DELIVERY_ADD_ARTS_PATH - Additional JSONized setting path. Used for appending Copyright files if necessary. Useless if COUNTERPARTY_ENABLED is
"False"