Skip to content

Instantly share code, notes, and snippets.

@lennonjesus
Created December 7, 2017 16:06
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save lennonjesus/a6d037eb11e759a2e839b91a876d5fdd to your computer and use it in GitHub Desktop.
Save lennonjesus/a6d037eb11e759a2e839b91a876d5fdd to your computer and use it in GitHub Desktop.
Gitlab CI - Build Ionic 3 Project and generates apk files
# Gitlab CI - Build Ionic 3 Project and generates apk files
image: beevelop/ionic:latest
stages:
- deploy
cache:
untracked: true
key: "$CI_PROJECT_ID"
paths:
- node_modules/
build_android:
stage: deploy
only:
- develop
script:
- ls
- npm i
- ionic cordova platform rm android
- ionic cordova platform add android
- ionic cordova build android
- ls ./platforms/android/build/outputs/apk/android*.apk
artifacts:
paths:
- platforms/android/build/outputs/apk
@cjreysayago
Copy link

Thanks for this example!

@saber13812002
Copy link

This means if i have my ionic source in gitlab then copy this script into yml as pipeline then i can have apk after commit?

@lennonjesus
Copy link
Author

This means if i have my ionic source in gitlab then copy this script into yml as pipeline then i can have apk after commit?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment