Jenkins homework
- connect static slave node (TO DO)
- create declarative job (done)
- add parameter environment (done)
- trigger on push and pr (done with wbhook)
- skip build if commit message is "SKIP_CI" (done)
- create zip file with suffix $BRANCH_NAME (done)
- and store it like artifact and build_number (done)
- create shared library to send slack notification with build status (TO DO)
- in parallel ping 3 different servers and if ping failed - stop the job (done)
- move all logic to shared library (almost)
- ADDITIONAL: after building app, Jenkins should tag the current commit with build number (done)
- Create VMs with Jenkins in GCP
- Installed necessary plugins, plus GCE plugin
- Created a multibranch pipeline, added SCM with Jenkinsfile
- Configured GCE plugin to create worker instances based on an image with java installed (otherwise Jenkins didn't want to connect with the nodes)
- Added a when condition so "build" stage is skipped when commit message equals to "SKIP_CI"
- As a sample project to build, I used a HTML5 boilerplate, just npm project (i utilized my previous code - a project from external EPAM training course)
- Last stage - archiving artifacts built by npm in zip file
- Added github webhook
- Finally! jenkins builds website and adds zipped /dist/ folder to artifacts
- Moved all logic to library, only some steps left in Jenkinsfile.
- Added shared library to Jenkins in configuration.
- Added slack integration plugin, registered a workspace to test