Created
September 17, 2024 16:01
-
-
Save Sdy603/b61387bfa67f0ddc1e5fef340038018c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- main | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: Bash@3 | |
inputs: | |
targetType: 'inline' | |
script: | | |
curl -X POST https://yourinstance.getdx.net/api/deployments.create \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer $(DX_BEARER_TOKEN)" \ | |
--data '{ | |
"reference_id": "$(Build.BuildId)", | |
"deployed_at": '$(date +%s)', | |
"service": "my_service", | |
"commit_sha": "$(Build.SourceVersion)", | |
"repository": "$(Build.Repository.Name)" | |
}' | |
condition: succeeded() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment