Fakultas Ilmu Komputer UI

Commit a5b84ae0 authored by Nandhika Prayoga's avatar Nandhika Prayoga
Browse files

[CHORES] Clean CI/CD script

parent 62fc9c8f
Pipeline #39360 passed with stages
in 65 minutes and 5 seconds
......@@ -10,6 +10,7 @@ before_script:
API_MAIN_URL=$PRODUCTION_API_MAIN_URL
fi
- echo -e "API_MAIN_URL=${API_MAIN_URL}" >> .env
- export ANDROID_SDK_ROOT=/usr/lib/android-sdk
cache:
key: ${CI_COMMIT_REF_SLUG}
......@@ -35,19 +36,8 @@ test:
build:
stage: build
before_script:
- export ANDROID_SDK_ROOT=/usr/lib/android-sdk
script:
- npm i
- >
if [[ "${CI_COMMIT_REF_NAME}" == "staging" ]];
then
API_MAIN_URL=$STAGING_API_MAIN_URL
elif [[ "${CI_COMMIT_REF_NAME}" == "master" ]];
then
API_MAIN_URL=$PRODUCTION_API_MAIN_URL
fi
- echo -e "API_MAIN_URL=${API_MAIN_URL}" >> .env
- cd android
- echo -e "RELEASE_STORE_FILE=${RELEASE_STORE_FILE}\nRELEASE_STORE_PASSWORD=${RELEASE_STORE_PASSWORD}\nRELEASE_KEY_ALIAS=${RELEASE_KEY_ALIAS}\nRELEASE_KEY_PASSWORD=${RELEASE_KEY_PASSWORD}" >> local.properties
- chmod +x gradlew && ./gradlew assembleRelease
......
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