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

CI/CD pipeline to deploy code on local system for staging and production enviroment

manojkumar
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!
May 1, 2024

I want to create CI/CD for the .net core application with two environments staging and production. At the moment both the staging and production environments are on my system and want to save published code on the local system directory. What configuration should I need to setup? Is it possible without a runner process?

1 answer

1 vote
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 2, 2024

Hello @manojkumar and welcome to the Community!

If you are looking to deploy your code to a local server that is only accessible from your private network, then self-hosted runners would be the way to go, as they would run in your own infrastructure and have access to the private network. 

However, if you want to use the cloud runners, where the build will be executed in Atlassian infrastructure, then the server you are going to deploy the code to must be accessible from the internet and the Valid IP addresses for pipelines build environments must be allowed to connect to your server in case it's behind a firewall.

You can find more details on the differences between cloud and self-hosted runners in the following article:

Thank you, @manojkumar !

Patrik S

manojkumar
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!
May 9, 2024

Hi Patrik

Thanks for the information.

I have successfully set up the self-hosted runners and published code save in my local directory. But now self-hosted runners service status is showing offline after some time and it's not starting again automatically. Are there any configuration settings that will be used to set the self-hosted runners service online before publishing the code?

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2024

Hello @manojkumar ,

The runner will only be available while the runner agent is running in the host machine.

It's essential that the runner agent remains online and running for Bitbucket Pipelines to assign job execution to it. If you stop the runner agent or exit the process, it will become unavailable/offline in the UI and not able to run your jobs.

That being said, depending on the type of runner you are using, there are a few strategies to configure runner auto-start when the host is booted. I'm sharing below the different articles that explain this process for each type of runner:

Hope that information helps! Let us know in case you have any questions.

Thank you, @manojkumar !

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events