🕓 10 minutes
What you’ll learn
How to build the application component in the CodeNOW environment.
CodeNow offers you two options for component building: release and preview.
Release build has its own version and no steps are skipped during the build process.
- If your code contains any major errors, the build will fail.
- You can check the quality of your code using the SonarQube static analysis after the component is built.
- Also, you need to create a new package and configuration file for each release build before deployment.
The main intention of the preview build is to quickly check whether the new changes work properly inside the deployed application.
- This type of build doesn't have a version.
- During this build, unit tests and the sonar qube analysis are disabled.
- Preview build is automatically deployed into the chosen environment using the pre-existing configurations.
- Build a new component version
- An application release must contain only released components because it makes clear which fixed bugs and newly developed features are contained in a particular build.
- A released component:
- is tagged in git,
- has updated its pom.xml descriptors,
- is uploaded to the nexus artifact repository.
- During the build process, unit tests are enabled.
- Developers can check the build progress by clicking on the Build Detail link or in CI/CD Builds Overview.
- See the result of code quality check
- SonarQube is the most popular open-source tool for static code analysis and is integrated into CodeNOW. See more about SonarQube.
- Let’s use the default oxus-java profile for the quality check.
- A code quality check is a good first-line measure to evaluate overall code quality.
- Defining quality gateways help for first glance decisions on whether the code is release-ready.
- If the code quality is too low, improve your code and build a new component version (STEP 1)
- Repeat STEP 1 and STEP 2 for each improved application component.
- If you made some changes in one of the components and want to make a quick check before the release build, you can create a preview build.
- The major differences from the release build is that during the build process, the unit testing and SonarQube steps are skipped. If the application contains errors, it may happen that the preview build was successful, but the deployed application doesn't work properly.
The precondition for the preview build is to have your component once properly deployed using the release build option. Because the preview build is deployed automatically, it takes an existing configuration for the chosen environment.
Component build history
By clicking on the "Latest Builds" button, you will see the records of all previous builds.
- You can change the number of the displayed latest builds in the list in the component detail page by changing the "Max Size of Builds Queue" value.
You might be interested in our other tutorials: