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

Mixture of Default and Custom Pipelines

mabakr April 3, 2020

Hi,

I was wondering if it is possible to have a mixture of default and custom within one pipeline?

I can see that you can add custom variables however only require that for one step of the pipeline to allow for user input.

 

Currently I have:

On commit, deploy to test automatically. (Happy with that)

Then you have to trigger deployments to production manually via the run button. (Happy with that)

What I'd like:

When I click run for production, I want it to ask the user what version they'd like to push to production.

At the moment I can only see this option for the whole pipeline but would like to know if it can be done for only one step.

The example of custom variables can be found here

Again the link above applies to the whole pipeline which I do not want, only to a specific step within a pipeline.

Thanks in advance

1 answer

0 votes
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2020

Hi, @mabakr !

Let me ask a question to understand we are on the same page. I see, you want environment variable where you could say which version to deploy to production and apply this to only a part of a pipeline (not a part of pipe)?

Environment variables choice can be one of : repository variables and deployments( staging , production). For your case I guess, you want production deployment variable, so you can use that on production pipeline.

However, I guess, if you have some overlapping , deployment variable will override repository variable (following the doc https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html# )

Perhaps, we need more detailed request about what exactly situation you have, so we could fix this need.

mabakr May 14, 2020

Please could you clarify pipe? I assume it is each step within the pipeline for example

Pipeline

 - Deploy to Test (Pipe)

- Deploy to Prod (Pipe) - Manual Trigger

If the above is correct, then on the manual trigger for 'Deploy to Prod' pipe I would like the user to input the version that they would like to deploy. I don't want this to be a pipeline variable, just a temporary variable input by the user at that moment in time.

Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2020

@mabakr I got your point. As for the user prompt, right now you cannot use it for part of a pipeline. I guess, this is because pipeline on each of steps should be independent of others, otherwise it getting more complex and takes dependencies from other stuff.

To avoid this, I guess, the most proper solution currently is to write separate pipeline for deploying to prod and then you can configure this pipeline to run on schedule or by user prompt, like you want.

 

Answering on your question about a pipe. Pipe is the feature that can be used similarly to docker, can be a part of your pipeline step and can do different stuff depending on your requirements (aws, kubernetes, google cloud deploy, publishing packages to registries, etc. ). For all existing pipes you can explore this page https://bitbucket.org/product/features/pipelines/integrations. Perhaps you can get some advantages. But now I guess this does not relate to your question, so this is for future knowing. If you are interested more, you can contact Atlassian team in community, tagging a question with "pipes" or "pipe" tag

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events