From f30f1f47d5f852d39e4277299fcc9464cd574124 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 26 Mar 2019 15:08:50 +0100 Subject: [PATCH] Gitlab CI (#498) --- .gitignore | 2 ++ .gitlab-ci.yml | 57 +++++++++++++++++++++++++++++++++++ .gitsecret/keys/mapping.cfg | 0 .gitsecret/keys/pubring.kbx | Bin 0 -> 4929 bytes .gitsecret/keys/pubring.kbx~ | Bin 0 -> 2481 bytes .gitsecret/keys/trustdb.gpg | Bin 0 -> 1200 bytes .gitsecret/paths/mapping.cfg | 1 + lbry-android.keystore.secret | Bin 0 -> 2736 bytes release.sh | 4 +-- 9 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100644 .gitsecret/keys/mapping.cfg create mode 100644 .gitsecret/keys/pubring.kbx create mode 100644 .gitsecret/keys/pubring.kbx~ create mode 100644 .gitsecret/keys/trustdb.gpg create mode 100644 .gitsecret/paths/mapping.cfg create mode 100644 lbry-android.keystore.secret diff --git a/.gitignore b/.gitignore index fd39e4f..012766b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ src/main/assets/index.android.bundle.meta *.log .vagrant +lbry-android.keystore +.gitsecret/keys/random_seed diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8fd6e17 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,57 @@ +stages: + - build + - deploy + - release + +build apk: + stage: build + image: lbry/android-base:latest + before_script: + - export BUILD_VERSION=$(cat $CI_PROJECT_DIR/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+') + artifacts: + paths: + - bin/browser-*-release.apk + script: + - export PATH=/usr/bin:$PATH + - echo "$PGP_PRIVATE_KEY" | gpg --batch --import + - cd app + - npm install + - cd .. + - wget -q 'https://eu.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz' -P ~/.buildozer/android/ + - tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/ + - rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9 + - ln -s ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21 ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9 + - cp -f $CI_PROJECT_DIR/scripts/build-target-python.sh ~/.buildozer/android/crystax-ndk-10.3.2/build/tools/build-target-python.sh + - rm ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz + - git secret reveal + - mv buildozer.spec.travis buildozer.spec + - "./release.sh | grep -Fv -e 'working:' -e 'copy' -e 'Compiling' --line-buffered" + - cp $CI_PROJECT_DIR/bin/browser-$BUILD_VERSION-release.apk /dev/null + +deploy build.lbry.io: + image: python:latest + stage: deploy + dependencies: + - build apk + before_script: + - pip install awscli + - export BUILD_VERSION=$(cat $CI_PROJECT_DIR/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+') + - export BUILD_APK_FILENAME=browser-$BUILD_VERSION-release.apk + script: + - aws s3 cp bin/$BUILD_APK_FILENAME s3://build.lbry.io/android/build-${CI_JOB_ID}_commit-${CI_COMMIT_SHA:0:7}/$BUILD_APK_FILENAME + - aws s3 cp bin/$BUILD_APK_FILENAME s3://build.lbry.io/android/push.apk + +release apk: + image: python:latest + stage: release + only: + - tags + dependencies: + - build apk + before_script: + - pip install awscli githubrelease + - export BUILD_VERSION=$(cat $CI_PROJECT_DIR/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+') + - export BUILD_APK_FILENAME=browser-$BUILD_VERSION-release.apk + script: + - githubrelease release lbryio/lbry-android create $CI_COMMIT_TAG --publish bin/$BUILD_APK_FILENAME + - aws s3 cp bin/$BUILD_APK_FILENAME s3://build.lbry.io/android/latest.apk diff --git a/.gitsecret/keys/mapping.cfg b/.gitsecret/keys/mapping.cfg new file mode 100644 index 0000000..e69de29 diff --git a/.gitsecret/keys/pubring.kbx b/.gitsecret/keys/pubring.kbx new file mode 100644 index 0000000000000000000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>c*K8aJL9b8c9`|ZoiK+(!oVV)s`j4l^MG$)=1iSuizp+irK4c`kht@+IbqR zhS0A#9gIRA=TwzmtvF%P z3g8+BI(KX=ldyO0FBkf;MXkhaXGj~0fQ|<^FbSPXnSs7OYSLcF2weD<0v;NV(uAnatYfO#=x za`w20_|{E=_mWxwd+csD(GXdflJtiQq^?U?;S0%#eZpKMpx65P4GK23bszo#rOgI! z9*yCj(5x?*SeX<;AsoTx-M6xqjy~MIM#0+E?nX~S{Tk9;KGxb5kL@I;N6apBUEKG^ z&r^(m7k}jCDLcvzYO(36J?jH0L~$1u1@q$it}PXU@)0Xp>9&HI3qExiJ4W>LWvnUa z8@%GJFt8%ppOduZ^Eqskt$${>CEl<(hL5YwTuu7f=W`2?&<2p(Q>-=gd3;;&#FGpJ z>VEf^%HvJ)VZb4vb8dsMt3+#hV6MTv18Hn@CB7?*TnI&pctWqK6T-hr1*UY8Ft@PQ z?zQ(G-kq@Rj-O4@gKSd;j+n348wD5oLAvXjMyhBG-|S9BM6XKLj&5Z~Ke^Hhframy zgr0FjG5NhD*~;Pe*ToDg)s`2vhf3bxkk_BLzk&A$DBsn0Hr(~o@S;k&OiRLfr{i;_ GYW@%4hSE*| literal 0 HcmV?d00001 diff --git a/.gitsecret/keys/pubring.kbx~ b/.gitsecret/keys/pubring.kbx~ new file mode 100644 index 0000000000000000000000000000000000000000..64baf5a663e8253859b462deea063dee235c105e GIT binary patch literal 2481 zcmai!c{J4PAIHBl#xjGDCC0^=x=o5n26vQUhHPcYk}O%KFvM_C*6g>ECHodpmUPRK zEHhcgOrm6$t&B(wvM1}3%I;0l&~N{`~c$xv95wm7u0rrHq-bgR5VpAAH+y{$|*DE>HWzhd-rM zh*xD=j$z}N7Z7Kf@dU3?clpVH_6Ord;(+zCxhT6!`tzKl1i7}`MZSXr@nE=qKE$uW zMXW--&+brw(W=5gpejBm;MqMSQ}W#L_Bx*+)ov=qelhz2+?#&Q4)>L_%?sKd(9}17 zrA2HkjqfqmqEl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V!-HkSijc8$>Y|T->8g@3H;-BZj z-L&H@W#?jR=lpUrU?dPC)rY_Q9I5AiU%`b z!sj2WrDlIjhZbpk4o{%eg#pE}eH==x$k%Vf-C{DjrUbp?^0!BVP4Y}*q%;p9| zVQTnf-P2h%+FNV&0?J)(PERJ*X`zK4g8c1TrN7rtO+~7vReEa4X|B1HTjd)rUwdUS z_VuuxE|3ZtMr^ge-wXhn-LgKmk&U}q{{oksn?@*|?0ojPCpQPMl{<-J2U1!ihT2Zz zIkcd7U_B_1?=xs}-6`f>hoRMw7+B?O~hFssr>r?uv=*}FsLii>ud z;-_6re#JHj@fqIzADx}w1!`xjZ6oV>ovrD-`|8me@||&=(~=P7|DevA*I5#xPYNRv z>PrnRJi_741_E^({>w=l<-Jq4X_8o)z-omQxD)uD@Ytg2G9C9m zLWB3m=#v78+^0R8Q=D`D2exi05GEZ1ky=V+FLUi+ zhP%9bFoAqZ2yF!c3xnsvepZzIEec<9IG?AjOqhazA!Pqe(vgtC$|#cO*$D$}hPF-o z#qb*Ok7lgO-S{3tF}PAkAjIu0Tiu}aWiYF@j-drdc3A)qy4DRyNXO`-%0iBwTq9D2 qv|YzX^i?|{Ys}=<2f(Bn$CD~``$`KqEQrQw)X(V5z-nu(3=CzsR7CFp literal 0 HcmV?d00001 diff --git a/release.sh b/release.sh index 6e38849..506bf74 100755 --- a/release.sh +++ b/release.sh @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash cd app react-native bundle --platform android --dev false --entry-file src/index.js --bundle-output ../src/main/assets/index.android.bundle --assets-dest ../src/main/res/ cd .. version=$(cat src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+') -buildozer android release +buildozer android release <<< y jarsigner -verbose -sigalg SHA1withRSA \ -digestalg SHA1 \ -keystore lbry-android.keystore \