Skip to content

Instantly share code, notes, and snippets.

@SumindaD
Created February 4, 2024 11:29
Show Gist options
  • Save SumindaD/13515a09dcd2afb6831a291102a163ba to your computer and use it in GitHub Desktop.
Save SumindaD/13515a09dcd2afb6831a291102a163ba to your computer and use it in GitHub Desktop.
trigger:
- none
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
fetchDepth: 0
fetchTags: true
persistCredentials: true
- task: CmdLine@2
inputs:
script: |
git config --global user.email "BitbucketUser@test.com"
git config --global user.name "Username"
git checkout $(Build.SourceBranchName)
- task: PowerPlatformToolInstaller@2
inputs:
DefaultVersion: true
- task: PowerPlatformWhoAmi@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'PowerPlatform - Dev Environment'
- task: PowerPlatformExportSolution@2
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'PowerPlatform - Dev Environment'
SolutionName: 'TestAppSolution'
SolutionOutputFile: '$(Build.StagingDirectory)/TestAppSolution_Unmanaged.zip'
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformUnpackSolution@2
inputs:
SolutionInputFile: '$(Build.StagingDirectory)/TestAppSolution_Unmanaged.zip'
SolutionTargetFolder: '$(Build.SourcesDirectory)/TestAppSolution'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- task: CmdLine@2
inputs:
script: |
cd $(Build.SourcesDirectory)
git add .
git commit -m "Updated the solution"
git push origin $(Build.SourceBranchName)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment