@genesisx/jenkins-ci-cd v0.0.2
Genesis - jenkins Plugin
This plugin will add a Jenkinsfile template to the root of your project that can serve as a starting point for a CI/CD pipeline. It comprises of followig stages
- Checkout
- Prepare
- Lint
- UnitTest
- Build
- Docker
- Deployment
Usage
nx g @genesisx/jenkins:template
Build Stages
Checkout
This stage setup git modules and checkout code merge is possible for feature & master branch
Prepare
This stage setup the base modules needed by respective projects for subsequent stages.
Lint & UnitTest
These Stages runs linting and unit test check against config made in the projects.eg files: jest.config.js, .eslintrc.json
Build & Docker
These stages build the apps and create docker images for affected applications and publish those images to artefactory store. '''here PS docker registry been used'''
Deployment
This stage leverage the k8 config in each apps to deploy app to infra configured in those files. i.e: ingress,service, deployment yaml.
Note
By leveraging nx framework we are able to make pipeline optimised in easier way to run affected apps. eg: '''yarn nx affected:apps --all'''
Contributing
Run nx run jenkins:build
to build the package.
Run nx test jenkins
to execute the unit tests via Jest.
Run npm publish dist/packages/jenkins --access public
2 years ago