{"id":718,"date":"2017-11-30T09:35:11","date_gmt":"2017-11-30T09:35:11","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=718"},"modified":"2021-02-27T09:36:36","modified_gmt":"2021-02-27T09:36:36","slug":"build-and-release-projects-b1","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/","title":{"rendered":"Build And Release Projects &#8211; B1"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Build and Release Projects &#8211; B1<\/strong><br \/>\nProject1 (Shell Scripting)<br \/>\nWrite a script which can ask user to enter machinename\/hostname\/ipaddress and based on the entry do the following tasks.<br \/>\n1. Check if the machine name is valid or not, it its not valid, ask user to enter the machine name again. (Play with ping command)<br \/>\n2. if the machine name is valid, Print Name of the drives | total size | free size | used size ( Play with cut command)<br \/>\n3. Install jenkins and start the services<br \/>\n4. and send out an email to rajesh@scmgalaxy.com<\/p>\n<p>Project2 (Ant &amp; Git-Github)<br \/>\nWrite a Ant Script which will create a local repostory based on the user parameter passed(name of repos) and it should add numbers of files and commit.<br \/>\nthen it should set the required git config and push to the one particular git hub remote repos.<\/p>\n<p>Project3 (Maven)<br \/>\nWrite a 2 maven project and each one of these project will consist of three differnt projects<br \/>\n1. Java project<br \/>\n2. donet<br \/>\nNow write a master maven project and call above projects as a sub projects.<\/p>\n<p>Project4- Backup &amp; Restore<br \/>\nall the three projects should be live in 5 mins and I will destroyt these setup and you will restore it within 5 mins.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>sribhavani_u replied the topic: Build and Release Projects &#8211; B1<\/strong><br \/>\nproject1<br \/>\n======<br \/>\n<code>#!\/bin\/bash<br \/>\n#script to ask user to enter machinename\/hostname\/ipaddress and check if they are valid or not<br \/>\njen_start()<br \/>\n{<br \/>\nwget -O \/etc\/yum.repos.d\/jenkins.repo pkg.jenkins-ci.org\/redhat-stable\/jenkins.repo<br \/>\nrpm --import jenkins-ci.org\/redhat\/jenkins-ci.org.key<br \/>\nyum install jenkins<br \/>\njava -version 1&gt;\/dev\/null 2&gt;\/dev\/null<br \/>\ni=$?<br \/>\nif [ $i -ne 0 ]; then<br \/>\nyum install java<br \/>\nelse<br \/>\nservice jenkins restart<br \/>\nchkconfig jenkins on<br \/>\nfi<br \/>\n}<br \/>\nwhile :<br \/>\ndo<br \/>\necho \"Please enter host you would like to ping(machinename\/hostname\/ipaddress):\"<br \/>\nread PING<br \/>\ncount=$( ping -c 1 $PING | grep icmp* | wc -l)<br \/>\nif [ $count -eq 0 ]<br \/>\nthen<br \/>\necho \"Given Host is invalid.give the valid host\"<br \/>\nelse<br \/>\necho \"Given host is valid\"<br \/>\ndf -Pk | awk ' { printf \"%30s %12s %12s %12s \\n\", $6, $2, $4, $3 } '<br \/>\necho \"starting jenkins server\"<br \/>\njen_start<br \/>\nservice jenkins status<br \/>\ni=$?<br \/>\nif [ $i -eq 0 ]; then<br \/>\necho \"jenkinsis up and running\" | mail sribhavani_u@yahoo.com<br \/>\nfi<br \/>\nexit<br \/>\nfi<br \/>\ndone<\/code><\/p>\n<p><strong>sribhavani_u replied the topic: Build and Release Projects &#8211; B1<\/strong><br \/>\nPROJECT#3<br \/>\n=========<\/p>\n<p>parent pom<br \/>\n<code><br \/>\n4.0.0<br \/>\ncom.sri<br \/>\nmyproject3<br \/>\njar<br \/>\n1.0-SNAPSHOT<br \/>\nmyproject3<\/code><\/p>\n<p>SampleApplication<br \/>\nwebapp<\/p>\n<p>maven.apache.org<\/p>\n<p>junit<br \/>\njunit<br \/>\n3.8.1<br \/>\ntest<\/p>\n<p>&nbsp;<\/p>\n<p>SampleApplication<br \/>\n<code><\/code><\/p>\n<p>myproject3<br \/>\ncom.sri<br \/>\n1.0-SNAPSHOT<br \/>\n4.0.0<br \/>\ncom.sri<br \/>\nSampleApplication<br \/>\njar<br \/>\n1.0-SNAPSHOT<br \/>\nSampleApplication<br \/>\nmaven.apache.org<\/p>\n<p>junit<br \/>\njunit<br \/>\n3.8.1<br \/>\ntest<\/p>\n<p>webapp<br \/>\n<code><\/code><\/p>\n<p>myproject3<br \/>\ncom.sri<br \/>\n1.0-SNAPSHOT<br \/>\n4.0.0<br \/>\ncom.sri<br \/>\nwebapp<br \/>\nwar<br \/>\n1.0-SNAPSHOT<br \/>\nwebapp Maven Webapp<br \/>\nmaven.apache.org<\/p>\n<p>junit<br \/>\njunit<br \/>\n3.8.1<br \/>\ntest<\/p>\n<p>webapp<\/p>\n<p>&nbsp;<\/p>\n<p><strong>navneet07 replied the topic: Build and Release Projects &#8211; B1<\/strong><br \/>\n<code>echo \"please enter ipaddress:\"<br \/>\nread ipaddress<br \/>\nif ping -c 1 $ipaddress &amp;&gt; \/dev\/null<br \/>\nthen<br \/>\necho \"Ip address is valid and Below is the filesystem of this machine $ipaddress \"<br \/>\ndf -h|cut -c1-43<br \/>\nelse<br \/>\necho \"Ip address is invalid,please enter the ip again:\"<br \/>\nread ipaddress<br \/>\necho \"New IP\" $ipaddress<br \/>\nfi<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Build and Release Projects &#8211; B1 Project1 (Shell Scripting) Write a script which can ask user [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[49],"tags":[146],"class_list":["post-718","post","type-post","status-publish","format-standard","hentry","category-general","tag-build-and-release"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Build And Release Projects - B1 - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build And Release Projects - B1 - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"rajeshkumar created the topic: Build and Release Projects &#8211; B1 Project1 (Shell Scripting) Write a script which can ask user [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-30T09:35:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:36:36+00:00\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Build And Release Projects &#8211; B1\",\"datePublished\":\"2017-11-30T09:35:11+00:00\",\"dateModified\":\"2021-02-27T09:36:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/\"},\"wordCount\":304,\"commentCount\":1,\"keywords\":[\"Build and Release\"],\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/\",\"name\":\"Build And Release Projects - B1 - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2017-11-30T09:35:11+00:00\",\"dateModified\":\"2021-02-27T09:36:36+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/build-and-release-projects-b1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build And Release Projects &#8211; B1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Build And Release Projects - B1 - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/","og_locale":"en_US","og_type":"article","og_title":"Build And Release Projects - B1 - scmGalaxy","og_description":"rajeshkumar created the topic: Build and Release Projects &#8211; B1 Project1 (Shell Scripting) Write a script which can ask user [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/","og_site_name":"scmGalaxy","article_published_time":"2017-11-30T09:35:11+00:00","article_modified_time":"2021-02-27T09:36:36+00:00","author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Build And Release Projects &#8211; B1","datePublished":"2017-11-30T09:35:11+00:00","dateModified":"2021-02-27T09:36:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/"},"wordCount":304,"commentCount":1,"keywords":["Build and Release"],"articleSection":["General"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/","name":"Build And Release Projects - B1 - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2017-11-30T09:35:11+00:00","dateModified":"2021-02-27T09:36:36+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/build-and-release-projects-b1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Build And Release Projects &#8211; B1"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":5,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"predecessor-version":[{"id":759,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/718\/revisions\/759"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}