Forums

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

Deploy at QA and Trigger Tests from Test repo unable to invoke the test

Elumalai_ Gopal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 23, 2025

This is the first time we are implementing Continous testing using bitbucket pipeline. We are getting compilation error while modifyiing bitbucket-pipelines.yml file of dev repo to trigger test from a different repo (test repo), the file that we are modifying has code like this

pipelines:
    custom:
    deploy to dev:
      import: repo-1:main:deploy_to_dev
    deploy to qa:
      import: repo-1:main:deploy_to_qa
We are trying to add the following values after the deploy to qa with proper indentation
      pipe: atlassian/trigger-pipeline:5.0.0
         variables:
            REPOSITORY: 'repo-2'
            REF_TYPE: 'branch'
            REF_NAME: 'release'
            CUSTOM_PIPELINE_NAME: 'custom: test on qa'
            PIPELINE_VARIABLES: >
               [{
                 "key": "TestType",
                 "value": "smoketest" }]
            DEBUG: "true"
The code is not compiling, Please suggest correct way to invoke the test repo as given above with compilation working. I am sure this is not new and most of the company has implemented this.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 25, 2025

Hi @Elumalai_ Gopal and welcome to the community!

Just a heads up, I edited the repo names from your post to protect your privacy. I'm going to use a numbered list to address issues:

1. Indentation like the following will work:

pipelines:
custom:
deploy to dev:
import: repo-1:main:deploy_to_dev
deploy to qa:
import: repo-1:main:deploy_to_qa

Spaces need to be used for indentation, not tabs.

 

2. Is the pipe part of the custom pipeline "deploy to qa"? If so, this is not supported at the moment. Additional steps or commands cannot be added to an imported pipeline. We have a feature request here https://jira.atlassian.com/browse/BCLOUD-22855 for sharing steps between different repos, this would allow you to import a step only and then add a second step.

The available options now are:

(a) You could add this pipe in a separate custom pipeline, different than "deploy to qa".
(b) You could look into dynamic pipelines for sharing a step: https://community.atlassian.com/forums/Forge-for-Bitbucket-Cloud/Share-a-step-across-pipelines-Dynamic-Pipelines/ba-p/2712403
(c) You could add the pipe to the definition of "deploy to qa", in the repo where you are doing the export.
(d) You could omit the import for 'deploy to qa' and just define the step and script without importing, so you can add the pipe as an additional command.

 

3. With regards to the pipe definition:

(a) I recommend using the latest version of the pipe, which is 5.10.1 at the moment.
(b) You need to provide authentication details to the pipe, either with the variable BITBUCKET_ACCESS_TOKEN or with the variables ATLASSIAN_ACCOUNT_EMAIL and ATLASSIAN_API_TOKEN. Please see the README.md file in the pipe's repo: https://bitbucket.org/atlassian/trigger-pipeline/src/master/ (if you scroll down, you will see the README.md)
(c) in the value of the variable CUSTOM_PIPELINE_NAME, you need to remove the part "custom: ", UNLESS this is also part of the custom pipeline's name.

If the definition of the custom pipeline in repo2 looks like this:

pipelines:
custom:
test on qa:
- variables:
- name: TestType
- step:
script:
- echo "This is test on qa pipeline"

Then you need to use CUSTOM_PIPELINE_NAME: 'test on qa' in the pipe.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events