Sign inSign up

stutya/ionic

By stutya

•Updated over 6 years ago

Build APK for Ionic 1/2/3/4 Cordova Apps.

Image
0

50K+

stutya/ionic repository overview

MIT licensed Docker Hub

⁠Build APK for Ionic 1/2/3/4 Cordova App from Gitlab

  1. Create a .gitlab-ci.yml similar to the following:
image: stutya/ionic:latest

stages:
  - deploy

cache:
  untracked: true
  key: "$CI_PROJECT_ID"
  paths:
    - node_modules/

build_android:
  stage: deploy
  only:
    - master
    // - <another-branch> // Put applicable branches here.
  script:
    - npm i
    - ionic cordova platform rm android
    - ionic cordova platform add android
    - ionic cordova build android
    - cp platforms/android/app/build/outputs/apk/*/*.apk ../app.apk
  artifacts:
    paths:
      - app.apk

It should build the APK and will be available to download.

⁠Build APK for Ionic 4/5 Capacitor App from Gitlab

  1. Create a .gitlab-ci.yml similar to the following:
image: stutya/ionic:latest

stages:
  - deploy
  
cache:
  untracked: true
  key: "$CI_PROJECT_ID"
  paths:
    - node_modules/
    
build_android:
  stage: deploy
  only:
    - master
    - ci-test
  script:
    - npm i
    - npm run build
    - npx cap sync android
    - cd android/ && ./gradlew assembleRelease
    - cp ./app/build/outputs/apk/*/*.apk ../app.apk
  artifacts:
    paths:
      - app.apk

It should build the APK and will be available to download.

Tag summary

Content type

Image

Digest

Size

642 MB

Last updated

over 6 years ago

docker pull stutya/ionic