Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipeline variables

Nastya Sekerich
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!
September 26, 2022

Hi! 
I have a question about the default variables. 
Are there exist any variables to show that it is a merge action?
For example something like CI_PIPELINE_SOURCE in GitLab

Cause I need to run a step only once when we create PR, and it should doesn't run when we update this PR later. 

I cannot find something similar in the documentation. 
Thanks a lot!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 28, 2022

Hi @Nastya Sekerich and welcome to the community!

I would like to ask for some clarification about your use case.

You mentioned:

Cause I need to run a step only once when we create PR, and it should doesn't run when we update this PR later.

Can you please clarify what action you are referring to by "updating the PR later"?

At first, I thought that by "updating the PR" you meant pushing new commits to the source branch. However, earlier in your post you make a reference to a "merge action", so now I am unsure if by "updating the PR" you mean merging it, pushing commits to the source branch, or something else.

Can you please clarify, so I can better answer your question?

Kind regards,
Theodora

Nastya Sekerich
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!
September 29, 2022

Thanks a lot, @Theodora Boudale! Glad to join you!
Yes, I mean the first describing situation. When we already open Pull Request and then we push some commits to this branch. So this pull request will be "updated" with these added comments.
Can we somehow keep track of open action and avoid running the pipeline step during the update?

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 30, 2022

Hi @Nastya Sekerich,

Thank you for the clarification!

I'm afraid that this is not possible at the moment. We have pull request pipelines that get triggered both when a PR is created, but also when the source branch gets updated with new commits. It is not possible to run them on PR creation only and we don't have a variable that will show if the trigger was PR creation or update.

I can create a feature request for what you're asking for our development team to consider, please feel free to let me know if you'd like me to proceed with that.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events