Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why do I keep loosing the session of cloud foundry cli in my pipeline?



in my pipeline I'm loggin into my cloud foundry account with:

cf login -a ${CF_API} -u ${CF_USERNAME} -p ${CF_PASSWORD} -o "MyOrgName" -s ${SPACE}

(the variables are taken from the BitBucket variables)

The login itself works, but sometimes it seems that I loose the session because I get an error from the client when I execute cf push:

Not logged in. Use 'cf login' to log in.

This happens sometimes even right after I have executed the cf login command. I have that issue quite some time with several versions of the Cloud Foundry CLI therefore I have implemented a script which checks if a cf command fails and then logs in again, but even the check if the log was successful sometimes fails with the mentioned error message even if it shows in the logs that it was successful. At the moment I'm using version 6.41.0 of the Cloud Foundry CLI. I don't have that issue on my local system, never had, it seems to appear only in my pipeline script.

Does anyone have similar issues with other clients or does anyone have the same issues?

Should I login differently within a pipeline or do I miss something else?


Any help is appreciated.




1 answer

0 votes

Hi Fabian,

Can you provide an example of your bitbucket-pipelines.yml?

Are you running all your Cloud Foundry commands in the same step? Pipelines does not persist state across steps. So you'll need to log in again if you run commands across several steps.

You can also try to run your commands in a similar environment as Pipelines locally, using Docker. Then you'll be running the Cloud Foundry CLI with the same version as in Pipelines.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

712 views 15 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you