You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a development pipeline that triggers a QA pipeline. In this development pipeline, it is possible to deploy in 3 different environments.
And after each deployment, the testing pipeline is triggered. But just as deployment occurs automatically in each branch, I wanted the test pipeline to know in which environment it should run automatically. So I thought, is it possible to share values between two different pipelines, so that, for example, if I run the deployment in the DEV environment when triggering the test pipeline, it sets the value 1 in the environment without needing me to intervene manually?
Hi @Valéria Bezerra dos Santos,
Welcome to the community.
It is not possible to directly share variables from one Pipelines build to another.
However, you can try to leverage this existing Pipes script called atlassian/trigger-pipeline which will allow you to trigger a custom Pipelines build and pass variables.
Here's an example:
script: - pipe: atlassian/trigger-pipeline:5.3.0 variables: BITBUCKET_USERNAME: $BITBUCKET_USERNAME BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD REPOSITORY: 'your-awesome-repo' REF_TYPE: 'branch' REF_NAME: 'master' CUSTOM_PIPELINE_NAME: 'deployment-pipeline' PIPELINE_VARIABLES: > [{ "key": "AWS_DEFAULT_REGION", "value": "us-west-1" }, { "key": "AWS_ACCESS_KEY_ID", "value": "$AWS_ACCESS_KEY_ID", "secured": true }, { "key": "AWS_SECRET_ACCESS_KEY", "value": "$AWS_SECRET_ACCESS_KEY", "secured": true }] WAIT: 'true'
Regards,
Mark C
PIPELINE_VARIABLES: >
[ {
"key": "TEST_VARIAVEL",
"value": "1"
}]
- echo $TEST_VARIAVEL
- cucumber -t @requests $FEATURE TEST_ENV=$TEST_VARIAVEL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, glad to know it worked for you.
Regards,
Mark C
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.