Create a build pipeline in azure devops

hello experts,
I am starting a project, which requires to Build a pipeline in azure Devops , I started looking at the
azure-pipelines.yml file ,but I can’t make it work .
is there already someone who has worked on Azure devops for automatic package deployment please ?

my azure-pipelines.yml
Starter pipeline
Start with a minimal pipeline that you can customize to build and deploy your code.
Add steps that build, run tests, deploy, and more:

trigger:
branches:
include:
- develop
paths:
include:
- ‘o’
exclude:
- ‘azure-pipelines.yml’

stages:

  • stage: build
    jobs:
    • job: packaging
      displayName: ‘’
      steps:
      • script: |
        pushd $(build.SourcesDirectory)
        tar -cvf $(Build.BinariesDirectory)/oooo.tar ./o
        popd
        displayName: ‘’
      • task: CopyFiles@2
        displayName: ‘’
        inputs:
        SourceFolder: ‘$(build.BinariesDirectory)’
        Contents: ‘o.tar’
        TargetFolder: ‘$(build.artifactstagingdirectory)’
      • task: PublishBuildArtifacts@1
        displayName: ‘’
        inputs:
        pathToPublish: ‘$(build.artifactstagingdirectory)’
        artifactName: ‘oooo’
        publishLocation: ‘Container’ # Options: container, filePath
        parallel: false # Optional
    • deployment: deploiement
      dependsOn: packaging
      displayName: ’ ’
      environment:
      name: DEV
      resourceType: VirtualMachine
      tags:
      strategy:
      rolling:
      maxParallel: 2 #for percentages, mention as x%
      deploy:
      steps:
      - task: Bash@3
      displayName: ’ ’
      inputs:
      targetType: ‘inline’
      script: |
      mkdir -p $(Pipeline.Workspace)/archives
      tar -xvf $(Pipeline.Workspace)/o.tar -C $(Pipeline.Workspace)/archives
      - task: Bash@3
      displayName: ‘’
      inputs:
      targetType: ‘inline’
      script: |
      #cp -r $(Pipeline.Workspace)/archives/So /opt/webMethods/IntegrationServer/instances/default/packages
      cp -r $(Pipeline.Workspace)/archives/oo /home/ooo/packages
      cd $(Pipeline.Workspace)/archives
      curl -u to reload packages
      rm o.log
      - task: Bash@3
      displayName: ‘’
      condition: always()
      inputs:
      targetType: ‘’
      script: |
      rm -r $(Pipeline.Workspace)/archives
      rm -r $(Pipeline.Workspace)/
      #rm TODO :

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.