AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
In our example below, we will show how to do it using an Angular project. I will teach you how to start a Docker Container with Sonarqube, and then you can focus on the analysis. You can download the project from my GitHub repository: git clone Sonarqube Javascript Exampleįor our example, to learn using sonarqube with javascript, we have prepared a Hello Word built using Angular framework to make it easier to explain and go through all the steps that we need to learn. This project on Github does almost everything automatically. Suppose you need more details to configure the Docker Container for Sonarqube and how to configure the sonarqube. Then, I recommend you to read our previous post, which has an outstanding level of detail about it. We will build our Angular project on this script. So, it means compile our Typescript and generate our Javascript code. ĭocker run -rm -name node -v $PROJECT/:/tmp/angular -t /angular:v1 npm installĭocker run -rm -name node -v $PROJECT/:/tmp/angular -t /angular:v1 npm run build Then, later, we can give it to the Sonarqube to analyze for us. The first step from the build.sh, we are building the Docker image that will contain the noje.js and npm. And we will use them to build the application, and that approach doesn’t need to install those applications on our computer. In the second and third steps from the script, we effectively build the application using the Docker Image constructed before. No tricks, we perform npm install to download all node modules required by this project, and then you call the ng build to compile our project, like all standard node projects. Note: This approach to using Docker to build the application is perfect for instantly testing a new version of node.js without worrying about packages conflicts on your computer.
0 Comments
Read More
Leave a Reply. |