Nowadays, Developers should know a little bit about DevOps is expected so if you nothing about Jenkinsfile not to worry, let's start from here. Old Jenkins jobs are usually freestyle jobs where we have to use all the build steps one by one choosing from the "build step" section which does not provide a lot of flexibility in the build process. For more details, Kindy visit - https://www.jenkins.io/doc/book/pipeline/jenkinsfile/
Jenkins overcome that drawback by introducing Jenkinsfile (or called Pipeline) is a script kind of build steps that we can customize as per our requirement. Jenkinsfile is very easy to get especially Declarative Pipeline. If you have to design a Jenkinsfile for your project, don't start from scratch, Pick any existing Jenkinsfile, and alter it by adding your build steps. You can use the below sample -
As you can see in the above file, there are a few stages defined which are nothing but steps to build your code and deploy it via IBM UCD in the last 2 stages. Jenkins support so many stages and operations which we will go through one by one in the next few post. Till then... Happy Learning !!
No comments:
Post a Comment