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

Log for previous pipeline deployments.

Tuan Nguyen Anh October 1, 2020

Hello,

In bitbucket pipeline, I can see the logs of latest deployment but I cannot find out the logs of previous deployments (included failed ones).

Do we have a place to store them on BB or please guide me how to get them.

It's a very useful feature on BB if we have it.

Thanks,

Tuan

5 answers

1 vote
Abhishek Sharma June 30, 2023

after a long time I am facing this issue when tracking logs of the failed step which later got succeeded, any success so far for you to find those lost logs?

0 votes
Ljubica Kostova November 6, 2023

I need the same, 

My deployment step failed, after redeploy (only them failed step) the old logs are gone :(

It is very useful for investigation to not overridde them

0 votes
Peter August 24, 2023

We need this to be view previous deployment as well for root cause analysis, audit trails etc.

0 votes
ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2020

All deployment logs including past ones should be available. You can either access them by locating the pipeline build under pipelines or by browsing through the deployments under deployments.

The history on the deployments UI might be a little slow / hard to use, but apart from that I never had problems to access old pipelines logs.

Tuan Nguyen Anh October 2, 2020

Hi ktomk,

I think you mis-understand my case here. 

For example, you have a PR and that PR failed to run.  After fixing it, you rerun the pipeline, and you cannot see the logs of previous trigger.

It's my case, not the previous commit or PR.

ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2020

@Tuan Nguyen Anh Yes, I'm not so sure, as what I mentioned is less about a previous commit (which might be deleted by now) or previous PR. You can find all logs of all past pipelines under the pipelines section ordered by date.

Even if a log has been explicitly deleted (which is possible but normally not the case), the previous pipelines run (of any kind of trigger, be it push of a branch or tag [named ref] or a pull request [or multiple triggers at once with one push]) is still documented and available (in case of log deletion, just the log is missing, but all the other meta-data is still there, otherwise you see the log as the pipeline has run back then).

Maybe a screenshot helps?!:

ktomk - pipelines - Pipelines — Bitbucket - Chromium_082.png

(Bitbucket Pipelines within the Atlassian Bitbucket Cloud Browser Console)

Clicking of any of the pipelines in the list (2) brings you to the pipeline run (identified by build number) where you also find the logs.

Tuan Nguyen Anh October 2, 2020

Hi @ktomk , 

The pipeline #153 failed 4 days ago, and the log mentioned about python issues. My teammate clicked Redeploy yesterday, It worked. He told me that was the issue of BB image.

I want to check the SHA string of the image but I forgot to save the log of previous trigger and I have no information to compare itBB1.pngBB2.png

ktomk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2020

Ah, I see. This is re-run/re-deploy on a failed step only. This won't trigger a new build (number) and the logs are gone.

If you want to retain the log, re-run the entire pipeline. This gives a new build with it's own log.

I know this is not what you're currently looking for, retaining logs for each step run is not available on the UI and the REST API, albeit there is some fractal of obtaining logs per step run:

Sadly, I don't know where to obtain the `{log_uuid}` part and also the endpoint gives errors only to me and it is undocumented.

0 votes
Tuan Nguyen Anh October 2, 2020

After a day search for it, I think it's the limitation of BB. Hope we can have this feature to trace the issues.

Thanks!

Peter August 24, 2023

We need this as well.

Kristian Luck November 2, 2023

We need this as well. Based on @ktomk finding of a ..../logs/{log_uuid}, it would seem that under the covers there may be a historical record of previous step logs.

Anyone have an update on this? Is there a requested feature enhancement logged? I don't mind resorting to using the APIs directly if the dashboard doesn't have a UI for it.

Like Ljubica Kostova likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events