LIGHT

  • News
  • Docs
  • Community
  • Reddit
  • GitHub

Set up develop branch build and test locally

In this tutorial, we are going to setup the develop branch build and test for networknt GitHub organization on github.com on my MacBook Pro laptop. The configuration is designed for networknt projects and light-examples-4j demo applications; however, it is straightforward enough to customize the develop-build.yml to make it for your Java modules and microservices. If you want to learn how to use it with your microservices, please refer to microservices develop

Preparation

To build all projects we need to have the following installed on your local.

  • Java JDK 11 - JDK to compile Java source code
  • Maven 3.5.X - light-4j frameworks are built with Maven
  • Git - Clone source code from github.com
  • Docker - Running some of the dependencies for end-to-end testing

To perform integration test and end-to-end test, we need to have the following Docker containers up and running.

  • Kafka 1.0.0 - used by light-eventuate-4j, light-tram-4j and light-saga-4j
  • Zookeeper - used by Kafka
  • Mysql - used by light-eventuate-4j, light-tram-4j, light-saga-4j and some examples
  • Redis - used by light-session-4j for distributed session
  • cdcserver - for light-tram-4j and examples
  • cdcserver - for light-eventuate-4j and examples

It is straightforward to start all services with a docker-compose in the light-docker repo. However, we need to setup DOCKER_HOST_IP environment variable on a MacBook Pro or a Linux Desktop first by following this tutorial

Let’s assume we have a workspace called networknt under your user home directory. And we are in the same terminal that has set up the DOCKER_HOST_IP export.

cd ~/networknt
git clone https://github.com/networknt/light-docker.git
cd light-docker
docker-compose -f docker-compose-integration-test.yml up -d

Depending on how fast your computer is and if you have all the docker images cached locally, it might take about 30 seconds to 5 minutes to get everything started.

Clone and build light-bot

Now we can clone and build light-bot repository based on the build light-bot tutorial.

Run the develop branch build with default config

cd ~/networknt/light-bot/bot-cli/build/libs
java -jar bot-cli-fat-1.0.jar -t develop-build

If the build failed, you can check bot.log in the same directory as default email server is not set up with a correct password, there would be no email will be sent out if build or test is failed.

Run the develop branch build with customized config

** Note that customized config contains tokenization service which is located in a private git server and it is not open source. If you don’t have access and still want try it out, please comment tokenization from each step in the develop-build.yml file. **

cd ~/networknt
git clone https://github.com/networknt/light-config-test.git
cd light-config-test/light-bot/develop-build/build-test-all
./run.sh
  • About Light
    • Overview
    • Testimonials
    • What is Light
    • Features
    • Principles
    • Benefits
    • Roadmap
    • Community
    • Articles
    • Videos
    • License
    • Why Light Platform
  • Getting Started
    • Get Started Overview
    • Environment
    • Light Codegen Tool
    • Light Rest 4j
    • Light Tram 4j
    • Light Graphql 4j
    • Light Hybrid 4j
    • Light Eventuate 4j
    • Light Oauth2
    • Light Portal Service
    • Light Proxy Server
    • Light Router Server
    • Light Config Server
    • Light Saga 4j
    • Light Session 4j
    • Webserver
    • Websocket
    • Spring Boot Servlet
  • Architecture
    • Architecture Overview
    • API Category
    • API Gateway
    • Architecture Patterns
    • CQRS
    • Eco System
    • Event Sourcing
    • Fail Fast vs Fail Slow
    • Integration Patterns
    • JavaEE declining
    • Key Distribution
    • Microservices Architecture
    • Microservices Monitoring
    • Microservices Security
    • Microservices Traceability
    • Modular Monolith
    • Platform Ecosystem
    • Plugin Architecture
    • Scalability and Performance
    • Serverless
    • Service Collaboration
    • Service Mesh
    • SOA
    • Spring is bloated
    • Stages of API Adoption
    • Transaction Management
    • Microservices Cross-cutting Concerns Options
    • Service Mesh Plus
    • Service Discovery
  • Design
    • Design Overview
    • Design First vs Code First
    • Desgin Pattern
    • Service Evolution
    • Consumer Contract and Consumer Driven Contract
    • Handling Partial Failure
    • Idempotency
    • Server Life Cycle
    • Environment Segregation
    • Database
    • Decomposition Patterns
    • Http2
    • Test Driven
    • Multi-Tenancy
    • Why check token expiration
    • WebServices to Microservices
  • Cross-Cutting Concerns
    • Concerns Overview
  • API Styles
    • Light-4j for absolute performance
    • Style Overview
    • Distributed session on IMDG
    • Hybrid Serverless Modularized Monolithic
    • Kafka - Event Sourcing and CQRS
    • REST - Representational state transfer
    • Web Server with Light
    • Websocket with Light
    • Spring Boot Integration
    • Single Page Application
    • GraphQL - A query language for your API
    • Light IBM MQ
    • Light AWS Lambda
    • Chaos Monkey
  • Infrastructure Services
    • Service Overview
    • Light Proxy
    • Light Mesh
    • Light Router
    • Light Portal
    • Messaging Infrastructure
    • Centralized Logging
    • COVID-19
    • Light OAuth2
    • Metrics and Alerts
    • Config Server
    • Tokenization
    • Light Controller
  • Tool Chain
    • Tool Chain Overview
  • Utility Library
  • Service Consumer
    • Service Consumer
  • Development
    • Development Overview
  • Deployment
    • Deployment Overview
    • Frontend Backend
    • Linux Service
    • Windows Service
    • Install Eventuate on Windows
    • Secure API
    • Client vs light-router
    • Memory Limit
    • Deploy to Kubernetes
  • Benchmark
    • Benchmark Overview
  • Tutorial
    • Tutorial Overview
  • Troubleshooting
    • Troubleshoot
  • FAQ
    • FAQ Overview
  • Milestones
  • Contribute
    • Contribute to Light
    • Development
    • Documentation
    • Example
    • Tutorial
“Set up develop branch build and test locally” was last updated: July 5, 2021: fixes #275 checked and corrected grammar/spelling for majority of pages (#276) (b3bbb7b)
Improve this page
  • News
  • Docs
  • Community
  • Reddit
  • GitHub
  • About Light
  • Getting Started
  • Architecture
  • Design
  • Cross-Cutting Concerns
  • API Styles
  • Infrastructure Services
  • Tool Chain
  • Utility Library
  • Service Consumer
  • Development
  • Deployment
  • Benchmark
  • Tutorial
  • Troubleshooting
  • FAQ
  • Milestones
  • Contribute