Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Should trigger-pipeline work if I set BITBUCKET_ACCESS_TOKEN var in Deployment variables?

Yevhen Levchenko
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2023

Hi I would like to configure this pipe https://bitbucket.org/atlassian/trigger-pipeline/src/master/

It works fine with BITBUCKET_ACCESS_TOKEN if I set it as repository variable but
Will it work if I set it as deployment variable for Staging env?


1 answer

1 accepted

1 vote
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2023

Hi Yevhen,

As long as you set the deployment environment to the staging evironment using the "deployment" tag, yes it will. I've just tested this on my end and it worked with the following code:

 

TriggerTest: 
-
step:
name: "Test trigger pipe"
deployment: staging
script:
- pipe: atlassian/trigger-pipeline:5.1.3
variables:
BITBUCKET_ACCESS_TOKEN: $testpipe
REPOSITORY: 'test-repo'

For context:

  • I have two repositories - testrepository and test-repo
  • I'm trying to trigger a pipeline in the test-repo repository using the testrepository repository
  • I have an access token configured on test-repo called "testpipe"
  • I have this token stored as a deployment variable (also called testpipe) in my "staging" environment within testrepository

Hope this helps :)

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events