Skip to main content
Zephyr
All documentation pages

ZE - Webhook Deployment (Artemis)

Prerequisites

  1. Install Java 17.

  2. Ensure your Zephyr Enterprise and Artemis is set up and running, by launching the application in the browser:

Webhook Service Deployment (Jar)

  1. Create a directory under folder opt zephyrservice.

    mkdir zephyrservice
  2. Download the ze-jira-webhook.jar and copy it under zephyrservice.

  3. Create a ze-jira-webhook config file named zeJiraWebhook.properties under folder zephyrservice.

    vi zeJiraWebhook.properties
  4. Add the below line in the file zeJiraWebhook.properties.

    #Webhook Service port
    server.port=8081
    
    #Artemis Configuration
    artemis.queue.name=ze_queue
    artemis.queue.host.broker.ip=localhost
    artemis.queue.host.broker.port=61616
    spring.artemis.mode=native
    
    # Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq
    spring.profiles.active={dbType},{queueType}
    spring.autoconfigure.exclude= org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration, org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration
    
    #context path property
    server.servlet.context-path=/webhook
    
    #ze_jira_webhook flags
    event.validator.json.file=classpath:webhook-events-validation.json
    ze.jira.webhook.event.validation_flag=false

Append the below database-specific properties based on the Zephyr database you are using.

# Data source configurations applied for mssql
---
---
spring.config.activate.on-profile=mssql
spring.datasource.url=jdbc:sqlserver://<database_ipaddress>:<database_port>;database=itcc;encrypt=true;trustServerCertificate=true
spring.datasource.username=<datbase_username>
spring.datasource.password=<database_password>
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
 
# Data source configurations applied for mysql
---
---
spring.config.activate.on-profile=mysql
spring.datasource.url=jdbc:mysql://<database_ipaddress>:<database_port>/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=<datbase_username>
spring.datasource.password=<database_password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
 
# Data source configurations applied for oracle
---
---
spring.config.activate.on-profile=oracle
spring.datasource.url=jdbc:oracle:thin:@<hostname>:<port>:orcl
spring.datasource.username=<datbase_username>
spring.datasource.password=<database_password>
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.jpa.properties.hibernate.default_schema=itcc
spring.jpa.hibernate.ddl-auto=none
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.OracleDialect 
 

An example of zeJiraWebhook.properties for MySQL DB would look like the below:

#Webhook Service port
server.port=8081

#context path property
server.servlet.context-path=/webhook

#Artemis Configuration
artemis.queue.name=ze_queue
artemis.queue.host.broker.ip=localhost
artemis.queue.host.broker.port=61616
spring.artemis.mode=native

# Activate Profile {dbType} = mysql/mssql/oracle, {queueType} = artemis/rabbitmq
spring.profiles.active=mysql,artemis
spring.autoconfigure.exclude= org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration, org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration

# ze_jira_webhook flags
event.validator.json.file=classpath:webhook-events-validation.json
ze.jira.webhook.event.validation_flag=false

# Data source configurations applied for mysql
---
spring.config.activate.on-profile=mysql
spring.datasource.url=jdbc:mysql://<database_ipaddress>:<database_port>/itcc?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=<datbase_username>
spring.datasource.password=<database_password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
  • Open the “Terminal” or “Command Prompt”

  • Navigate to folder /opt/zephyrservice

  • Type the below command

Start the ze-jira-webhook with the following command:

sudo nohup java -jar -Dspring.profiles.active=DB,queue_name -DzeWebhookConfigPath="<config file path till root folder>" ze-jira-webhook.jar &

Example command:

sudo nohup java -jar -Dspring.profiles.active=mysql,artemis -DzeWebhookConfigPath="/opt/zephyrservice" ze-jira-webhook.jar &

The Logs folder will be created where your jars are deployed. Separate log files will be created for each jar. In the above example, it will be in /opt/zephyrservice.

Was this page helpful?