{"id":18065,"date":"2024-12-05T13:41:54","date_gmt":"2024-12-05T13:41:54","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=18065"},"modified":"2024-12-05T16:00:19","modified_gmt":"2024-12-05T16:00:19","slug":"pipelines-in-jenkins","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=18065","title":{"rendered":"Pipelines in Jenkins"},"content":{"rendered":"<p>For CI\/CD of your projects, you can use Jenkins. To set up a workflow, you can create a pipeline. They are written in Pipeline DSL based on Groovy syntax. The best practice is to keep the pipeline in a file in the repository and not as a script in Jenkins. The file containing the pipeline is called a Jenkinsfile.<\/p>\n<hr>\n<p><strong>Example<\/strong> (Declarative Pipeline)<\/p>\n<pre>\r\npipeline {\r\n    agent any\r\n\r\n    stages {\r\n        stage('Build') {\r\n            steps {\r\n                echo 'Building...'\r\n            }\r\n        }\r\n        stage('Test') {\r\n            steps {\r\n                echo 'Testing...'\r\n            }\r\n        }\r\n        stage('Deploy') {\r\n            steps {\r\n                echo 'Deploying...'\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>For CI\/CD of your projects, you can use Jenkins. To set up a workflow, you can create a pipeline. They<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[84],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18065"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18065"}],"version-history":[{"count":13,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18065\/revisions"}],"predecessor-version":[{"id":18078,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18065\/revisions\/18078"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18065"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}