taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 6ea2b602afd154cead6ecbe9728735dc936776d7
parent 2b3d389658d581b30cf3637196c47939f3fe4e31
Author: Iván Ávalos <avalos@disroot.org>
Date:   Fri, 21 Jun 2024 12:07:21 -0600

Remove unnecessary pipeline steps

Diffstat:
Acontrib/ci/jobs/1-wallet-deploy/deploy.sh | 46++++++++++++++++++++++++++++++++++++++++++++++
Rcontrib/ci/jobs/2-wallet-deploy/job.sh -> contrib/ci/jobs/1-wallet-deploy/job.sh | 0
Dcontrib/ci/jobs/1-wallet-test/job.sh | 6------
Dcontrib/ci/jobs/1-wallet-test/test.sh | 4----
Acontrib/ci/jobs/2-cashier-deploy/deploy.sh | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rcontrib/ci/jobs/4-cashier-deploy/job.sh -> contrib/ci/jobs/2-cashier-deploy/job.sh | 0
Dcontrib/ci/jobs/2-wallet-deploy/deploy.sh | 45---------------------------------------------
Dcontrib/ci/jobs/3-cashier-test/job.sh | 6------
Dcontrib/ci/jobs/3-cashier-test/test.sh | 4----
Acontrib/ci/jobs/3-merchant-terminal-deploy/deploy.sh | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rcontrib/ci/jobs/7-merchant-terminal-deploy/job.sh -> contrib/ci/jobs/3-merchant-terminal-deploy/job.sh | 0
Dcontrib/ci/jobs/4-cashier-deploy/deploy.sh | 55-------------------------------------------------------
Dcontrib/ci/jobs/5-merchant-lib-test/job.sh | 6------
Dcontrib/ci/jobs/5-merchant-lib-test/test.sh | 4----
Dcontrib/ci/jobs/6-merchant-terminal-test/job.sh | 6------
Dcontrib/ci/jobs/6-merchant-terminal-test/test.sh | 4----
Dcontrib/ci/jobs/7-merchant-terminal-deploy/deploy.sh | 59-----------------------------------------------------------
17 files changed, 160 insertions(+), 199 deletions(-)

diff --git a/contrib/ci/jobs/1-wallet-deploy/deploy.sh b/contrib/ci/jobs/1-wallet-deploy/deploy.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/wallet" +APK_PATH="wallet/build/outputs/apk/nightly/release" + +# Ensure that keys exist +[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 +[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 + +set +x +DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") +set -x + +# Copy keystore where SDK can find it +cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore + +# Test and build the APK +./gradlew :wallet:check :wallet:assembleNightlyRelease + +# Copy the APK to artifacts folder +mkdir -p "${ARTIFACT_PATH}" +cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" + +# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) +cp "${APK_PATH}"/*.apk wallet-debug.apk + +# Install fdroidserver and dependencies +apt update +apt-get -qy install --no-install-recommends \ + python3-pip \ + openssh-client \ + rsync +python3 -m pip install --upgrade pip wheel setuptools +python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git +fdroid --version + +# Deploy APK to nightly repository +export DEBUG_KEYSTORE +export CI= +export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" +export CI_PROJECT_PATH="gnu-taler/fdroid-repo" +export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" +export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" + +fdroid nightly -v --archive-older 6 diff --git a/contrib/ci/jobs/2-wallet-deploy/job.sh b/contrib/ci/jobs/1-wallet-deploy/job.sh diff --git a/contrib/ci/jobs/1-wallet-test/job.sh b/contrib/ci/jobs/1-wallet-test/job.sh @@ -1,6 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -job_dir=$(dirname "${BASH_SOURCE[0]}") - -"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/1-wallet-test/test.sh b/contrib/ci/jobs/1-wallet-test/test.sh @@ -1,4 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -./gradlew :wallet:check :wallet:assembleRelease diff --git a/contrib/ci/jobs/2-cashier-deploy/deploy.sh b/contrib/ci/jobs/2-cashier-deploy/deploy.sh @@ -0,0 +1,55 @@ +#!/bin/bash +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/cashier" +APK_PATH="cashier/build/outputs/apk/release" + +# Ensure that keys exist +[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 +[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 + +set +x +DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") +set -x + +# Copy keystore where SDK can find it +cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore + +# Rename nightly app +sed -i 's,<string name="app_name">.*</string>,<string name="app_name">Cashier Nightly</string>,' cashier/src/main/res/values*/strings.xml + +# Set time-based version code +export versionCode=$(date '+%s') +sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," cashier/build.gradle + +# Set nightly application ID +sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.cashier.nightly\"," cashier/build.gradle + +# Test and build the APK +./gradlew :cashier:test :cashier:assembleRelease + +# Copy the APK to artifacts folder +mkdir -p "${ARTIFACT_PATH}" +cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" + +# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) +cp "${APK_PATH}"/*.apk cashier-debug.apk + +# Install fdroidserver and dependencies +apt update +apt-get -qy install --no-install-recommends \ + python3-pip \ + openssh-client \ + rsync +python3 -m pip install --upgrade pip wheel setuptools +python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git +fdroid --version + +# Deploy APK to nightly repository +export DEBUG_KEYSTORE +export CI= +export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" +export CI_PROJECT_PATH="gnu-taler/fdroid-repo" +export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" +export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" +fdroid nightly -v --archive-older 6 diff --git a/contrib/ci/jobs/4-cashier-deploy/job.sh b/contrib/ci/jobs/2-cashier-deploy/job.sh diff --git a/contrib/ci/jobs/2-wallet-deploy/deploy.sh b/contrib/ci/jobs/2-wallet-deploy/deploy.sh @@ -1,45 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/wallet" -APK_PATH="wallet/build/outputs/apk/nightly/release" - -# Ensure that keys exist -[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 -[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 - -set +x -DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") -set -x - -# Copy keystore where SDK can find it -cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore - -# Build the APK -# ./gradlew :wallet:assembleNightlyRelease - -# Copy the APK to artifacts folder -mkdir -p "${ARTIFACT_PATH}" -cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" - -# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) -cp "${APK_PATH}"/*.apk wallet-debug.apk - -# Install fdroidserver and dependencies -apt update -apt-get -qy install --no-install-recommends \ - python3-pip \ - openssh-client \ - rsync -python3 -m pip install --upgrade pip wheel setuptools -python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git -fdroid --version - -# Deploy APK to nightly repository -export DEBUG_KEYSTORE -export CI= -export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" -export CI_PROJECT_PATH="gnu-taler/fdroid-repo" -export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" -export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" -fdroid nightly -v --archive-older 6 diff --git a/contrib/ci/jobs/3-cashier-test/job.sh b/contrib/ci/jobs/3-cashier-test/job.sh @@ -1,6 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -job_dir=$(dirname "${BASH_SOURCE[0]}") - -"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/3-cashier-test/test.sh b/contrib/ci/jobs/3-cashier-test/test.sh @@ -1,4 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -./gradlew :cashier:check :cashier:assembleRelease diff --git a/contrib/ci/jobs/3-merchant-terminal-deploy/deploy.sh b/contrib/ci/jobs/3-merchant-terminal-deploy/deploy.sh @@ -0,0 +1,59 @@ +#!/bin/bash +set -exuo pipefail + +ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/merchant-terminal" +APK_PATH="merchant-terminal/build/outputs/apk/release" + +# Ensure that keys exist +[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 +[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 + +set +x +DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") +set -x + +# Copy keystore where SDK can find it +cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore + +# Rename nightly app +sed -i 's,<string name="app_name">.*</string>,<string name="app_name">Merchant PoS Nightly</string>,' merchant-terminal/src/main/res/values*/strings.xml + +# Set time-based version code +export versionCode=$(date '+%s') +sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," merchant-terminal/build.gradle + +# Add commit to version name +export versionName=$(git rev-parse --short=7 HEAD) +sed -i "s,^\(\s*versionName\ *\"[0-9].*\)\",\1 ($versionName)\"," merchant-terminal/build.gradle + +# Set nightly application ID +sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.merchantpos.nightly\"," merchant-terminal/build.gradle + +# Test and build the APK +./gradlew :merchant-lib:check :merchant-terminal:check :merchant-terminal:assembleRelease + +# Copy the APK to artifacts folder +mkdir -p "${ARTIFACT_PATH}" +cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" + +# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) +cp "${APK_PATH}"/*.apk merchant-terminal-debug.apk + +# Install fdroidserver and dependencies +apt update +apt-get -qy install --no-install-recommends \ + python3-pip \ + openssh-client \ + rsync +python3 -m pip install --upgrade pip wheel setuptools +python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git +fdroid --version + +# Deploy APK to nightly repository +export DEBUG_KEYSTORE +export CI= +export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" +export CI_PROJECT_PATH="gnu-taler/fdroid-repo" +export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" +export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" +fdroid nightly -v --archive-older 6 diff --git a/contrib/ci/jobs/7-merchant-terminal-deploy/job.sh b/contrib/ci/jobs/3-merchant-terminal-deploy/job.sh diff --git a/contrib/ci/jobs/4-cashier-deploy/deploy.sh b/contrib/ci/jobs/4-cashier-deploy/deploy.sh @@ -1,55 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/cashier" -APK_PATH="cashier/build/outputs/apk/release" - -# Ensure that keys exist -[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 -[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 - -set +x -DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") -set -x - -# Copy keystore where SDK can find it -cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore - -# Rename nightly app -sed -i 's,<string name="app_name">.*</string>,<string name="app_name">Cashier Nightly</string>,' cashier/src/main/res/values*/strings.xml - -# Set time-based version code -export versionCode=$(date '+%s') -sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," cashier/build.gradle - -# Set nightly application ID -sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.cashier.nightly\"," cashier/build.gradle - -# Build the APK -./gradlew :cashier:assembleRelease - -# Copy the APK to artifacts folder -mkdir -p "${ARTIFACT_PATH}" -cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" - -# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) -cp "${APK_PATH}"/*.apk cashier-debug.apk - -# Install fdroidserver and dependencies -apt update -apt-get -qy install --no-install-recommends \ - python3-pip \ - openssh-client \ - rsync -python3 -m pip install --upgrade pip wheel setuptools -python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git -fdroid --version - -# Deploy APK to nightly repository -export DEBUG_KEYSTORE -export CI= -export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" -export CI_PROJECT_PATH="gnu-taler/fdroid-repo" -export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" -export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" -fdroid nightly -v --archive-older 6 diff --git a/contrib/ci/jobs/5-merchant-lib-test/job.sh b/contrib/ci/jobs/5-merchant-lib-test/job.sh @@ -1,6 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -job_dir=$(dirname "${BASH_SOURCE[0]}") - -"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/5-merchant-lib-test/test.sh b/contrib/ci/jobs/5-merchant-lib-test/test.sh @@ -1,4 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -./gradlew :merchant-lib:check diff --git a/contrib/ci/jobs/6-merchant-terminal-test/job.sh b/contrib/ci/jobs/6-merchant-terminal-test/job.sh @@ -1,6 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -job_dir=$(dirname "${BASH_SOURCE[0]}") - -"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/6-merchant-terminal-test/test.sh b/contrib/ci/jobs/6-merchant-terminal-test/test.sh @@ -1,4 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -./gradlew :merchant-terminal:check :merchant-terminal:assembleRelease diff --git a/contrib/ci/jobs/7-merchant-terminal-deploy/deploy.sh b/contrib/ci/jobs/7-merchant-terminal-deploy/deploy.sh @@ -1,59 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -ARTIFACT_PATH="/artifacts/taler-android/${CI_COMMIT_REF}/merchant-terminal" -APK_PATH="merchant-terminal/build/outputs/apk/release" - -# Ensure that keys exist -[[ ! -f "${FDROID_REPO_KEY}" ]] && exit -1 -[[ ! -f "${NIGHTLY_KEYSTORE}" ]] && exit -1 - -set +x -DEBUG_KEYSTORE=$(cat "$FDROID_REPO_KEY") -set -x - -# Copy keystore where SDK can find it -cp "${NIGHTLY_KEYSTORE}" /root/.android/debug.keystore - -# Rename nightly app -sed -i 's,<string name="app_name">.*</string>,<string name="app_name">Merchant PoS Nightly</string>,' merchant-terminal/src/main/res/values*/strings.xml - -# Set time-based version code -export versionCode=$(date '+%s') -sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," merchant-terminal/build.gradle - -# Add commit to version name -export versionName=$(git rev-parse --short=7 HEAD) -sed -i "s,^\(\s*versionName\ *\"[0-9].*\)\",\1 ($versionName)\"," merchant-terminal/build.gradle - -# Set nightly application ID -sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.merchantpos.nightly\"," merchant-terminal/build.gradle - -# Build the APK -./gradlew :merchant-terminal:assembleRelease - -# Copy the APK to artifacts folder -mkdir -p "${ARTIFACT_PATH}" -cp "${APK_PATH}"/*.apk "${ARTIFACT_PATH}" - -# Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) -cp "${APK_PATH}"/*.apk merchant-terminal-debug.apk - -# Install fdroidserver and dependencies -apt update -apt-get -qy install --no-install-recommends \ - python3-pip \ - openssh-client \ - rsync -python3 -m pip install --upgrade pip wheel setuptools -python3 -m pip install git+https://gitlab.com/fdroid/fdroidserver.git -fdroid --version - -# Deploy APK to nightly repository -export DEBUG_KEYSTORE -export CI= -export CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" -export CI_PROJECT_PATH="gnu-taler/fdroid-repo" -export GITLAB_USER_NAME="$(git log -1 --pretty=format:'%an')" -export GITLAB_USER_EMAIL="$(git log -1 --pretty=format:'%ae')" -fdroid nightly -v --archive-older 6