Commit d3de4bec authored by jayed nahian's avatar jayed nahian
Browse files

commit-3

parent 7746e483
Pipeline #8086 canceled with stage
create_file: stages:
- deploy
before_script:
# Commands to be run before any job
- rm -rf node_modules
- rm -f package-lock.json
- npm install
deploy_job:
stage: deploy
variables:
SECURE_FILES_DOWNLOAD_PATH: './android/'
VERSION_NAME: '4.4.2'
APK_NAME_PREFIX: 'testApp'
APK_NAME: $APK_NAME_PREFIX'_'$VERSION_NAME'_'$(date '+%d%B')
script: script:
- echo "This is a placeholder job to create necessary files." - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- export JAVA_HOME=$(/usr/libexec/java_home -v 11)
- npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
- cd android
- rm -rf ./app/src/main/res/**/node_modules_* ./app/src/main/res/**/app_assets* ./app/src/main/res/**/assets* ./app/src/main/res/**/app*
- rm -rf ./.gradle/6.8.3/executionHistory/executionHistory.lock
- echo "sdk.dir=/Users/tltestuser/Library/Android/sdk" > local.properties
- ./gradlew assembleRelease
- find ./app/build/outputs/apk/release -type f -name "*.apk"
- cd app/build/outputs/apk/release
- mv app-release.apk $APK_NAME_PREFIX"_"$VERSION_NAME"_"$(date '+%d%B').apk
# - mv app-x86-*.apk $APK_NAME_PREFIX"_"$VERSION_NAME"_"$(date '+%d%B')_x86.apk
# - mv app-arm64-*.apk $APK_NAME_PREFIX"_"$VERSION_NAME"_"$(date '+%d%B')_arm64.apk
# - mv app-armeabi-*.apk $APK_NAME_PREFIX"_"$VERSION_NAME"_"$(date '+%d%B')_armeabi.apk
# - mv app-x86_64-*.apk $APK_NAME_PREFIX"_"$VERSION_NAME"_"$(date '+%d%B')_x86_64.apk
- scp -i /Users/tltestuser/Downloads/ndot_key_14012025 -P 3716 *.apk custodian@n.trucklagbe.com:/var/www/n.trucklagbe.com/html/APK/QO/
except:
- pushes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment