Can I update the Pipeline status in the steps?

Stefan Balan December 7, 2020
branches:
QA:
- step:
# We don't want the default pipeline to trigger this process, so we leave the first step empty
name: Start building the QA
status: In Progress ---- Is this Possible or something similar? because I need this to reflect the Status of my Pipeline to come back later and run the other steps remaining in the Pipeline
script:
- echo "Building QA in progress..."
- step:
# Code review and manually push changes in QA Bitbucket
name: Build Bitbucket QA
deployment: QA
trigger: Manual
script:
- echo "Building Bitbucket QA..."
- step:
# push changes in QA Salesforce, run Unit tests and UI review
name: Build Salesforce QA
trigger: Manual
script:
- echo "Building Final QA..."

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 8, 2020

Hi Stefan and welcome to the community.

If you want to monitor which Pipelines have manual steps that haven't run yet (so you can run them later), you can check the Pipelines page in the repo.

If you take a look at the following screenshot from one of my repos:

Screenshot 2020-12-08 at 13.32.22.png

 

For Pipeline #27, the icon with a circle within a circle next to the status "Successful", indicates that there are steps that haven't run yet.

For Pipeline #26, the check icon inside the circle indicates that all steps have run.

Can you monitor it this way? Or are you looking for a way to programmatically retrieve this info?

Kind regards,
Theodora

Stefan Balan December 8, 2020

Hi @Theodora Boudale 

I was looking to programmatically retrieve this info in my YAML file and change it with a string data, depending on the step I'm in.

Your answer is a start, and much appreciated. 

Best Regards Stefan

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2020

Hi Stefan,

Thank you for your reply and you are very welcome.

You mention

I was looking to programmatically retrieve this info in my YAML file and change it with a string data, depending on the step I'm in.

Could you perhaps explain a bit more about your use case and how this would be useful for you?

The status of the pipeline can be retrieved via an API call and it will show as IN_PROGRESS if there are steps that haven't run yet, and COMPLETED when all the steps have run.

However, if you include such an API call in the yaml file to be executed during the build, the output will always be IN_PROGRESS, even for the final step, as the build is still running when the API call is executed.

While it's not possible to define a variable the way you described in your original post, I'd like to understand a bit better your use case, to see if there is another way to achieve what you'd like.

Kind regards,
Theodora

Stefan Balan December 10, 2020

Hi Theodora, 

My use cases is this, I run multiple steps (3 steps) I need a column in the Pipelines Table to mention how many "Steps" completed. And this can be achieve with the following format.

Status                Steps

Successful            1/3

Status                Steps

Successful            2/3

Status                Steps

Successful            3/3

 

Best Regards Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events