OctoTFS is a set of packaging and release tasks and a widget for using Octopus Deploy with Azure DevOps and Team Foundation Server (TFS).
Azure DevOps was formerly known as Visual Studio Team Services (VSTS) and Visual Studio Online (VSO).
OctoTFS is made up of several tasks to make it easy to integrate TFS and ADO with Octopus Deploy. This is packaged up as a web extension that can be installed in TFS or ADO.
To learn more about how to use the extension and custom tasks, read the VSTS README.
This extension provides a friendly interface to the Octopus CLI which does the heavy lifting to integrate.
Microsoft TFS/ADO web extensions are powered by Node.js under the hood. Simply open the repo with your favourite text editor like Jetbrains WebStorm or Visual Studio Code and you're good to go.
choco install nodejs
or brew install node@10
or web)npm install npm@latest -g
)npm install tfx-cli -g
)choco install golang
or brew install go
or web)go get github.com/tj/node-prune
)choco install powershell-core
or brew cask install powershell
or web (google it...))NOTE: PowerShell is required if you intend to publish the extension either to a local TFS instance or otherwise.
Microsoft's web extension tooling is cross platform so you can run this on Windows or macOS.
Build
Run the following at a commandline.
npm install --no-save
npm run build
This will generate the full extension content required to create the extension VSIX.
Packaging
In order to package and test the extension on a local TFS instance, without publishing to the marketplace, you can run the following at a PowerShell command prompt.
./pack.ps1 -environment localtest -version "x.x.x"
To create a new release:
PACKAGE_VERSION
variable value in the build.yml. Bump the major/minor as appropriate for the changes being released (this will require another branch/PR because of RBAC). :warning: DO NOT bump these numbers prior to the release going out, branch builds can impact each other if they do this because the marketplace enforces forward only on version numbers and it is imperative that all currently active branches use the same major.minor values.PACKAGE_VERSION
and the run number, remembering to prefix the release with a v
. The pipeline will automate things from once the GitHub release is created.If you're doing updates, enhancements, or bug fixes, the fastest development flow is to code locally, build, package and deploy locally. Once your changes are stable, it's a good idea to deploy to Test for further testing, and finally Production.
It's highly recommended to set up two Virtual Machines running Windows Server. This is generally done locally, and it's best to give your VM at least 8 gigs of memory and 4 CPU cores, otherwise the TFS/ADO installation can fail or take hours.
To install locally, build and package the application as per the instructions above. Then install the extension by uploading it. Instructions to do this are available in Microsoft's TFS/ADO docs.
http://<server name/ip>:8080/tfs/
http://<server name/ip>:8080/tfs/_gallery/manage
localtest
extension first and use it in your builds. Then you can upgrade it and you will get your latest changes.localtest
and create build pipelines covering the areas you're changing. Then update the extension and re-run all your builds to ensure everything is still green/working.devops@...
account has access for publishing to test and production environments (if you try to do this from your personal account, publishing will fail). When you create your security tokens, do this from the devops account and either setup an expiry and/or remove the token when you are finished with it.Web
, click that and it'll take you to the problem), see that it's failing on all the steps related to v4 of our octo tool, run the same task again (as new) (don't re-run the existing task that's failed), wait for that to succeed, then re-run our task in deployHQ and it will then succeed. We want to allocate time to investigate why this is so awkward, but for now, we're documenting here for discoverability.Octopus staff can publish an extension for testing which is wired up to a test Azure DevOps organization. This is a great area for further live testing against the latest and greatest release of Azure DevOps.
NOTE: See the OctopusHQ Confluence for further details on gaining access to the Azure DevOps (aka VSTS) test environment.
Octopus staff can publish an extension for production use.
NOTE: See the OctopusHQ Confluence for further details on gaining access to the Azure DevOps (aka VSTS) production/live environment.