0% found this document useful (0 votes)
5 views40 pages

DevOps Programs

The document provides an introduction to Maven and Gradle, two build automation tools used primarily for Java projects. It outlines their features, installation processes, and how to create and manage projects using these tools, including setting up environment variables and writing build scripts. Additionally, it includes examples of creating and testing Java applications with both Maven and Gradle.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views40 pages

DevOps Programs

The document provides an introduction to Maven and Gradle, two build automation tools used primarily for Java projects. It outlines their features, installation processes, and how to create and manage projects using these tools, including setting up environment variables and writing build scripts. Additionally, it includes examples of creating and testing Java applications with both Maven and Gradle.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
ow a D ai je a 5 COLLEGE, NARGUN! © GOVERNMENT ENGINEERING CC a periment No. 0% 04 age No- —_— eae | Totroduction to Maven ¢ Graal _tools, Key Atfperence blw Maven Maven § qsadte, Ensial Latvo re | Build Automation tools netp developers 81 gtatamline t process of buildtng , testing , deploding software P = | They take care of, Repetitive tasks the Ube compili raanaging dependencies, and packagtng apr a corre | eoakes development more epbicient £ error time = jattation f What fs Maven? ; Maven ts a butld automation tools primarily cised fer Java Progsars Tr uses an XML Compiguration frle called [Link] to define pwojtct Settings , dependencies and butld steps | Main features: : Predefined project structure £ Upecycle pha ses Putomatec dependency management though maven cenbal | lairld range of Plugins for things Uke testing and Aoployentat Supports complet projects cotlh multiple modules What ts Goadte 7 Gradte fs a more modern rourhple programming languages leer Tt uses a domain - spect pf pversatile foufld tool that suppoats , Including Java, Goovy ¢ c languagel pst) 6°" build scripts goritlen fn Groovy 4 Kotlfo. eS fo How to install Maven: Download Maven: |Go to MavenDowntoadPage ¢ doconload the latest binary Extract the z27P file: Right cleck the downloaded 2rP file and select extrock att | Maven the folder: | Btter extraction move alt files to a Convenient directory | Uke c:\Program Fites\, Navigate to bin folders | Open maven folder, then Davigale to bin folder ‘inside and copy the pate Set Environment variable: Open Crviromment variable § edit the system envisonment vanabl Click Environmental variable Under System variables; Find the path double click on tt and CIECE Hew Paste full path to bin folder of you Maven divectory. Save changes: Click ok to close windows $ save your changes GECN Zs ———® GOVERNMENT ENGINEERING COLLEGE, NARGUND- @———______~ seriment NO, Dete of the Experiment e Page No.) [verify Tnstattation: Ope command prompt fi runs mvn -v Ff moveo conrectty ‘installed , rt wttl déspiay version How to Yostall Gsadte Download: visit the Gradte Download page § download the Latest bioary 2IP Pile Extract 27? file: Right cleck the downloaded 2iP tile f Select Extvact abt Maven the folders After Gretrachon, move extvacted Gzsadte folder to adtrectory lke C:\Program Fies\ Navigate to bin folders Open Gradle folder, theo mavigate to bin folder tnside. ‘Set Environment vanable : Ope Enyiropment variables £ edft system enurronment varial Under system vatiables ; - ind path, double cltck on Tt ¢ cleck new - Paste fall path to bin Polder of your qradle dertctory og — Save ‘the changes: CLECK Ok to close ine werndows and Save changes. Venfy the Installation Oped tesminal os cmd and ran: grade -V , it shows G the gradte version, the setup Es complete J ‘© GOVERNMENT ENGINEERING COLLEGE, NARGUND <@———— Date Page No. 12. | loskiing ootth Maven: Creating a Maven Praject, understanding Por file, Depe dency Management anc Plugtins Creating a Maven Project : There are few ways to create @ Maven project , Such as using Coromand Line , Toes Leke Enielted LoeA ov Eclepse, os generating ft wa an archetype | qaoupra unique fdeotifier for the croup. artifactrd: f unique name for the project artifact archetype: The template foe want tO use por the project DintevacttveMode Epalse: Disables pvornpls durfing project generation ing IDEs : Go to File 7 New Paoject fi. Choose Maven fron Lest of project types in. Provide Qrouprd and avttfactTd for yous praject inlowking with Maven Psoject : Open Command prompt ro kder programa - +nis wotil create pee folder ca program? - Navigate prograr2 folder After then follow below Step to working ustth Maven project GOVERNMENT ENGINEERING COLLEGE, NARGUND @———_ =a nt No. Date Page No. 13 3: Crating a Maven project TG af Open the Pom. amv file | pom. xme 22m version ="1.0" encoding = "OTF 8" 9> fi com example < (qsoupTdr Kastifacttely myapp AVEWSION 7 1.0- SNAPSHOT ie Zdependencyy er ie iy 4 grouptd 7 juntk < Lgrouptd y __ <|dependencies> < plugin > 4grouprd 7 org. apache. [Link] Maven -surepire- plugin __ Sredivect Test OutputTo Files 7 False <| redtsect Tesi OutputFiles> Kuseasystemout 7 teue < useSysternout> < | configuration 7 4 [plugéo > Zl plugins> _ 4 lbuitdy 2 Gependencies { implementation (fottin Cstatib')) tesi Implementation (_"'Juort «junit + 4-18 pu) 3 application { [Link]( “com. example. mainkt") i } | | [ tasks. test { useJuett GECN ———~® GOVERNMENT ENGINEERING COLLEGE, NARGUND- ¢———— pment NO Date feo the Experiment Page No. 21 testlogging f events ("passed") “farted”, "skepped) exception Format = org gradte apr. tasks. testing, Logging « Test Exceptionformal . Full ShovwSta | ~ hdavastveams = true 3 | 3 java { toolchain 4 Outputs LpToDatethen 4 parse? language Version Set ( Tavatangangevession of ( 19) Step 3: Mato. kt After creating prgject change file nome £ change file name. Prpp java to Main. kL package com .eaeample; fun addalumbess (nur: Double, num 2+ Double) + Double y return HUMI4 HUM? 3 fan main © { val numl= 10.0) val num2 +5,05 Val result = add Numbers (nums, num?); 4} prinilo("The sum Of fru F $num? iS: $result); _) 7. poriment No Date me of the Experiment cimearee agen 2. Step 4: Maiotest kt ( Junit Test) Maintest. kt Package com. example; frppost org. junit . Assest. * impor! org junit. Test Page No. 22 , E Arpler creating project Change file name [Link] to _ | ——~® GOVERNMENT ENGINEERING COLLEGE, NARGUND - €——— Class Maintest { _ @test fun tesiAddNumbess (> { val num4= lo.03 val num2= 5 oF Vat reSutt = add Numbers (mums, num 2), assent Equals ("The Sum dh Fnums § $num2 Should be 15.0" §.0, result, ooo) | Step 5+ Rup Gvaclte Commands To butld the project > gaadte butid To run the project 2 Qradle wan To test the project Ez grodle test GECN ww —® GOVERNMENT ENGINEERING COLLEGE, NARGUND. © periment NO.O4 ta ne Experiment eenuee J Practtcal Exewise: Burd ¢ Run a Java applecation cotth Maver ate the same application to Geadte Step 4: Geate main Project Step2 = Open the [Link] pete |< 2am version = "1-0" encoding = "DT 8) 2 & project xmins =xer"bitps:|{roaven .apache- org | Porn| 4-0-8 oo pumlins ; xst =" pip +)/ www. 3-019 = ) xsauschema fostance" Sf :schematocaton = "http :[Link]. e019] por) | 40.0 bttp:!/ Maven. apache. 02g | asd] maven -4-0.0xsch> < qroupId2 org example 4] gioupTa7 cartifactIa> maven -example < |avttpactrd> Z\erSion? |.0 -SNAPSHOT <| version > ms properties > émaven Babee. Souscey 19 (maven .compher, Sourcey| A dependencies? £qroupTd » junit < Iqroupid > Zarhactrd yunit 4 )athipctrdy Luewsion? 4:13.2< | version? éScppe? best <] scope? GECN ataepnaengs Claspendencet> __ Tai gnipTaTOG coma aOR. mar Big TgOTED we ~eourcer 5 EOUCED eager 1-21 fame | Areonbqurateny | Alphiging ipa y zibuad elonegeh? Compontng Outs > Marto Oumar ae, maven “This is she sinple alonad examele Game, 6 1015 Slep3; Open Java tote file(hyp. jevo) package corn. exavnaie; pane class ppt pubic sinite vod oato( sting 89 args) { — guadle output: feifrem, Syke. oxt-protin(“Helia Maren"): Spier out potchin("Thtss the spe yealowd exer This is the Simple a Sum Of 5 410i is ina: em b= 10) Syste. out prioftn( sum oh" 4a4 ‘and 4b5%4 sunfe) ECR ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND.) €——~ Date Page No. 25 Public state inl sum Cini x, mtyyf retam x+y 5 Step4: Run the pegect using below commands: 2_mvn Clean install > mvn fest exec java, Steps: Bufid qsadte pugins £ a I id ‘java! 3 group ='com example’ “ial i Versio =" 1-0 - SNAPSHOT! repositones f mavencentrat (> 4 dependences f | test Implementation (jwort a juotts 4-12! | 3 task oun (type + Java Exec) main <'com- example. App” Chass path ~ Sourcesel. main yuotine clas path Step 6: Run gracte pagyect ; To butld the project 2 Qrodle FHA buzid Toran the application y qmadle TUN gy GECN a ——@ GOVERNMENT ENGINEERING COLLEGE, NARGUND. griment [Link] por Date os Exponent ragono 26) Ttroduction to Jenkins What fs Jenkins 2 Installing Jeoxsr _om Local oy Cloud Environment, configuring Jenkins for __ first use Tntroduction to Jenkins ilhat fs Jenkins 9 Jenkins ts an Open-source automation Server widely used | ip the field of Contmuous Tntegratron Cet) $ Continuous Delive ry (C9), TH allows deuetopess to automale the butloting , testing § deployement of sopteare projects, maktng the Clevelopment process more epficcent f Pelsable i Key features Of Jenkins s | CT ICD : Jenkins Supposts comtwuous totegration and Continue Deployment allowing developers ‘To deployment of application Plugins: Jenkins has a wastl Ltbrary ©} plugins that can extends fis copabtlthes . These plugins foteqrate Jenks wrth versie Control system (cick att), burld tools (lye Maven or Gradte), Lesiing frammewoosk , deployment tools and much more Pipettne as code: Jonks altows the cranon of pipeline D using Groovy based Pst Scnpls or YAML files | yepecta ble enabling versio ~ controlled 4 pipelines. GECN rperiet eof nt No. e ate the Experiment Page No.2 _—_— GOVERNMENT ENGINEERING COLLEGE, NARGUND | €——— Cross platform: Jenkins cary wn on varsous piatfor res Such as Lhindows , Linux , MacOs § othess Tnstatling Jenktns Locally Step- by- Step Guid Culindows): Poeregursites : Ensure that JavaCav¥) fs imstalled , om your system | Jenkins sequtres Javars, th net Java (+ Youcan check Pf gorra es finstalted by aUOrog | java-version fn the teonfnal Trstall Jenkins om Windows Systeno Download Jenkins windows tostaller fron the oppictal Jenktns website Ran the tnsialler and follow the 6-surep insiwuctions while fostalting Choose Login System ver then use default post o% you can CoMpguse gour | Bf Se 3 gene | own post (tke Tim using port 8030 theo click om test and meat Pfter then change the directoxy and Choose java jae 2s path Look tke C+) Poogiano Files Tawa\ yolk = 2) After then chang cltck Derk And then tt user Ask peenoisss Chick op Yos and ft wsfil stort Postaltieg After successfaity installed, Fen Ling ouell bE TUNDING O= Port ePther dopautt pozt or chooser post tke T choose + fp your browser at ZOsD aut ww can access 7 Pe pees eae SEH EE rient NC zz | Te wert ask admmrshatos F password sp you ee |) |e enowlgoxs the above highlighted path | = | TwihalAdmin Passes sguoord | Ym _motepad or eae | |_*0 see # password x| | Just copy +he password and paste +t “and cir genre ns Se ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND§ €——— Pn Date ne Experiment page NonD at http: }] Localbost + 2080) or bttp:}| Local F 1p fp brows After Opening P byounser by wisthing yous lca adden 4 the _ browser Should wre b below scr Screenshot h and open that Soptenane k on x| | Tt writ ask tO customize «| | After + +hen cree continue ‘all enkings , So cbtk OD Postale ab sequined Plugin. aw a 2 adroin profile | by, fit +hen soe e and fortsh | ig aus detest] _ click om save and © ones ones after ther Click oY Stost sing | Tenkings. porrnent No. O8 en me of the Experiment ragsnerod GOVERNMENT ENGINEERING COLLEGE, NARGUND§ @———_— Continuoes Thtegration aitth Jenkins + setting wpa pipeline , Thtegsating FJenrys wefth maven| Gsadlte, Running Automated Bufids and Tests How fs Jenkins used for Comhnuous Tniey Continuous Tnieqsatwo (cr) vs a software deelopment | practice cusbere developers totegsate code into a shaved. hen? Tepository frequently, usually Severat times dou Jenkins is a Open-source automation server that fccelt tater CE by automating the burld , resting and deple rent | processes watth Jenkins , deuelopeas can eastly detect and fix Tmteqration Fssues early improving colloboratims £ accelarating softeoare celévery CT Features to Jenkins: | CL fovolees the automatec butlding and testing of code usheneves Changes que commfttted to the werstom Comrrol system> Jenkins provides Several Peatures that factlitatect| s version cooteol Systero ORT) | » Putoroated testing + Pugins and exttensibtltty ° Noti fications and repos pag « Butld automations « Pipebhe as code Distributed builds e Access Contsol GECN eo! ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND ©————— Date | = Beneftts and Prawable of, ustog Jenkins fox CT + ¢ Shorter evelopment cyches + Past code fmtegsaten « Shost feedback loops + Rutomated workflow Step 4: Now coming to ows projratn to sed cx ptpetine for Maven, Go to Jenkins Dashboard ¢ Click on Manage Tenki 5 Step 2: Suect plugins Step 3: Search fos Maven Tnteqpaton Plugin fo Auvaklable J plugtns and Total | stepa: After Maven Tniegration plugin fs installed we abled see Mauen Project or Nao fem grep 5: YET mot completed we hove th configure the Loca thon! to property Build and Run Maven Pagject So agatn chick om Manage Jenvins and setect Jools Step 6: Now lets not select Maven Project as new Trem as we Clready have maven project FO Local Systero ets See how we can ran the Maven project worth Pom. XML GECN ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND - €—— Date Page No. 2 Circk om nud flem Provide flem name ¢ select Forestyle psoject |_Scwotl down to ' Bufid’ ophow . click om ‘Add Burid siep’ | and choose the value 'Tnvoke top- level maven pegect | taxgels’ Prom the dsop dousn Lest Hfter Selecting Invoke top-level maven target opbon fox |_Propes environment version as in set fn previous steps {19 my case Pts MAVEN. ROME Enter Goal As —> Clean instatl | Before You save and apply fest below Goat - cheve Bs fiduance option add porn xm! path Go te pom zerok o} poe pactiadar pgm ond tare path io sry case fts_C2\users) Desktop\ 18149 | Pam [Link] After all steps bs over cece on Butld Button the output be as in belows Te See efther click on butld teats and go to console output Of YOU can go to dashboasd and ophon to see butid Steps ___—@ GOVERNMENT ENGINEERING COLLEGE, NARGUND © No. OF of tne Experiment Page No. 82 SET |_ Toventory + playbooks _and modules , |_ configuration cwutth playbeoks , Hands-on; Wnting and [ running a Baste playbook. How fo T Fostall Ansibis On obuntuy anagement aveth Ansible + Basics Of AE ible PHutomaring Server Ase lalindows: Subsystem for ltruxCwis i | Uthat ts Wt Le a list allows you to Aun a fall Linex tesminal tusindows wtthout avn. T's leght coveght aod works _| | pepectty for Ansible “teéts labs a Steps to Setup wist ¢ Ansible : a Install Uist (uriodows subsystem for linux) oped Step 3: run the below Command, powershetl as Administrator > wst--instan Vbunta wilt automatically enable WSt and re boot Your system | This Step 2: Open Ubuntu (ust) Pier installation and reboot, cearch for “bunt” jo the Stas menu and open tt: Tt wsttl prompt you to set a Linux usemame and passcoord Step a: Use following Command to assign Super privileges to the accownr _5 sudo usermod - aq (username) ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND) @—————> Dato sme of the Experiment Page No. 23 Enter the bela command using the ansible contro! nade Command tine zssh - keygen A Ttasks to provide a passphease ; press enter te allow to Sic’p | _posspbrase creation Phe Me ti ‘a _ ‘The system geneates publec| prtvate kay pais and prints the randor ast ‘image Step 4: Enter the Command prompt Copy the remote address ( host address) Use the potlowfng ssh-copy-td command on conteol ode |__to copy the Public key to host: rssh -copy~td [username @ Lremote_host) Step 5: Install fnsible Ensure package index ts up 10 date @ 2Sudo apt update Install Ansible on Obuntu ww*th following command 7sudo apt Fnstall ansible -4 Verity the installation pansible --version This will desplays an outpat as the Ansible version number, the Location 0} configuration filo, ye path to eteoute and other tp formation GECN UND @— Date ——e GOVERNMENT ENGINEERING COLLEGE, NARGI Set up inventory fale subderectosy io te direc Step 6 Create onscble_ > sudo mrdir —ptete|ansible Use text edrtor guch as New 7 sudo nano ete] ansible) hosts Then ada J tocolhost t hat COmtsol Node Manage. u __ format + Uk locat) twcalhost ansible - commectia 0 |_ Then use the G command | zansiole - feventory test Test | ihe ¢ “connection step: > sudo ansible all =e ping e text “editor such a as lane t | use nano ir install - anginw get Theo corite the below command ‘wo GNUt _ name + Enstall and start HGINY OO Locathost osls + Local become s Yes Tasks: Page No. Setup adenklos CT pepetine for a maven project , use Ansibte to desptay prtipacts generated by Jenkins Create a sinple maven “Heltousosid” project e Step2: Create a Jenkins Job Goto Jenkins Dashboard ~click nao | Trend — Freestyle Project Enter Job Name: Hello world emaven } butla Select Gf aS Source code managemea) Repository or puch your Maven project to at t hub. and use that tink Step2: Confrgure bufid + Under Build. ada + 2 mun clean package . Under post -butld Actions , Select + , Achieve the artipactra t target | hellocoowel - LO- SNAPSHOT efor Save and bufid toe praject | step 4; Uratean posible playbook for clependerloyment ceate | devectory for playbook: ymkdir —p njansible ~deploy >cd njansible —deploy 2nano deploy. yn © GOVERNMENT ENGINEERING COLLEGE, NARGUND @— Date Page No. 34 Add" following Ansible playbook name: Deploy Hello wosid App hosts + local tasks: = Pome: copy He son gue to ceplayment ceveetory cops # sr vor] ub] jenkins | worrspa | Hetlowovtd — Maver Build| tonger) hell ooovid - 1 © - SHMPSHOT jar dest + |opt | myapp] helloworid jar mode: '0395' name : Restast the applécation shell " hobup java ~farlopt| myapp] hettowovid jar! opr |myapp Lapp- toga 7 $2 §" Step S: Tntegsate Ansrble wth Senxins Open Jenkéns Dashboard — select Helloewoald ~maven= bufld fob Go to comfpguration— post - barid Actions Click "Trvoke’ ANsible playboot " | @ Playbeok path i|home) user] ansible -Ceploy! chploy .yrn, + Tnventory File + Jere] ansible! hosts Save and trigger the butid ——@ GOVERNMENT ENGINEERING COLLEGE, NARGUND periment No. OF Date {the Experiment peels Overwied of Azure DevOps Services, setting up an Azure DevOps Account and Pract Azure devops ts a Cloud - based platfasm by mtuosopt that SUSE ena pt thot | providesan end-to-end Deuops toolebatn fox deteloping Software. Ti Supports agile planning vessioo cworol cr] pep anc Hesitg Sewtce Descriphon Azure Devops ource code management estih Git oF. 7 Supposts branding ¢ pull requests Haure pepelines atomate cr] (0 +to bburid 4st abd Aeploy cde across platfosnes: [ azure Boards pgile plansing wiih wosk, etems acktogs Kanban boards £ sprints f2ure Tesiplans ~ Paquat and explanatosy testing with traceabslety ond default tracking Proure Artifacts Host and shares reusable packages (Nuelet , Yppns, maven) wet versionfng suppost: | Key featenes: Cloud - hosted and Scaleble Secuwe with Role Based Access Comtzoi (RBAO) Supposts Agite Serum dud Kanban wosk flows ——® GOVERNMENT ENGINEERING COLLEGE, NARGUND © Experiment Integrates with Github , ¥Scode , Stack Tenkins backer , Fubesnes etc Cross platforms and closs language report Supposts Benefets: End-to-end Devops Lefecycle managenent futomation of builds, test and deployment vesthittty fnto pegject Status and Peyormance ais Contmattzed managemen of Cede, builds and avi pacte Step 4: Vestt bttps: || azuve. Motcrosopt com) Ly -fo) Sewtces] Geuops| and Cléck Get Stasted ustth azure to titrate she Setup of qpoun Aztve Dewops Aecound- Stepa: Atter Logging fh , Search for azure deuops fo toP Search bar cind Select “Azure Dtuops avgantzations from the Lest Step 3: ON the Azure DevOps page ; cléck “my Azuve Devos organizations” at botton }Left to views O¥ Create York DewOps oxqant zahows | step a= Dfter_cécking "My Azure DewOps osganratons * you catll See Your organization details , here you Check "create nwo Organization" to stast crating a Dewuops oigeni20i OVS GECN ———® GOVERNMENT ENGINEERING COLLEGE, NARGUND. seriment No ate of he Experiment PageNo. 40 = Step Click "Centinue" to accept the Lesnes aud proceed usttn Creating MUO AzuUx Darops oxgaci Steps: Esles your desiud aigantzations name seteci the aegion _ bill the Captcha and Ueck "Contmue’ to create Your Azure DeOPs oxgantzarions Step 3: Enter gour peayect mame, opthonal descoption Choose vesibility and cleck "create jet’ to Scrap your fist Azure PwOps proyect yi ___——® GOVERNMENT ENGINEERING COLLEGE, NARGUND. €———— oriment No. 10 Date 1p of the Experiment Page No. 41 Butiding a Maven (Gradle project with Azure pipel invegra ting cede reposttomes (eg, Github Aeare Repos) Runmig antl | test and generating reports _ Gtep 1+ Peter logging Trio Azure Devops, cleck your ongante | ~ation name (top lett) ge to organization settings | Tn the overvies Section, verify the name (4+ krtsh| magouda 0948) Seqion (eg: Centsal Todéa) and set _| time zone Cf aeedect my Step2: Navigate to osganizahon settings 7 policres Ensure | thats public projects are allowed Ctumon) > SoH fluthentication o ON. Tovite GitHub USS Can eamain OFF Step a: From your Azure DevOps hornepage , create o New pooject Ceq: dim 01) This bs uchere yous Pipeline aud ened Services qasetl reside Step 4! nse the project , qo to pipelines, and click create pipeline to start cr{co seup asggard. Step 5: Connect to yout GtiHub Repost Lory 1 urben poorpled for your code source » Select Gittud you weil be ¢ + aedsrected +0 authenticate and allow [Link] GECN Experiment NO. ———® GOVERNMENT ENGINEERING COLLEGE, NARGUND e—_ —_ Date \ rage. 4 _| [Steps Choose your Reposite y 1 Select the repository you want te butld for eg + K guat (Frstpenye Step Approve Qttitab Totegration Approve ace - re pipeline 10 gous at Q@ftHub Fepositoay ysis se repostrones aud confyrm access on & | stepe* Select M e Template When pipmphed tp _ confrgure the prpeline, cheose maven to Gut -genu pipeline tumptate Suttable for butiding & € testing 1108 on prog | Stepa: Reureuo ond custonnge Varn» Raired the atte gonetated azuube— pr rpelthe yo Ensuze Ut umtains the Mauen@3 task ast op} propriate goals ‘ite clean Postatl Sepro: Check Save p Tun TO THGSE pipeline Azure Devops s is aopetsing to run yous pt doesn't have peornrssion To use microsoft —hested a gen! + By dopant new organsgat peline because + your orqangah os created pp ta oratio lr} pas) Pequesl acters to pete , Pagallel JOBS Solution : Request Face parallettsm it t. Go to thes microsopt farm + pips: I) aka. 05] a2 pipelines - parallelism request ai. Fl The vequeted details watt for approval Cusually quethin a pew hours to a GECN —_ Page No. 43 Deploying Applfeations +o Azene pp sewtees, managing ecruts and configuration cmrth Azar kay value, Hands-on + continuous ae Par ae cutih Azure pipetine Step Ensure atl recommended Settings and are enablect under Organizahon sethings to enforce secure and moden pfpeline practfces Step 27 Apter butid process the san ferttteat aS sp parattelt =sm ts gqanted -students must request pacatledesmo using the giuen fern Step3: Wo sslease pipeline exrsts ~cleck on New pepeline to stast creating one for deployment Stepd? Begin your release pipeline by adding an arttact and al last one stage 10 pooceed, [ step S: Setect the buria ‘ptpetine as axtijact source to Wok Your bufid output to releare ptpetine. Step 6: Apter adding the antipact add a Steg and choose | adeployment template 0% Start cutth an emply eee oo es il \b is ENARGUND @———____ GOVERNMENT ENGINEERING COLLEGI isa g iment No rer ofthe Experiment eee bs created ~ chick toconbiquie fobs and 2 Stage bs created ~ chick [Link] abiguye fobs and S fOr Geployment Step 8: Under | tasks’ add a mao deployment task such as a command tint sompi to Simulate os execute Gleployment Steps Step g: Tn the cma Une task, enter deployment common 10 Simulate dleployment Ot pecjosm achial actions Stnulate Secrebs (Key wart Step Oz CUCK om Vatidble group to crete a MeL group ©} Sbaxed pipeline variable Slept: Enter a name ana define Secure variable for use Across multiple pipetines. Step 12: Fill fo the vatiables Dame And value ancl Cléck Save to finalize the Voriable group setup | Link thes Variable group a your release pipeline Slep 18: Select the created variable qroup and cléck !Link to use Pt fo the rtease pipettre GFN e oft i _———® GOVERNMENT ENGINEERING COLLEGE, NARGUND nt No. Date tne Experiment Page No. 45 Step 14: Click on ‘create a yelease’ to trigger the release Pipeline manually Step 15: Click the '+New' bution to crate 02 Pmporl o aelease pripdiine when Now exrets Step 16: Click '+Ndd' under pipeline vanable to depihe, mew (urstom Key - Value Variable Step 12: Use ‘Link Variable qsoup' to connect predefned Vvortable +> your relense pipelthe GECN a «ah LLEGE, NARGUND ©——— Date ERNMENT ENGINEERING —e Gov it No iment Page No. 46 ie of the EX Bund and Deploy a complete DevOps prpetine , dfs cusston = p and A om Best _practtces | eurid pipeline Cer) cormpries the code, ruo tests and prepare ao asttpact (eg: fat ,2ip) when code ¢ pusired Release pipeline (ed) tares that axtipact and dep lors Services) at toa tangel environment (eg: Azuwe fipp Together, th enzures smooth , continuous dettvesy fo coramtt to deployment cutth mmimat manual steps | Butid pipeabe (cr) Setup + Step 1; Go to Azure DevOps > prpetines —> Create pipeline step 2+ Sedect Giittub as the Codle repostiory Gnd Choose (yous Sample Maven pdoyect Step 3: Choose YAML and create fottousrtog build skps: « Checkout code + Maven bueid task (mv clean Fostall) . publesh axtpact Ceg: IRR oF 2ep) Step 4: Commet and 2un the pipeline. ee 2 ee 5 NARGUND GOVERNMENT ENGINEERING COLLEGE, ae page No. € __senpts echo SrouatTog awh Gi _scerpt: echo * Simulating Axtipact publesh - = | Release Pipelihe('co) Setup: ee Step 6: Go to pi i petine— Release Nud Py puine ef Step a: Add on Avthfact—s Select the butid pipeline ourpul Slep&: Add a stage—> Choose Empty Job" Step 4; In the Tasks tab, Add a command tine Script task echo ' Simulateng deployment to Azuse App sexvice' echo" Deploying astfact+ Hetlowosid -1.0 . fax” Step lo; Save and Create ct rebease—> manually targger ft to wun Steps Use screnshol to vatedate cxtjacl Gnkage Qnd sim ulahon Sinoutating Secrets wwfth variable qsoups — 9 GOVERNMENT ENGINEERING COLLEGE, NARGUND © Date Page No. 4.3 122 Go to pipelines Uibvary — + vanable Dia; Name + (eg: My Secret Gooup) add secure Variables (eg ' DB PAsswoRD) | a Step 14: Save the Group and Unk et fo your release ypetfoe (under variables tab jo ug 2

You might also like