Posts

Showing posts from September, 2023

Azure : Display the values of IN-Built Variables

 trigger: - '*' pool:   vmImage: 'windows-latest' jobs: - job: DisplayBuildVariables   steps:   - script: |       echo "Build.BuildId: $(Build.BuildId)"       echo "Build.BuildNumber: $(Build.BuildNumber)"       echo "Build.DefinitionName: $(Build.DefinitionName)"       echo "Build.SourceBranch: $(Build.SourceBranch)"       echo "Build.SourceVersion: $(Build.SourceVersion)"       echo "Build.Repository.Name: $(Build.Repository.Name)"       echo "Build.Repository.Provider: $(Build.Repository.Provider)"     displayName: 'Display Build Variables'

Azure - Pipeline - Template

Image
  In Azure DevOps, a CI/CD (Continuous Integration/Continuous Deployment) pipeline is organized into the following hierarchical structure: Stages: A stage is a major division within a pipeline that represents a logical phase or environment in your CI/CD process. Each stage typically corresponds to a major step in your software delivery process, such as building, testing, deploying to a staging environment, and deploying to production. Stages are executed sequentially by default, and each stage can have its own jobs. Jobs: A job is a unit of work within a stage and represents a set of tasks that need to be executed on the same agent (or group of agents). Jobs within a stage can run in parallel to optimize pipeline execution. Jobs can depend on the success or failure of other jobs in the same or previous stages. Tasks: A task is the smallest unit of work within a job and represents a single action or command to be executed. Tasks can include actions like building code, running tests,...

Azure -Pipeline - TASKS

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/?view=azure-pipelines#package-tasks +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PrintOut - Pre-defined Variable Values

 You can print out the values of predefined variables in an Azure DevOps pipeline by using a script or a specific task. Here, I'll provide an example using a script task to print out the values of predefined variables in your pipeline YAML: pool: vmImage: 'windows-latest' steps: - script: | echo "Build ID: $(Build.BuildId)" echo "Build Number: $(Build.BuildNumber)" echo "Source Branch: $(Build.SourceBranch)" echo "Repository Name: $(Build.Repository.Name)" echo "Source Version: $(Build.SourceVersion)" echo "Build Definition Name: $(Build.DefinitionName)" echo "Agent Name: $(Agent.Name)" echo "Agent OS: $(Agent.OS)" echo "Agent Job Name: $(Agent.JobName)" echo "Default Working Directory: $(System.DefaultWorkingDirectory)" displayName: 'Print Predefined Variables' In this example: We use the script task to execute...

Azure -PIPELINE -1

Image
  When defining you build pipelines in azure pipelines . There are two ways that you can go about doing this . First is to define that your pipeline has a yaml file