1. Create a new organization in Azure DevOps as below.
2. Once the organization is created, please go to the Marketplace and install the JFrog azure devops extension as below.
For more information please refer to the below URL’s.
3. As a next step create a project under the organization by clicking the new project button as in the screenshot below and provide the name and its private or public project.
4. Now we can create a pipeline by going to the pipelines. Please check the below screenshot
5. Create a new pipeline by clicking the new pipeline button. It will ask you to select where your code is and all, basically the source code. Select GitHub or any SCM as your source code provider and then select the repository name. Once you complete the authentication, it will create a basic template.
6. We need to create the Artifactory and GitHub connections as below. These will be used to authenticate Azure DevOps with Artifactory and also the maven which will be used in the tasks.
In order to configure the JFrog extension and the GitHub, go to the service connections option and search for JFrog and GitHub as below.
Select the JFrog Artifactory V2 for setting up Artifactory with Azure DevOps.
For Artifactory, please fill in the following details and verify the connection. If it’s successful, save the same.
Sample pipeline.yaml file
7. As a next step run the build by clicking the run button.
8. The “displayNames” are added manually as they are not generated by the task. This will show the Display names of the Tasks. If not defined, it will show the name of the Tasks as the Display names.
This will push the build to the maven repository in Artifactory with the build info.
2. Once the organization is created, please go to the Marketplace and install the JFrog azure devops extension as below.
For more information please refer to the below URL’s.
- https://marketplace.visualstudio.com/items?itemName=JFrog.jfrog-azure-devops-extension
- https://marketplace.visualstudio.com/items?itemName=JFrog.jfrog-artifactory-vsts-extension
3. As a next step create a project under the organization by clicking the new project button as in the screenshot below and provide the name and its private or public project.
4. Now we can create a pipeline by going to the pipelines. Please check the below screenshot
5. Create a new pipeline by clicking the new pipeline button. It will ask you to select where your code is and all, basically the source code. Select GitHub or any SCM as your source code provider and then select the repository name. Once you complete the authentication, it will create a basic template.
6. We need to create the Artifactory and GitHub connections as below. These will be used to authenticate Azure DevOps with Artifactory and also the maven which will be used in the tasks.
In order to configure the JFrog extension and the GitHub, go to the service connections option and search for JFrog and GitHub as below.
Select the JFrog Artifactory V2 for setting up Artifactory with Azure DevOps.
For Artifactory, please fill in the following details and verify the connection. If it’s successful, save the same.
Sample pipeline.yaml file
# Maven # Build your Java project and run tests with Apache Maven. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/java trigger: - master pool: vmImage: ubuntu-latest steps: - task: Maven@4 inputs: mavenPomFile: 'maven-examples/maven-example/pom.xml' goals: 'clean deploy' publishJUnitResults: true testResultsFiles: '**/surefire-reports/TEST-*.xml' javaHomeOption: 'JDKVersion' mavenVersionOption: 'Default' mavenAuthenticateFeed: true effectivePomSkip: false sonarQubeRunAnalysis: false - task: Bash@3 inputs: targetType: 'inline' script: 'env | sort' - task: JFrogPublishBuildInfo@1 inputs: artifactoryConnection: 'mk-jfrog-artifactory-hts' buildName: '$(Build.DefinitionName)' buildNumber: '$(Build.BuildNumber)'
7. As a next step run the build by clicking the run button.
8. The “displayNames” are added manually as they are not generated by the task. This will show the Display names of the Tasks. If not defined, it will show the name of the Tasks as the Display names.
This will push the build to the maven repository in Artifactory with the build info.