You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trigger: none # this pipeline is triggered manually, maybe with a scheduled trigger defined in the Web Editorvariables:
- name: build_poolvalue: "JUP-DEERL-IPS-VS-HMI-RT-LBA-1"
- name: linux_imagevalue: "captain.rtf.siemens.net:8443/rtng_unified/wincc-bullseye:11.0.58"jobs:
- job: GenerateMatrixdisplayName: list agents to inspectpool: ${{ variables.build_pool }}container:
image: ${{ variables.linux_image }}endpoint: 'docker-registry'timeoutInMinutes: 5steps:
- bash: | set -euo pipefail [[ -z "${AGENT_DIAGNOSTIC+x}" ]] || set -x # enable diagnostics for inline script # init list of legs to later compose into a matrix: declare -a legs=() # list of agents to scan has to be specified as build pipeline variable (we'll put a list of all existing agents as its default) for agent in $(AgentsToInspect); do # create a matrix with one leg for each agent. The job to inspect an agent will run on each of these: legs+=("'${agent}':{'agent':'${agent}'}") done # print the matrix to make it an output variable accessible from the other job (splitting up the ##vso keyword to prevent parsing issues with set -x active) printf "%svso[task.setVariable variable=legs;isOutput=true]{%s}\n" "##" "$(printf "%s," "${legs[@]}")" displayName: Calculate matrix to execute name: mtrx# inspect all the agents calculated above:
- job: InspectdisplayName: inspectdependsOn: GenerateMatrixstrategy:
maxParallel: 999matrix: $[ dependencies.GenerateMatrix.outputs['mtrx.legs'] ]pool:
name: ${{ variables.build_pool }}demands:
- Agent.Name -equals $(agent)container:
image: ${{ variables.linux_image }}endpoint: 'docker-registry'timeoutInMinutes: 2steps:
- checkout: none# checking that Artifact Staging Directory can be used (exists and files can be created):
- bash: | set -euo pipefail warn() { printf "%svso[task.logissue type=error]%s\n" "##" "$*" printf "%svso[task.complete result=Failed;]\n" "##" } die() { warn "$@" return 1 } date set -x # always show details of execution. [[ -d "$(Agent.WorkFolder)" ]] || warn "Cannot access the agent Workfolder!" ls -la "$(Agent.WorkFolder)" || warn "Cannot list content of the agent Workfolder!" [[ -d "$(Build.ArtifactStagingDirectory)" ]] || warn "Cannot access the Artifact Staging Directory!" ls -la "$(Build.ArtifactStagingDirectory)" || warn "Cannot list content of Artifact Staging Directory!" touch "$(Build.ArtifactStagingDirectory)/$(agent).log" || die "Cannot create a log file in Artifact Staging Directory!" ls -la "$(Build.ArtifactStagingDirectory)" displayName: verify Artifact Staging Directory is accessible condition: always()
- task: PublishBuildArtifacts@1inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'artifactName: 'ArtifactStagingDirectory'
The text was updated successfully, but these errors were encountered:
Convert azure pipeline to github actions
The text was updated successfully, but these errors were encountered: