hardisgroupcom / sfdx-hardis

Swiss-army-knife Toolbox for Salesforce. Orchestrates base commands and assist users with interactive wizards to make much more than native sfdx + Allows you to define a complete CI/CD Pipeline and Schedule a daily Metadata backup & monitoring of your orgs
https://sfdx-hardis.cloudity.com
GNU Affero General Public License v3.0
194 stars 36 forks source link

Azure DevOps : Pipeline Deployment Checks can't connect to SFDC ORG ( This command requires a username...) #456

Closed laissaouibrahim closed 11 months ago

laissaouibrahim commented 11 months ago

Hi , After configuring correctly variables + pipelines on Azure DevOps as mentionned on SFDXHardis docs. I have succesfully exectuted the deployment Job. But unfortunately the second job (deployment checks) failed because he can't retreive Org information from variables :

ERROR running hardis:project:deploy:sources:dx: This command requires a username. Specify it with the -u parameter or with the "sfdx config:set defaultusername=" command.

Please Help ! thanks :) Script : azure-pipelines-checks.zip

image

nvuillam commented 11 months ago

Did you configure the secret variables (SFDX_HARDIS_CLIENT_ID_XXXX, SFDX_HARDIS_CLIENT_KEYXXXX) in both the deployment pipeline in Azure config ?

Your workflow seems correct

Did you also push the .yml & .key generated during the configuration command ?

Note: I just published some improvements on org configure auth command, you might upgrade sfdx-hardis and try again from the start just for this org

laissaouibrahim commented 11 months ago

Yes all generated credentials are pushed + the secret variables are configured on each pipeline. This is confirmed with the success execution of the second Deployment Pipeline. I will Update sfdxHardis & generate again CI config. I will keep you informed :)

nvuillam commented 11 months ago

Please let me know :)

laissaouibrahim commented 11 months ago

Hi @nvuillam , After updating sfdxHardis + generating again credentials : problem solved. I think that i have make a mistake when changed my git branch name from developBuild to developbuild .

nvuillam commented 11 months ago

@laissaouibrahim I'm glad your issue is solved :)