Frontend react.js (fe-react)
React quickstarter project
What files / architecture is generated?
├── Jenkinsfile - This file contains Jenkins build configuration settings
├── LICENSE
├── README.md
├── docker - This folder contains Docker configuration settings
│ ├── Dockerfile
│ └── nginx.vh.default.conf.nginx
├── package.json - This file contains scripts to run and node packages dependencies for project
├── sonar-project.properties - This file contains SonarQube configuration settings
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
└── src
├── App.js
├── App.test.js
├── Router.js
├── common
│ └── components
│ └── PageNotFound.js
├── history.js
├── home
│ ├── components
│ │ └── Repo.js
│ ├── containers
│ │ └── UserRepos.js
│ ├── epics
│ │ ├── fetchUserRepos.js
│ │ └── index.js
│ ├── index.js
│ └── reducers
│ ├── applyUserRepos.duck.js
│ └── index.js
├── index.js
├── registerServiceWorker.js
├── rootEpic.js
├── rootReducer.js
├── store.js
└── theme.js
10 directories, 28 files
Usage - how do you start after you provisioned this quickstarter
As pre-requisite you’ll need to have installed:
Once you have you developer environment set up you can simply:
-
Clone your generated git repository and
cdto your folder -
Run command
npm installin project directory to install npm dependencies. -
Run
npm run startcommand to start the dev server, it will open your browser athttp://localhost:8080/
How this quickstarter is built thru Jenkins
The Jenkinsfile contains the configuration that customizes the core pipeline implemented by jenkins shared library.
When the code in your git repository is updated the Jenkinsfile comes into action with the following stages for this quickstarter:
-
Build - Installs the dependencies of your project with
npm install, generates the build by runningyarn build. Finally, it copies the output folderbuildintodocker/dist. -
Unit Test - Runs unit test cases by executing
yarn testcommand, if any test fails, the build is marked as failed. -
Lint - Profiler that ensures code best practices by running
npm run lintcommand, if linting is not passing, the build is marked as failed also.
Builder Slave used
This quickstarter uses Nodejs10-Angular builder slave Jenkins builder slave.