Hi
As part of my Bitbucket Pipeline, I want to invoke a long running asynchronous process (external to BitBucket). Once complete, if successful, it would promote the build
My pipeline:
pipelines:
default:
- step:
name: Deploy to test
script:
- yarn install
- yarn run deploy:test
- yarn run deploy:verify # triggers asynchronous process
- step:
name: Verify Deploy
trigger: manual
script:
- yarn run deploy:post-verify
- step:
name: Deploy to prod
script:
- yarn install
- yarn run deploy:prod
Can I trigger the `Verify Deploy` stage from code?
I've gotten this to work using the Bitbucket API. The API call used was:
curl -X POST -is -u '$USERNAME:$PASSWORD' \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/$USERNAME/$REPONAME/pipelines/ \
-d '{
"target": {
"selector": {
"type": "custom",
"pattern": "hello"
},
"type": "pipeline_ref_target",
"ref_name": "master",
"ref_type": "branch"
}
}'
The bitbucket-pipelines.yml file was:
pipelines:
custom:
hello:
- step:
script:
- echo "Hello world!"
Hi Andrew,
What are the values for the $USERNAME:$PASSWORD ?
Where can I get them ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's an outstanding request for this feature here: https://jira.atlassian.com/browse/BCLOUD-20050
Please add your +1 (via More > Add vote).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mark Nelissen mentioned Jul 09, 2021
https://jira.atlassian.com/browse/BAM-21281 this is a better feature request, although directed at Bamboo, but the solution and behaviour expected is actually the same for Bitbucket Pipelines.
Which I gratefully share here as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yikes! Four years on and the feature request is still sitting there. I guess this is just Atlassian being Atlassian.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is over one year old, any update atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.