Skip to content

Instantly share code, notes, and snippets.

@Sdy603
Created September 17, 2024 16:01
Show Gist options
  • Save Sdy603/b61387bfa67f0ddc1e5fef340038018c to your computer and use it in GitHub Desktop.
Save Sdy603/b61387bfa67f0ddc1e5fef340038018c to your computer and use it in GitHub Desktop.
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