简体   繁体   中英

Get Octopus Deploy release number from a C# WinForms app

We use Octopus Deploy to deploy our apps. It would be very useful if my WinForm app could display the Octopus Deploy release number at run time.

Is it possible to setup Octopus Deploy so that it sets a variable stored in the app.config to the Octopus.Release.Number system variable, so I can retrieve the release number at run time?

According to Variable substitution in files with Octopus 2.3 and System Variables you can:

  • Use <add key="OctopusReleaseNumber"value="#{Octopus.Release.Number}" /> in your config
  • Enable variable substitution
  • Configure this for the appropriate configuration file

Then you can read the substituted value from code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM