Steps for a CI build in Visual Studio Team Services?


#1

I’ve got an app I’d like to start publishing, but I want to leverage a continuous integration build from the start. I have access to Visual Studio Team Services (their online hosting, issue mgmt & build service), so I’d like to try that first. Has anyone created, or know of, a description of how to set up the full ionic build in VSTS?

I’m working my way through it, but am getting stuck when trying to run cordova itself. There is a “cordova build” step template available, but it’s failing for me with this:

Task : Cordova Build
Description : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
Version : 1.3.11
Author : Microsoft Corporation
Help : More Information

Module cache at C:\cordova\node_modules
cordova@6.0.0 already installed.
Module cache at C:\cordova\node_modules
cordova@6.0.0 already installed.
Adding support plugin.
Subproject Path: CordovaLib
Processing res/native for android
TypeError: cordovaProject.projectConfig.getFileResources is not a function
at updateFileResources (d:\a\1\s\source\ionic\platforms\android\cordova\lib\prepare.js:408:46)
at d:\a\1\s\source\ionic\platforms\android\cordova\lib\prepare.js:51:9
at _fulfilled (d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:816:13)
at d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:624:44
at runSingle (d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (d:\a\1\s\source\ionic\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)


#2

Did you ever get a working CI build? Currently trying to do the same and running into issues with the .p12 certificate for iOS app


#3

Nope, never made any progress on this and eventually shipped my app manually. I really don’t do enough releases to warrant spending more time on this, but it’d be very nice it it worked.


#4

Ended up getting a build working if you’re still interested. Ran into issues with it fetching cordova-ios when creating the iOS platform, so I might have additional tasks you might not need. But I set up a basic CI build that pulls from the repo our project is in and uses team services hosted macOS as the build agent. For the tasks I first run an npm task on the project folder that just does “npm install”. Then I added another npm task that runs “npm install npm@latest” to fix my issue with cordova-ios. Then I added an ionic task that runs “cordova platform build ios”. Still need to add an xcode task to build/generate the ipa file for deployment but that can be in the release definition.

Let me know if that helps!