Closed extravio closed 4 years ago
@extravio Thanks for reaching out! Looks like the latest release which had lot of artifact refactoring broke the YAML compat. We will be addressing it early next week. At the moment, we have a shortcoming, all our test suites for the release side of things are based on classic, hence the miss.
While we fix this, here is the workaround in YAML. Please use the
Also note you need to use download the artifact using the download step in the deployment stage
stages:
#Build Source Package
- stage: BuildSourcePackage
displayName: 'Build a source package and test multiple deployments'
dependsOn: []
condition: ''
jobs:
- job: SourcePackageBuild
strategy:
matrix:
ubuntu::
image: 'ubuntu-latest'
pool:
vmImage: $(image)
displayName: Source Package build for force-di
steps:
- task: sfpwowerscript-installsfdx-task@7
displayName: Install SFDX
- task: sfpwowerscripts-createsourcepackage-task@13
displayName: Create a new version of Source Package
name: createpackage
inputs:
package: force-di
version_number: 1.0.0.$(Build.BuildNumber)
#Deploy Source Package
- stage: DeploySourcePackage
displayName: 'Deploy Source Package'
dependsOn: BuildSourcePackage
condition: ''
jobs:
- job: DeploySourcePackage
strategy:
matrix:
ubuntu::
image: 'ubuntu-latest'
pool:
vmImage: $(image)
displayName: Install the Source Package to an org
steps:
- download: current
- task: sfpwowerscript-installsfdx-task@7
displayName: Install SFDX
- task: sfpwowerscript-authenticateorg-task@9
displayName: Authenticate Org
inputs:
method: JWT
jwt_key_file: server.key
username: $(username)
alias: HubOrg
isdevhub: true
clientid: $(clientid)
- task: sfpwowerscript-managescratchorg-task@8
displayName: Create Scratch Org
inputs:
action: Create
config_file_path: config/project-scratch-def.json
alias: scratchorg
devhub_alias: HubOrg
maintainorg: delete
- task: sfpowerscript-deploysourcetoorg-task@10
displayName: Deploy Source Directory to the org
inputs:
target_org: 'scratchorg'
source_directory: 'force-di'
checkonly: true
ignorewarnings: true
ignoreerror: true
wait_time: '20'
testlevel: 'NoTestRun'
isToBreakBuildIfEmpty: true
@extravio We have released a patch to this bug. Please let us know if it works.
Many thanks for the quick turnaround. It works perfectly! ^ @azlam-abdulsalam
Hi, I'm trying to execute the sfpowerscript-deploysourcetoorg-task in a release pipeline in yaml. (It works fine in Azure pipeline classic).
The artifact is downloaded in the default directory: $(System.ArtifactsDirectory) (/home/vsts/work/1/a) and I set the project_directory parameter of the task to: $(System.ArtifactsDirectory)/$(ARTIFACT_NAME)/source
I get the following error: path should be a/source/force-app/main"
path.relative()
d string, but got "../a/Is this a bug or am I missing something?
Here's an extract of my pipeline yml file: