0% found this document useful (0 votes)
16 views

DEVOPS LAB PROGRAM

The document provides a comprehensive guide on using Maven and Gradle for build automation, including installation steps, project setup, and dependency management. It also covers Jenkins for continuous integration, detailing its installation, configuration, and features that support automated builds and testing. Additionally, it includes practical exercises for building Java applications with both Maven and Gradle, as well as migrating projects between the two tools.

Uploaded by

anitharanis123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

DEVOPS LAB PROGRAM

The document provides a comprehensive guide on using Maven and Gradle for build automation, including installation steps, project setup, and dependency management. It also covers Jenkins for continuous integration, detailing its installation, configuration, and features that support automated builds and testing. Additionally, it includes practical exercises for building Java applications with both Maven and Gradle, as well as migrating projects between the two tools.

Uploaded by

anitharanis123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

PROGRAM-1

Introduction to Maven and Gradle: Overview of Build Automation Tools, Key


Differences Between Maven and Gradle, Installation and Setup

STEP1:Install Eclipse using this link


https://www.eclipse.org/downloads/
ENTERPRISE JAVA AND WEB DEVELOPERS

S
AM
R
G
O
PR
B

STEP2:Select ECLIPSE IDE FOR JAVA DEVELOPER OR ECLIPSE IDE FOR


LA

STEP3:SELECT INSTALLATION FOLDER JAVA VERSION


U
VT
STEP4:ONCE ECLIPSE IS INSTALLED THE SCREEN LOOKS AS IN BELOW

S
AM
R
G
O
STEP5:Lets see Procedure to install MAVEN & GRADLE
a)​ First make sure JDK current version is installed
PR
https://www.oracle.com/java/technologies/downloads/?er=221886#jdk23-wi
ndows
Then set environment variable path both user and system
■​ Have a JDK installation on your system. Either set the JAVA_HOME
B

environment variable pointing to your JDK installation or have the java


LA

executable on your PATH.

b)​ To install apache maven pls go to link as in below and download zip file of
U

bin
https://maven.apache.org/download.cgi
VT
c)​ To unzip the Source zip archive
Run in Windows cmd prompt
unzip apache-maven-3.9.9-bin.zip
If don't want to run directly extract the file to Program Files

d)​ Setup a PATH in environmental settings

S
“Add the bin directory of the created directory apache-maven-3.9.9 to the

AM
PATH environment variable”

e)​ After environment variable is set

R
Run this command in CMD prompt

G
mvn --v(2 hyphen)

After running, you see the text screen as in below


O
PR
B
LA

f)​ TO INSTALL GRADLE FOR WINDOWS follow procedure as in below


1.​ Create a new directory C:\Gradle with File Explorer.
U

2.​ Open a second File Explorer window and go to the directory where the
Gradle distribution was downloaded. Double-click the ZIP archive to
VT

expose the content. Drag the content folder gradle-8.12.1 to your newly
created C:\Gradle folder.

Alternatively you can unpack the Gradle distribution ZIP into C:\Gradle
using an archiver tool of your choice or run command with path folder
where the folder is created.
unzip apache-maven-3.9.9-bin.zip
Or can directly extract the zip file.
3. Configure your system environment
4. Finally type the command gradle –v to check if the gradle is installed.

S
AM
R
G
O
PR
B
LA
U
VT

PROGRAM-2
Working with Maven: Creating a Maven Project, Understanding the POM File,
Dependency Management and Plugins

STEP1:OPEN ECLIPSE THEN follow this navigation


FIle —-----> New —------>Maven Project
After that Screen be as in below
S
AM
R
G
STEP2:Make sure Use default Workspace Location is selected, then click
Next
O
PR
The screen be as in below
B
LA
U
VT

STEP3:In Screen shown above, click near the entry place of Filter and type
“apache” or select catalog as Internal
We want a simple maven JAR based application. So, we will choose the
“maven-archetype-quickstart” artifact to create the project.
S
AM
R
STEP4: Enter

G
Group Id:com.program2.maven
O
Artifact Id:program2-example-jar
PR
Keep snapshot as it is
B
LA
U
VT
Package:com.program2.maven.program2​

S
AM
R
G
O
PR

After entering above mentioned details click on Finish


B

You be able to see the automation build happening for Maven Jar Project
LA
U
VT
It asks for Configuration confirmation just click Y

Confirm properties configuration:


groupId: com.program2.maven
artifactId: program2-example-jar
version: 0.0.1-SNAPSHOT
package: com.program2.maven.program2

S
The RESULT be as in below

AM
R
G
O
PR

STEP5:Now its time to build Maven Project


Go to Maven Project —------------>Right Click on the Project and select
Maven Build
B
LA
U
VT
After the above procedure is done
Select Goal as package

S
AM
R
G
O
PR

And Click Run


B

The result be as in below


LA
U
VT
Now goto App.java finally run java application

S
AM
R
G
Description
O
What is groupId in maven ?
PR

groupId identifies a particular project uniquely across all projects, so we should follow a naming
convention. A very simple and commonly used way of doing this is to use the reverse of your
domain, i.e. com.javarewind.maven.

A good way of maintaining the integrity of groupId is to use the project structure. In case the project
B

consists of multiple modules then every module should append an identifier to the parent groupId.
i.e. com.javarewind.maven, com.java rewind.spring, com.javarewind.struts .. etc.
LA

What is artifactId in maven ?


artifactId is the name of war file without version, if you are creating it by yourself you are free to took
any name of your choice in lower case and without any strange symbol. But if this is a third party jar
U

than we have to take the name of the jar as suggested by its distribution.

What is the archetype in maven ?


VT

Archetype is a Maven project templating toolkit which tells the maven the type of project we are
going to create. Archetype enables the maven to create a template project of the user's choice so
that the user can get the project up and running instantly.

“archetype:generate” generates a new project from the provided archetype or updates the actual
project if using a partial archetype. Maven provides a number of predefined archtypes, see more
details from Maven Documentation.

—---------------------------------------------------------------------------------------------------------------------------
HOW POM.XML LOOKS IS AS IN SCREEN BELOW

S
AM
R
G
O
PR
B
LA
U
VT
PROGRAM3:Working with Gradle: Setting Up a Gradle Project,
Understanding Build Scripts (Groovy and Kotlin DSL), Dependency
Management and Task Automation

STEP1:Let's do this in cmd prompt


Goto Command Prompt

Then first make a new directory the command is


mkdir pgm3

S
AM
For changing to a current directory the command is
cd pgm3

Now run

R
gradle init
After execution of command the screen shows as in below where we opt

G
for build type select as 1
O
PR
B
LA

After selecting application type next it asks for Implementation language


select as groovy
U
VT

After selecting Implementation language it will ask for Java version and
project name
After providing version and project name
Select application structure as Single application structure and Domain
Specific Language as Kotlin

S
AM
R
G
O
After every procedure is over it shows Build successful
PR
B
LA
U

STEP2:Now its time to Build the script


VT

Just type the command as:


gradlew run

It will take atleast 3-5 minutes to run the configuration script we have set
through steps finally the output be as in below If You want to see the
structure of an application run the command as tree
S
AM
R
G
O
PR

PROGRAM4:Practical Exercise: Build and Run a Java Application with


Maven, Migrate the Same Application to Gradle
B

STEP1: First create a Maven Project as in PROGRAM2 then build the


LA

project and run java application you will get Hello World Message

STEP2:Then to migrate to gradle use shortcut Key Ctrl+Alt+Shif+T To get


Terminal screen as in below:
U
VT
S
AM
R
G
O
STEP3: Type command gradle init it will ask for migrate from maven to
PR
gradle type yes
B
LA
U
VT

STEP4: After the above command is validated to yes it prompts to select


Domain Specific Language as in screen below select 2 (as we have done
for Kotlin)
STEP5:After selecting Groovy it asks for validating prompt for API
Generator just validate as yes

S
AM
R
G
O
PR

Finally it runs the init phase as been selected


B
LA
U

STEP6:
Type the command
VT

gradle build
Now to get exact program output of our java file Locate to build gradle File from ur
local repository and Copy paste the code as in below shown in red color

plugins {
id("java-library")
id("maven-publish")
id("application")
}

S
AM
application {
mainClass.set("com.pgm4.test.App") // Use .set() for properties
}

R
repositories {
mavenCentral()

G
// Uncomment if you need to publish locally
// mavenLocal() O
}
PR
dependencies {
testImplementation("junit:junit:4.13.2") // Use Kotlin syntax for dependencies
}
B

group = "com.pgm4.test"
version = "0.0.1-SNAPSHOT"
LA

description = "pgm4"
java.sourceCompatibility = JavaVersion.VERSION_11 // Consider upgrading

publishing {
U

publications {
create<MavenPublication>("maven") {
VT

from(components["java"])
}
}
}

tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>().configureEach {
options.encoding = "UTF-8"
}

AFTER DOING ALL CHANGES FINAL STEP


To run commands
gradle clean build

S
gradle run

AM
You will get Output as
Hello World! Welcome to pgm4

R
G
O
PR
B
LA

PROGRAM5:Introduction to Jenkins: What is Jenkins?, Installing Jenkins on Local or Cloud


U

Environment, Configuring Jenkins for First Use .


VT

STEP1: Type jenkins download for windows


https://www.jenkins.io/download/
S
AM
R
STEP2: After clicking on Windows Jenkins MSI Installer exe file be installed

G
O
PR
B
LA
U
VT

STEP3: Goto Jenkins MSI Installer click on it u opt for “Run service as Local System”
S
AM
R
G
XX Need not to Provide Account & Password XX
O
PR

STEP4: Choose a port as 8080 and test the port and click Next
B
LA
U
VT
S
AM
R
G
O
PR
STEP5:It takes current jdk version thats available for safer side once goto cmd prompt and type
command
java –version
If matching click next
If failed to accept download jdk version 17 to 21 any of it
B

https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html
LA
U
VT
S
AM
R
G
O
STEP6: Click NEXT after doing above step you will get screen as in Below again continue to click Next
PR
B
LA
U
VT
STEP7: The popup allow format comes for Java Automation Server allow it click install —-----> Finally
Click Finish

S
AM
R
G
O
PR
confi

Now By default Our Jenkins run at


http://localhost:8080/
B
LA

Final step very important Once It will ask for Administrator Passowrd so u should locate as in
directory mention copy paste as in mention in file location:
C:\ProgramData\Jenkins\.jenkins\secrets\initialAdminPassword and paste password as in
mentioned belows administration passowrd
U
VT
Then select Install Suggested Plugins it starts to install as in shown below

S
AM
R
G
O
PR

Then it asks for minimum registration You can skip and continue as admin
B
LA
U
VT
Final screen be:

S
AM
R
G
O
PR

PROGRAM6 :Continuous Integration with Jenkins: Setting Up a CI Pipeline, Integrating Jenkins with
Maven/Gradle, Running Automated Builds and Tests
How Is Jenkins Used for Continuous Integration?
B

Continuous Integration (CI) is a software development practice where developers


integrate code into a shared repository frequently, usually several times a day.
LA

Jenkins is an open-source automation server that facilitates CI by automating the


build, testing, and deployment processes.

With Jenkins, developers can easily detect and fix integration issues early,
U

improving collaboration and accelerating software delivery. By continuously


integrating code, teams can maintain a high level of code quality, reduce
VT

development time, and minimize the risk of release failures.

Continuous Integration Features in Jenkins


Continuous integration involves the automatic building and testing of code
whenever changes are committed to the version control system. Jenkins
provides several features that facilitate CI, including:
●​ Version control system integration: Jenkins integrates with various version
control systems (VCS) such as Git, Subversion, and Mercurial. This allows
Jenkins to monitor repositories for changes, trigger builds, and incorporate
updates automatically.
●​ Build automation: Jenkins supports build automation using build tools like
Maven, Gradle, and Ant. It can compile, package, and deploy code,
ensuring that the latest changes are continuously integrated into the
software project.
●​ Automated testing: Jenkins can execute automated tests for each build,

S
using testing frameworks like JUnit, TestNG, and Selenium. This ensures

AM
that any issues introduced during development are quickly detected and
reported, allowing developers to address them promptly.
●​ Pipeline as code: Jenkins Pipeline allows users to define their entire CI/CD
pipeline as code using a domain-specific language called “Groovy.” This

R
makes the pipeline easily versionable, shareable, and more maintainable.
●​ Distributed builds: Jenkins supports distributed builds across multiple

G
build agents, which allows for faster and more efficient build processes by
distributing the workload across multiple machines.
O
●​ Plugins and extensibility: Jenkins offers a vast ecosystem of plugins that
extend its functionality, allowing users to customize and adapt Jenkins to
PR
their specific needs. Plugins are available for various tasks, such as
integrating with different VCS, build tools, notification systems, and more.
●​ Notifications and reporting: Jenkins can send notifications through various
channels like email, Slack, or other messaging systems to keep the team
B

informed about build status, test results, and potential issues. It also
generates reports and visualizations for various metrics, such as test
LA

results, code coverage, and build trends.


●​ Access control and security: Jenkins provides fine-grained access control
and user management, allowing administrators to control who can access
specific projects, pipelines, or configuration settings. It also supports
U

integration with LDAP and Active Directory for centralized user


management.
VT

●​ REST API: Jenkins exposes a REST API that enables users to interact with
Jenkins programmatically, allowing for integration with external tools,
automation, and custom applications.

Benefits and Drawbacks of Using Jenkins for CI


Jenkins CI offers numerous benefits that can streamline software development
processes and improve overall efficiency:
●​ Shorter development cycles: By automating repetitive tasks such as
building, testing, and deployment, Jenkins CI reduces the time developers
spend on manual tasks, enabling them to focus on writing code and
addressing critical issues. This accelerates the development cycle and
speeds up time-to-market.
●​ Fast code integration: Jenkins CI facilitates frequent code integration into a
shared repository, making it easier to detect and fix integration issues early
on. This prevents the accumulation of integration problems, leading to
more stable and reliable software.

S
●​ Short feedback loops: The automation provided by Jenkins CI allows

AM
developers to receive immediate feedback on the success or failure of their
code changes. Rapid feedback helps in identifying problems early,
ensuring that they can be addressed before they become more difficult and
time-consuming to resolve.

R
●​ Automated workflows: Jenkins CI can be configured to trigger automated
workflows based on specific events, such as code commits or pull

G
requests. This enables a seamless and efficient flow of work, helping teams
maintain a high level of productivity and consistency.
O
PR

However, there are potential concerns associated with using Jenkins CI:

●​ Expense: Although Jenkins itself is an open-source tool, the resources and


B

infrastructure required to run and maintain it can be costly, especially for


larger projects or organizations. Costs may include hardware, cloud
LA

services, or additional plugins and integrations needed for specific use


cases.
●​ Maintenance: Jenkins CI requires regular maintenance to ensure its
optimal performance, including updating plugins, monitoring the system
U

for potential issues, and troubleshooting any problems that arise. This
maintenance can be time-consuming and may require dedicated personnel
VT

with expertise in Jenkins and the underlying technologies.


●​ Not cloud native: Jenkins was designed before the advent of cloud
computing, which means it doesn’t naturally lend itself to cloud-based
environments. To make Jenkins work in a cloud environment, substantial
customization and additional tooling may be needed.
STEP1: Now coming to our Program to set CI Pipeline for Maven
Go to Jenkins Dashboard and Click on Manage Jenkins

S
AM
R
G
O
PR
STEP2: Select Plugins
B
LA
U
VT

STEP3: Search for Maven IntegrationPlugin in Available Plugins and Install


S
AM
R
G
O
STEP4: After Maven Integration Plugin is Installed We able to see Maven Project
as New Item
PR
B
LA
U
VT
STEP5: YET not completed we have to configure the Location to properly Build and
Run Maven Project
So again click on Manage Jenkins and select Tools

S
AM
R
G
O
PR

STEP6: Now lets not select Maven Project as new Item as we already have Maven project
in local systems lets see how we can run the Maven Project with POM.XML
B

a)​ Click on New Item


b)​ Provide Item Name and select Freestyle Project
LA
U
VT
S
AM
R
c)​

G
Scroll down to ‘Build‘ option. Click on ‘Add Build Step‘ and choose the
O
value ‘Invoke top-level Maven targets‘ from the drop down list.
PR
B
LA
U
VT
d)​ After selecting Invoke top-level Maven targets opt for proper environment
version as in set in previous steps in my case its MAVEN_HOME

S
AM
e)​ Enter Goal as

R
clean install

G
f) Before you save and apply just below Goal there is Advance option add
pom.xml path O
PR
B
LA
U

Goto pom.xml of your particular pgm and take path in my case its
C:\Users\CMRIT-ISE-L209-009\Desktop\IS147\pgm4\pom.xml
VT

After all Steps is over click on Build button the output be as in below
S
AM
R
To see either click on build texts and goto console output or u can goto

G
dashboard and opt to see build scripts.
O
PR
B
LA
U
VT
PROGRAM7: Configuration Management with Ansible: Basics of Ansible:
Inventory,Playbooks, and Modules, Automating Server Configurations with
Playbooks, Hands-On: Writing and Running a Basic Playbook.
How Do I Install Ansible on Ubuntu?

Installing Ansible on Ubuntu requires setting up an Ansible control node and


connecting it to one or more Ansible hosts. The following steps describe how to
perform the necessary configuration and test the new Ansible installation.

S
STEP 1: Configure Ansible Control Node

AM
The Ansible control node is a system used to connect to and manage Ansible
host servers. Proceed with the steps below to set up the control node on the main

R
server:

G
1. Create an administrator-level user for the control node. Use the adduser
command:
O
PR
sudo adduser [username]

2. When prompted, define a strong account password.


B
LA
U
VT
Optionally, provide more details about the user by answering questions. Press
Enter to skip a question.

3. Use the following usermod command to assign superuser privileges to the


account:

sudo usermod -aG sudo [username]

S
AM
A membership in the sudo group allows the user to utilize the sudo command to
perform administrative tasks.

4. Switch to the newly created user on the control node:

R
G
sudo su [username]
O
Note: The Ansible control node can be a dedicated server, a local machine, or a
PR
virtual machine running Ubuntu.

STEP 2: Set up an SSH Key pair


B

The Ansible control node uses SSH to connect to hosts. Generate an SSH key
LA

pair for the Ansible user by executing the following steps:

1. Enter the command below using the Ansible control node command line:
U

ssh-keygen
VT

Note: If an SSH key pair with the same name already exists, SSH displays a
warning asking the user to decide whether to overwrite it. Overwriting makes
the previous SSH key pair unusable, so ensure the old keys are no longer
needed before confirming.
2. When prompted, provide a passphrase. While adding a strong passphrase is
recommended, pressing Enter allows the user to skip the passphrase creation.

The system generates the public/private key pair and prints the randomart image.

S
AM
R
G
O
PR

STEP 3: Configure an Ansible Host

Ansible hosts are remote servers managed by the Ansible control node. Each
B

host must have the control node's SSH public key into authorized_keys directory.
LA

Apply the steps below for each new Ansible host:

1. Use the following ssh-copy-id command on the control node to copy the public
U

key to a host:
VT

ssh-copy-id [username]@[remote-host]

Replace [username] with an existing administrative user on the host system and
[remote-host] with the remote host domain or IP address. For example, to copy
the key to the user ansible on the host with the local IP address 192.168.0.81,
type:
To know IP type command

cat /etc/resolv.conf or hostname -i

ssh [email protected]

2. Type yes and hit Enter when asked whether to continue connecting to an

S
authenticated host.

AM
3. Enter the remote host account password.

R
G
O
PR
B
LA

The utility uploads the public key to the remote host account.

STEP4 : Install Ansible


U

Use the APT package manager to install the Ansible package on the control node
system:
VT

1. Ensure the package index is up to date

sudo apt update

2. Install Ansible on Ubuntu with the following command:

sudo apt install ansible -y


STEP 5: Verify the Installation

Check that Ansible was successfully installed on your Ubuntu system using the

S
ansible command:

AM
ansible --version

R
The output displays the Ansible version number, the location of the configuration

G
file, the path to the executable, and other information.
O
PR
B

STEP 6: Set up the Inventory File


LA

Once Ansible is installed on the control node, set up an inventory file to allow
Ansible to communicate with remote hosts. The inventory file contains all the
U

information about the remote hosts managed through the Ansible control node.
VT

Note: For an in-depth overview of creating files on remote hosts, refer to our
article How to Create a File In Ansible.

Follow the steps below to create an inventory file on the control node:

1. Create the ansible subdirectory in the etc directory:

sudo mkdir -p /etc/ansible


2. Use a text editor such as Nano to create a file named hosts:

sudo nano /etc/ansible/hosts


3. Add localhost that the control node will manage. Use the following format:
[local]
localhost ansible_connection=local

S
The [local] line allows for the creation of categories to organize local hosts. The

AM
following example adds a local host using its local IP address 192.168.0.81 and
sorts it into the servers category:

R
G
O
PR

4. Save the file and exit.


B

5. Enter the command below to check the items in the inventory:


LA

ansible-inventory --list -y
U

The output lists the hosts:


VT
STEP 7: Test the Connection

To ensure the Ansible control node can connect to the local hosts and run
commands, use the following ansible command to ping the hosts from the
control node:

sudo ansible all -m ping

S
Note: When a user connects to the remote hosts for the first time, Ansible asks

AM
for confirmation that the hosts are authentic. To confirm the authenticity, enter
yes when prompted.

R
The output confirms the successful connection.

G
O
PR
B
LA

The Ansible control node is now set up to control the connected remote hosts.

Conclusion
U

After following the steps in this guide, you have successfully installed Ansible on
VT

Ubuntu and can execute commands and playbooks on remote hosts. The guide
provided instructions for setting up the Ansible control node and connecting it
with the hosts via SSH.

PROGRAM9:Introduction to Azure DevOps: Overview of Azure DevOps Services,


Setting Up an Azure DevOps Account and Project.
STEP1:Go to Google chrome and type azure for students
https://azure.microsoft.com/en-us/free/students

S
AM
R
G
STEP2: Click on Start Free after that u get screen as in below
O
PR
B
LA
U

Click on Create one, If u have Github account u can Sign in using github account
better way is to create one account
VT

STEP3:Provide your email id at place of create account


S
AM
STEP4:After password is set provide your First name Last name

R
G
O
PR
B
LA

Then provide Country,Date of Birth


U
VT
S
AM
R
G
O
STEP5: Verification code be mailed to the mentioned once kindly type it
PR
B
LA
U
VT
STEP6:After code is verified as u got in the mail referred
U be given an option to solve puzzlegame

S
AM
R
G
O
STEP7:This step is the important once where u fill your Academic Details
properly where u provide College email id as in provided by your Individual
PR
colleges later the verification code again comes
B
LA
U
VT

After proper college email is given u get verification mail with link to mail u have
provided
S
AM
R
G
Click on link sent O
After u Click The screen be as in Below
PR
B
LA
U
VT
S
AM
R
G
O
PR
B
LA

TO MAKE UR ACCOUNT SECURE IT AGAIN HAVE PUZZLE


U
VT
S
AM
R
G
O
PR

Finally ur screen be like this


B
LA
U
VT
S
AM
R
G
Go To search and type Azure Devops
O
PR
B
LA
U
VT

Click on Get started with Azure


After the click u get the screen of Get free need not to do anything just click on
Signin You will get screen as in below
S
AM
R
THIS IS THE HOME PAGE OF THE MICROSOFT AZURE where you can see n

G
number of services now our target is Azure Devops

In top where have search for services


O
PR
B
LA
U
VT

Type Azure Devops

STEP8:Select Azure Devops Organization


S
AM
R
G
STEP9:
After u opting for Azure Devops Organizations u get a screen as in below now
select My Azure DevOps Organizations
O
PR
B
LA
U
VT

After above selection it once again reverifies name and email just click Continue
After it U get a Screen
VT
U
LA
B
PR
O
G
R
AM
S
S
AM
R
G
You will be able to see Organization is Created O
PR
B
LA
U

Finally After Creating a New Organization


VT

U can create Project of ur choice as per requirement


Every time u need not to signin u can bookmark or add the below link as shortcut
https://aex.dev.azure.com/
https://portal.azure.com/#home
PROGRAM10: Creating Build Pipelines: Building a Maven/Gradle Project with Azure Pipelines,
Integrating Code Repositories (e.g., GitHub, Azure Repos), Running Unit Tests and Generating
Reports.

STEP1:On creating organization goto Organization settings goto Policy


And Allow Public Projects active

S
AM
R
G
O
PR
B

STEP2: GOTO GITBASH


LA

TYPE COMMANDS AS IN BELOW


mkdir maventest1
cd maventest1
U

STEP3: to create simple hellow world maven project type command as in below
mvn archetype:generate -DgroupId=com.dineshonjava -DartifactId=Javateam
VT

-DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
S
AM
R
G
O
STEP3: to add files from local to github Follow the procedure
a)​ First create a repository in github as maventestazure
PR
b)​ Then come to gitbash and type
git init
git add .
git commit -m “azure pipeline example”
B

git branch -M main


git remote add origin https://github.com/gurumurthy974/maventestazure.git
LA

git push -u origin main

After completion of above command my repository looks


U
VT
S
AM
R
G
STEP4: Now goto Azure Devops Organization create Public Project
O
PR
B
LA
U
VT
STEP5: SELECT PIPELINE and then click on create pipeline

S
AM
R
G
O
STEP6: After creating Pipeline select type of repo as Github
PR
B
LA
U
VT

STEP7: It asks for minimum signin verification after that ur screen be as in below select
required repository there to run maven project in my case its maventest123
S
AM
R
G
O
STEP8: AFTER REQUIRED REPO IS SELECTED the screen be as in below
PR
B
LA
U
VT

Drag the screen down check once again the selected repository is correct or not then
click on Approve and Install
S
AM
R
STEP9: It again verifies signin verification of microsoft account

G
You be able to see starter pipeline select for Maven
O
PR
B
LA
U
VT

After selecting maven it asks for save and run just click on it
S
AM
R
G
O
Finally You be able to see tasks running its failed bec we shld mention proper path
For pom.xml
PR
B
LA
U
VT
S
AM
R
The commits will also be visible in github
G
O
WE can download and also see individual Raw Log Reports
PR
B
LA
U
VT

If pipeline permission error comes please complete the registration form of Parallel Jobs after 2 working
days(48hrs) u be able to run pipelines for private projects same happens to be for public Projects.
Program11: Creating Release Pipelines: Deploying Applications to Azure App Services,
Managing Secrets and Configuration with Azure Key Vault, Hands-On:
Continuous Deployment with Azure Pipelines.

STEP1: Click on Organization setting and click on Pipeline Settings You get screen as in below

S
AM
R
G
O
PR

STEP2: Off the Disable creation of classic pipeline


B
LA
U
VT

STEP3: NOw you be able to see the visibility of Release for any pipeline creation as in screen
below.
S
AM
STEP4: YOu can run simple test plans

R
G
O
PR
B
LA
U

We can build tasks and run them


VT
S
AM
R
G
O
PR
B
LA
U
VT

We can see our Agent Job releases logs


VT
U
LA
B
PR
O
G
R
AM
S

You might also like