{"id":880,"date":"2019-03-06T15:16:55","date_gmt":"2019-03-06T12:16:55","guid":{"rendered":"https:\/\/artem.services\/?p=835"},"modified":"2019-03-12T17:44:50","modified_gmt":"2019-03-12T14:44:50","slug":"jenkins-d0-bf-d1-80-d0-b8-d0-bc-d0-b5-d1-80-dsl-pipeline","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=880&lang=en","title":{"rendered":"Jenkins &#8212; Example DSL Pipeline"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-819\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo.png\" alt=\"\" width=\"1280\" height=\"412\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo.png 1280w, https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo-300x97.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo-768x247.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo-1024x330.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2019\/02\/Jenkins-Logo-954x307.png 954w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p><span class=\"tlid-translation translation\"><span title=\"\">Sample <strong>Pipeline<\/strong> configuration file for a <strong>DSL<\/strong> module.<\/span> <span title=\"\">This is a parameterized build.<\/span> <span class=\"\" title=\"\"><strong>Jenkinsfile<\/strong> is located at the root of the repository.<\/span><\/span><\/p>\n<pre class=\"brush: groovy; title: ; notranslate\" title=\"\">\r\npipelineJob('DSL_Pipeline') {\r\n    displayName('DSL Pipeline')\r\n    definition {\r\n        cpsScm {\r\n            scm {\r\n                git {\r\n                    branches('*\/dsl-test')\r\n                    remote {\r\n                        url ('git@github.com:artem\/devops.git')\r\n                        credentials ('artem-github')\r\n                    }\r\n                }\r\n                scriptPath ('Jenkinsfile')\r\n                lightweight (true)\r\n            }\r\n        }\r\n    }\r\n    parameters {\r\n        choiceParam('Environment', ['staging', 'production', 'staging-without-cache'], 'Please choice env to build')\r\n    }\r\n    triggers {\r\n        bitbucketPush()\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sample Pipeline configuration file for a DSL module. This is a parameterized build. Jenkinsfile is located at the root of the repository.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[613],"tags":[615,627,617,641],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/880"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=880"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":882,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/880\/revisions\/882"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}