Variables are used for values that will change depending on where the project is deployed. In this video we look at the settings in our web.config file and create a variable in Octopus to update one of the settings.
- [Instructor] As we talked about earlier,…variables can be used for values that will change,…depending on where the project is deployed.…We need to look at our app…to know what variables we should add.…Here we have our project open in Visual Studio.…All of the settings for this app are in the web.config file.…Here we can see that we have…a connection string and some app settings.…If we want a setting to be updated by Octopus,…we make the variable name the same as the setting name.…
To keep things simple,…we are going to create a variable…for the current environment setting.…The environment variable…is used to display the name of the environment…on the front page of the application.…The environment is currently set to dev.…When we deploy the app,…we should see the setting change to production.…Let's run the project now,…so that you can see what the page looks like…before we deploy it.…Here at the top of the screen right next to asp.net,…you can see we have environment:dev.…
The dev came from the app setting in the web config file.…
- What is Octopus Deploy?
- Working with the Octopus server and tentacles
- Using variables to scope configuration items such as roles and targets
- Installing and configuring Octopus Deploy
- Deploying a sample application
- Configuring a build server, adding a project, and creating a release
- Controlling release flow with life cycles and channels