Tutorial - Setup continuous build/test/deployment to Firebase Hosting using GitLab CI

#1

A continuous build and test pipeline is a fundamental building block of good software engineering practices. This tutorial goes through setting up and automated build, test and deploy pipleline using the GitLab continuous integration service

https://apporchestra.com/post/2019/ionic-4-gitlab-ci/

#2

Three errors so far.

1:

Lets create an default Ionic v4 starter project using the tabs layout:
ionic start –type angular myProject tabs

\ Looking up starter
[ERROR] Unable to find starter template for angular

I removed –type angular

2:

You’ll notice the npm run test command doesn’t exit, it watches for any changes and then run the tests again.

$ npm run test

myProject@0.0.1 test D:\myProject
ng test

10% building modules 1/1 modules 0 active13 01 2019 19:46:07.838:WARN [karma]: No captured browser, open http://localhost:9876/
13 01 2019 19:46:07.845:INFO [karma-server]: Karma v3.1.4 server started at http://0.0.0.0:9876/
13 01 2019 19:46:07.845:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
13 01 2019 19:46:07.852:INFO [launcher]: Starting browser Chrome
13 01 2019 19:46:21.285:WARN [karma]: No captured browser, open http://localhost:9876/
13 01 2019 19:46:21.830:INFO [Chrome 71.0.3578 (Windows 10.0.0)]: Connected on socket KNpzSRYfb5O9udlNAAAA with id 65405888
Chrome 71.0.3578 (Windows 10.0.0): Executed 6 of 6 SUCCESS (0.21 secs / 0.196 secs)
TOTAL: 6 SUCCESS
TOTAL: 6 SUCCESS

3

So lets update the package.json file to add a new test script

“test-ci”: “ng test --watch=false”

This was my error but I suggest you say it has to go within the “scripts” section of the json fie.

#3

I got as far as pushing the master into gitlab and then gave up for the night.

I am not even sure what “automated Continuous Integration and Deployment” is trying to achieve - is it overkill for a small test project?

#4

Thanks for your feedback, I’ve made the couple of changes to the post.

If you had to write it from scratch it could be overkill for a small test project, but if its already done for you its useful for any real project.