Hi Martin,
the previous screen shot i sent where no output variable is because the pipeline created is based as yml code template..
i tried to create a new pipeline as an empty job instead of .yml template, and the option you mentioned of output variable is there .
do you have any idea how can i add the output variable in the yml configuration ?
also please if you may have any guides other than microsoft guides that states step by step how to configure the build pipeline using self hosted from scratch.
below is the yml file that i am trying to add the output variable to it but not able to.
# Sample YML pipeline for X++ builds
# For more information on build pipelines, see
# https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-tools/hosted-build-automation
# Change the name of the build to a 4-digit version number to be used for model versioning
name: $(Date:yy.MM.dd)$(Rev:.r)
trigger:
- staging
pool:
# Use the VS2019 image
vmImage: 'windows-2019'
demands:
- msbuild
- visualstudio
# Declare some shorthand for NuGet package names
# Make editing the path for metadata and NuGet extraction folder easier
variables:
AppPackage: 'Microsoft.Dynamics.AX.Application.DevALM.BuildXpp'
AppSuitePackage: 'Microsoft.Dynamics.AX.ApplicationSuite.DevALM.BuildXpp'
PlatPackage: 'Microsoft.Dynamics.AX.Platform.DevALM.BuildXpp'
ToolsPackage: 'Microsoft.Dynamics.AX.Platform.CompilerPackage'
MetadataPath: '$(Build.SourcesDirectory)'
NugetConfigsPath: '$(Build.SourcesDirectory)\Solution'
NugetsPath: '$(Pipeline.Workspace)\NuGets'
steps:
# Install NuGet and use -ExcludeVersion option to avoid paths containing version numbers
- task: NuGetInstaller@0
displayName: 'NuGet install Packages'
inputs:
solution: '$(NugetConfigsPath)\packages.config'
nugetConfigPath: '$(NugetConfigsPath)\nuget.config'
restoreMode: install
nuGetRestoreArgs: '-ExcludeVersion -OutputDirectory "$(NugetsPath)"'
nuGetVersion: 4.0.0.2283
# Use the custom build number y.m.d.rev as the model version
# Default updates only VAR layer and above
- task: XppUpdateModelVersion@0
displayName: 'Update Model Version'
inputs:
XppSourcePath: '$(MetadataPath)'
XppDescriptorSearch: '**\Descriptor\*.xml'
XppLayer: '8'
VersionNumber: '$(Build.BuildNumber)'
# Build using MSBuild 16 (VS 2019)
# Provide the needed paths, including semi-colon separated list of reference folders
# /p:ReferenceFolder are metadata folders containing other (compiled) X++ packages that are referenced
# /p:ReferencePath are folders containing non-X++ assemblies referenced (aside from one already in the output folder for the package)
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
inputs:
solution: '**/*.sln'
msbuildArgs: '/p:BuildTasksDirectory="$(NugetsPath)\$(ToolsPackage)\DevAlm" /p:MetadataDirectory="$(MetadataPath)" /p:FrameworkDirectory="$(NuGetsPath)\$(ToolsPackage)" /p:ReferenceFolder="$(NuGetsPath)\$(PlatPackage)\ref\net40;$(NuGetsPath)\$(AppPackage)\ref\net40;$(NuGetsPath)\$(AppSuitePackage)\ref\net40;$(MetadataPath);$(Build.BinariesDirectory)" /p:ReferencePath="$(NuGetsPath)\$(ToolsPackage)" /p:OutputDirectory="$(Build.BinariesDirectory)"'
clean: true
# Copy the compiler log files to the drop artifacts
- task: CopyFiles@2
displayName: 'Copy X++ Compile Log Files to: $(Build.ArtifactStagingDirectory)\Logs'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
**\Dynamics.AX.*.xppc.*
**\Dynamics.AX.*.labelc.*
**\Dynamics.AX.*.reportsc.*
TargetFolder: '$(build.ArtifactStagingDirectory)\Logs'
condition: succeededOrFailed()
# For packaging we need NuGet installed, with a version <3.4.0
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 3.3.0'
inputs:
versionSpec: 3.3.0
- task: XppCreatePackage@0
displayName: 'Create Deployable Package'
inputs:
XppToolsPath: '$(NuGetsPath)\$(ToolsPackage)'
XppBinariesPath: '$(Build.BinariesDirectory)'
DeployablePackagePath: '$(Build.ArtifactStagingDirectory)\D365-FO-Packeges-$(Build.BuildNumber).zip'
- task:
InstallMSALModule@1
# Enable this task to add a license file to the package
- task: XppAddLicenseToPackage@0
displayName: 'Add Licenses to Deployable Package'
enabled: false
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()
- task: LCSAssetUpload@1
inputs:
serviceConnectionName: 'Sanabil LCS Connection'
projectId: '1594818'
assetType: '10'
assetPath: '$(Build.ArtifactStagingDirectory)\D365-FO-Packeges-$(Build.BuildNumber).zip'
assetName: 'Sanabil-Package-$(Build.BuildNumber)'
- task: LCSAssetDeploy@3
inputs:
serviceConnectionName: 'Sanabil LCS Connection'
projectId: '1594818'
environmentId: 'fcb2297c-77aa-4d32-b9c0-11999de5eea3'
fileAssetId: '6aa987f9-b66d-4b52-934d-95428579a2bd'
deploymentType: 'hq'
releaseName: '$(Release.ReleaseName)'
Thank you,