A GitHub account. If you don't have one, sign up for free.
A GitHub repository with a Dockerfile. If you don't have a repository to use, fork the following repository, which contains a sample application and a Dockerfile:
Build a Linux or Windows image
Sign in to your Azure DevOps organization, and go to your project.
Go to Pipelines, and select New Pipeline.
Select GitHub as the location for your source code.
Select your repository, and then select Starter pipeline.
If you're redirected to GitHub to sign in, enter your GitHub credentials.
If you're redirected to GitHub to install the Azure Pipelines app, select Approve and install.
Replace the contents of azure-pipelines.yml with the following code. Based on whether you're deploying a Linux or Windows app, make sure to respectively set vmImage to either ubuntu-latest or windows-latest.
YAML
Copy
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
variables:
imageName: 'pipelines-javascript-docker'
steps:
- task: Docker@2
displayName: Build an image
inputs:
repository: $(imageName)
command: build
Dockerfile: app/Dockerfile
When you're done, select Save and run.
When you add the azure-pipelines.yml file to your repository, you're prompted to add a commit message.
Негізгі бет AZURE DEVOPS TRAINING VIDEOS TELUGU CLASS 1
Пікірлер