CI/CD process


FOLIO-1405 - Getting issue details... STATUS

Simplified diagram of the process

SonarQube

  • There are quality gates which all modules should pass:



Jenkins

The whole process (build, test, release, and deployment process) is automated by Jenkins. Each change in GitHub will initiate the CI process(branch push, pull request). Maven artifacts and NPM packages are stored in Nexus repository. There is a collaboration between AWS, Nexus and Jenkins which allows CI system automatically build environments which is used for testing and demonstrating purposes. The are 4 commonly used (but there are a lot more) environments:

  • folio-testing - built from the latest master branch of the UI code. Job starts every hour. See Jenkins job.
  • folio-snapshot - built from frontend master branch and latest version of backend modules that meet the dependency requirements of the frontend. Job starts every day at about 03:00 UTC. Jenkins job.
  • folio-snapshot-stable - uses the alias of 'folio-snapshot' + integration and regression tests. Recommended for demos/acceptance testing.
  • folio-latest

Other automation jobs can be found in Automation' folder 

Notifications about the build status will come into #folio-ci Slack channel. 

Here is the view of Jenkins folders:





Jenkins links:

Docker

Docker images are based on Dockerfile which describes the procedure of how to build a runtime Docker image for the module. If this file exists in top-level Jenkins will create an image and place it to 'folioci' Docker hub. Release versions are stored in 'folioorg' Docker repository. Write access to the ‘folioci’ repositories is via Jenkins only.

Here is list of command which may be useful during the work:

  • /etc/folio/deployment-descriptors - stores Deployment descriptors 

  • /etc/folio/okapi-deploy.conf - okapi deploy configuration

  • /var/log/folio/okapi/okapi.log - full okapi log file

  • tail -f /var/log/folio/okapi/okapi.log  - show tail of okapi log file

  • 'docker logs <container_name/container_id>' - full log of concrete docker container

  • 'docker logs <container_name> --follow' - show tail of <docker_image> log

  • 'docker build -t <name> .' -  Create image using this directory's Dockerfile

  • 'docker run -t -i -p 8080:8080 <docker_image_name>' - run Docker image (port 8080 present here as example)

  • 'docker exec -it <container_name/container_id> /bin/bash' - run a process inside a container

  • 'docker pull <Docker_Hub_username>/<repo_name>:<tag>' - pull image from Docker Hub 



Vagrant

All Vagrant boxes are built by Jenkins night job. Folio has several pre-build Vagrant boxes to use which is stored in Vagrant Cloud.

  • folio/stable -- a full-stack FOLIO system with stable releases of front- and backend modules. 

  • folio/stable-backend -- a backend FOLIO system with stable releases of backend modules.

  • folio/snapshot -- a full-stack FOLIO system, built from the most recent working commits to frontend components and the matching releases of the backend modules.

  • folio/testing -- a full-stack FOLIO system, with the very latest releases of front- and backend modules.

  • folio/testing-backend -- a backend FOLIO system, with the very latest releases of backend modules. 

  • folio/minimal -- a minimal FOLIO system with just Okapi and no modules or sample data loaded.