Unrecognized value "steps"
See original GitHub issueWhen I try to use azure tasks from an example I have got this error
stages:
- stage: gitversion
# condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/develop')))
jobs:
- job: gitversion
steps:
- task: gitversion/setup@0
displayName: Install GitVersion
inputs:
versionSpec: "5.1.3"
- task: gitversion/execute@0
displayName: Use GitVersion
- script: |
echo FullSemVer: $(fullSemVer)
echo ##vso[build.updatebuildnumber]$(fullSemVer)
echo Major: ${{ steps.gitversion.outputs.major }}
echo Minor: ${{ steps.gitversion.outputs.minor }}
echo Patch: ${{ steps.gitversion.outputs.patch }}
echo PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}
echo PreReleaseTagWithDash: ${{ steps.gitversion.outputs.preReleaseTagWithDash }}
echo PreReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}
echo PreReleaseNumber: ${{ steps.gitversion.outputs.preReleaseNumber }}
echo WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.weightedPreReleaseNumber }}
echo BuildMetaData: ${{ steps.gitversion.outputs.buildMetaData }}
echo BuildMetaDataPadded: ${{ steps.gitversion.outputs.buildMetaDataPadded }}
echo FullBuildMetaData: ${{ steps.gitversion.outputs.fullBuildMetaData }}
echo MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
echo SemVer: ${{ steps.gitversion.outputs.semVer }}
echo LegacySemVer: ${{ steps.gitversion.outputs.legacySemVer }}
echo LegacySemVerPadded: ${{ steps.gitversion.outputs.legacySemVerPadded }}
echo AssemblySemVer: ${{ steps.gitversion.outputs.assemblySemVer }}
echo AssemblySemFileVer: ${{ steps.gitversion.outputs.assemblySemFileVer }}
echo InformationalVersion: ${{ steps.gitversion.outputs.informationalVersion }}
echo BranchName: ${{ steps.gitversion.outputs.branchName }}
echo Sha: ${{ steps.gitversion.outputs.sha }}
echo ShortSha: ${{ steps.gitversion.outputs.shortSha }}
echo NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}
echo NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}
echo NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.nuGetPreReleaseTagV2 }}
echo NuGetPreReleaseTag: ${{ steps.gitversion.outputs.nuGetPreReleaseTag }}
echo VersionSourceSha: ${{ steps.gitversion.outputs.versionSourceSha }}
echo CommitsSinceVersionSource: ${{ steps.gitversion.outputs.commitsSinceVersionSource }}
echo CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}
echo CommitDate: ${{ steps.gitversion.outputs.commitDate }}
/azure-pipelines.yml (Line: 35, Col: 21): Unrecognized value: 'steps'. Located at position 853 within expression: format('echo FullSemVer: $(fullSemVer) echo ##vso[build.updatebuildnumber]$(fullSemVer) echo Major: {0} echo Minor: {1} echo Patch: {2} echo PreReleaseTag: {3} echo PreReleaseTagWithDash: {4} echo PreReleaseLabel: {5} echo PreReleaseNumber: {6} echo WeightedPreReleaseNumber: {7} echo BuildMetaData: {8} echo BuildMetaDataPadded: {9} echo FullBuildMetaData: {10} echo MajorMinorPatch: {[...]
So how can I access to output from @execute task?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
yaml pipeline job condition throwing unrecognized value error
When I try to run this I get the following error: An error occurred while loading the YAML build pipeline. Unrecognized value: 'iPhone'....
Read more >Split expression example fails with error "unrecognized value ...
Hello, The documentation provides the following example for split expression: variables: - name: environments value: prod1,prod2 steps: ...
Read more >Create copy of process give error " VS1640105: Unrecognized ...
As title says, the “create copy of process” is giving the popular VS1640105 error when I attempt to copy a customized process.
Read more >Resolve validation errors - Azure DevOps Services
If you've received a validation error when you tried import process, you'll need to resolve the error before retrying the import. Each error...
Read more >If, elseif or else in Azure DevOps Pipelines - Thomas Thornton
value : "purple". stages: - stage : EnvironmentToDeploy. jobs: - job : colour. steps: - task : Bash@3. displayName: EnvironmentSelected.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@chris-codeflow thanks for your help in getting a PR done to cover this! We appreciate it!
The
steps...
syntax is invalid in Azure Pipelines, so all of the echo commands in the script using that syntax will result in an error.GitVersion outputs both job-scoped (which can be accessed in subsequent steps in the same job) and multi-job output variables (which can be accessed in other jobs and stages) using the format
GitVersion.<variable>
. The following Azure Pipelines YAML is correct:Azure Pipelines creates environment variables from the job-scoped variables of the form
GITVERSION_<ALLCAPSVARIABLE>
which you can also use in the same job.I will be correcting the example and adding new ones (including how to access the variables in different jobs and stages) to address issue #236.