-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Authentication using health insurance apps (FastTrack) - Multiple profiles in app - Choose you own PIN for health card - Unlock locked health card - Use your own pictures in profiles (i can haz cats) - Mini-cardwall for relogin - Show prescription types - Status handling for prescriptions - Show medication dispenses - Show guide for NFC antenna position ### Changed - Reworked mainscreen - Reworked onboarding - Reworked cardwall - Switched from Room to Realm as DB - Addressed and commented on reported issue in biometric authentication ### Removed - Demo Mode
- Loading branch information
1 parent
5057ccf
commit 127cea5
Showing
714 changed files
with
47,246 additions
and
29,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
@Library('gematik-jenkins-shared-library') _ | ||
|
||
pipeline { | ||
options { | ||
disableConcurrentBuilds() | ||
buildDiscarder logRotator(artifactNumToKeepStr: '1', numToKeepStr: '5') | ||
} | ||
agent { label 'k8-android' } | ||
|
||
triggers { cron('@midnight') } | ||
|
||
environment { | ||
UNIQUE_UPLOAD_NAME = "reports_${getTimestamp()}" | ||
PATH = "/home/jenkins/agent/workspace/eRp-Android-Testautomation/google-cloud-sdk/bin:${env.PATH}" | ||
} | ||
|
||
stages { | ||
stage('Prepare python libs') { | ||
steps { | ||
sh('pip install junitparser') | ||
} | ||
} | ||
stage('Load & extract gcloud cli tool') { | ||
steps { | ||
sh('curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-394.0.0-linux-x86_64.tar.gz') | ||
sh('tar -xf google-cloud-cli-394.0.0-linux-x86_64.tar.gz') | ||
sh('./google-cloud-sdk/install.sh -q') | ||
} | ||
} | ||
stage('Authenticate with gcloud & set project') { | ||
steps { | ||
withCredentials([file(credentialsId: 'gematik-erx-app-testenv-secret-file', variable: 'CLOUD_ACCESS_JSON')]) { | ||
sh('gcloud auth activate-service-account --key-file=$CLOUD_ACCESS_JSON') | ||
} | ||
sh('gcloud config set project gematik-erx-app-testenv') | ||
sh('gcloud firebase test android models list') | ||
} | ||
} | ||
stage("Download Gradle Caches") { | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
nexusFileDownload("E-Rezept-App/Android-Cache/gradle-caches.zip", "gradle-caches.zip") | ||
sh("mkdir ${GRADLE_USER_HOME}/caches") | ||
unzip(zipFile: "gradle-caches.zip", dir: "${GRADLE_USER_HOME}/caches/") | ||
sh("chmod -R +x ${GRADLE_USER_HOME}/caches") | ||
} | ||
} | ||
} | ||
stage('Build') { | ||
steps { | ||
sh("./gradlew android:assembleGoogleTuInternalDebug -Pbuildkonfig.flavor=googleTuInternal") | ||
sh("./gradlew android:assembleGoogleTuInternalDebugAndroidTest -Pbuildkonfig.flavor=googleTuInternal") | ||
} | ||
} | ||
stage('Archive') { | ||
steps { | ||
archiveArtifacts(artifacts: 'android/build/outputs/apk/**/*.apk') | ||
} | ||
} | ||
// stage('Upload & Start Test') { | ||
// steps { | ||
// withCredentials([string(credentialsId: 'MCD_exklusive', variable: 'CLOUD_ACCESS_KEY')]) { | ||
// sh label:'Push Android build to cloud', script:''' | ||
// curl --location --request POST "https://mobiledevicecloud.t-systems-mms.eu/api/v1/test-run/execute-test-run?deviceQueries=@os='android'" \ | ||
// -H "Authorization: Bearer $CLOUD_ACCESS_KEY" \ | ||
// -F "executionType=espresso" \ | ||
// -F "runningType=coverage" \ | ||
// -F "useTestOrchestrator=true" \ | ||
// -F "clearPackageData=true" \ | ||
// -F "testApp=@./android/build/outputs/apk/androidTest/googleTuInternal/debug/android-googleTuInternal-debug-androidTest.apk" \ | ||
// -F "app=@./android/build/outputs/apk/googleTuInternal/debug/android-googleTuInternal-debug.apk" > test-result.json | ||
// ''' | ||
// } | ||
// sh('cat test-result.json') | ||
// } | ||
// } | ||
stage('Upload & Start Test') { | ||
steps { | ||
sh(''' | ||
gcloud firebase test android run \ | ||
--type=instrumentation \ | ||
--app=./android/build/outputs/apk/googleTuInternal/debug/android-googleTuInternal-debug.apk \ | ||
--test=./android/build/outputs/apk/androidTest/googleTuInternal/debug/android-googleTuInternal-debug-androidTest.apk \ | ||
--device=model=redfin,version=30 \ | ||
--use-orchestrator \ | ||
--environment-variables=clearPackageData=true \ | ||
--results-dir=$UNIQUE_UPLOAD_NAME \ | ||
--results-bucket=test-results-fe06447a10a2 || true | ||
''') | ||
} | ||
} | ||
stage('Download reporting') { | ||
steps { | ||
sh('gsutil cp gs://test-results-fe06447a10a2/$UNIQUE_UPLOAD_NAME/redfin-30-en-portrait/test_result_1.xml ./test_result_1.xml') | ||
} | ||
} | ||
} | ||
|
||
post { | ||
// always { | ||
// stage('De-Authenticate with gcloud') { | ||
// steps { | ||
// sh('./google-cloud-sdk/bin/gcloud auth ') | ||
// } | ||
// } | ||
// } | ||
// success { | ||
// script { | ||
// def result = readJSON file: 'test-result.json' | ||
// | ||
// if (result['data'].containsKey('Error reason')) { | ||
// emailext( | ||
// subject: "Android Test Run - TSys Cloud Failure", | ||
// body: '${FILE, path="test-result.json"}', | ||
// to: "[email protected],[email protected],[email protected],[email protected]" | ||
// ) | ||
// } else { | ||
// def totalNumberOfTest = result['data']['Total number of tests'] as Integer | ||
// def numberOfPassed = result['data']['Number of passed tests'] as Integer | ||
// def successRate = ((numberOfPassed / totalNumberOfTest) * 100) as Integer | ||
// | ||
// emailext( | ||
// subject: "Android Test Run - Passed ${successRate}% of ${totalNumberOfTest} tests", | ||
// body: '${FILE, path="test-result.json"}', | ||
// to: '[email protected]' | ||
// // to: "[email protected],[email protected],[email protected],[email protected]" | ||
// ) | ||
// } | ||
// } | ||
success { | ||
script { | ||
sh('python ./ci/junit-report.py test_result_1.xml > report.txt') | ||
|
||
def results = (readFile('report.txt')).split("\n\n") | ||
def subject = results[0] | ||
def body = results[1] | ||
|
||
emailext( | ||
subject: subject, | ||
body: body, | ||
to: "[email protected],[email protected],[email protected],[email protected],[email protected], [email protected]" | ||
) | ||
} | ||
} | ||
failure { | ||
emailext to: "[email protected]", | ||
subject: "Espresso Test Run - Failed", | ||
body: "" | ||
} | ||
} | ||
} | ||
|
||
def getTimestamp() { | ||
def now = new Date() | ||
return now.format("yyyyMMddHHmm"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@Library('gematik-jenkins-shared-library') _ | ||
|
||
def CREDENTIAL_ID_NEXUS = "Nexus" | ||
|
||
pipeline { | ||
options { | ||
disableConcurrentBuilds() | ||
ansiColor('xterm') | ||
copyArtifactPermission('*') | ||
} | ||
|
||
agent { label 'k8-android' } | ||
|
||
stages { | ||
stage("Download Gradle Caches") { | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
nexusFileDownload("E-Rezept-App/Android-Cache/gradle-caches.zip", "gradle-caches.zip") | ||
sh("mkdir ${GRADLE_USER_HOME}/caches") | ||
unzip(zipFile: "gradle-caches.zip", dir: "${GRADLE_USER_HOME}/caches/") | ||
sh("chmod -R +x ${GRADLE_USER_HOME}/caches") | ||
} | ||
} | ||
} | ||
|
||
stage('Build') { | ||
steps { | ||
gradleNexusCredentials( | ||
{ | ||
sh label: "starting build...", script: "./gradlew assembleGoogleTuInternalDebug -Pbuildkonfig.flavor=googleTuInternal" | ||
}, | ||
CREDENTIAL_ID_NEXUS) | ||
} | ||
} | ||
|
||
stage('AppCenter Upload') { | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
withCredentials([[ | ||
$class : "UsernamePasswordMultiBinding", | ||
credentialsId : "AppCenter-eRp-Android-Develop_u_p", | ||
usernameVariable: "UNUSED", | ||
passwordVariable: "APPCENTER_API_TOKEN"]]) | ||
{ | ||
appCenter apiToken: APPCENTER_API_TOKEN, | ||
ownerName: "Gematik", | ||
appName: 'eRezept-Android-Develop', | ||
pathToApp: 'android/build/outputs/apk/**/android-googleTuInternal-debug.apk', | ||
distributionGroups: 'Collaborators' | ||
} | ||
} | ||
} | ||
} | ||
|
||
stage('UnitTests') { | ||
steps { | ||
sh './gradlew testGoogleTuInternaDebug -Pbuildkonfig.flavor=googleTuInternal' | ||
} | ||
} | ||
|
||
stage('Gradle Cache Upload') { | ||
steps { | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
sh("./gradlew --stop") | ||
zip(zipFile: "gradle-caches.zip", archive: false, dir: "${GRADLE_USER_HOME}/caches/", overwrite: true) | ||
nexusFileUpload("gradle-caches.zip", "E-Rezept-App/Android-Cache/gradle-caches.zip") | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
success { | ||
emailext attachLog: true, | ||
to: "[email protected]", | ||
subject: "Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}: ${currentBuild.currentResult}", | ||
body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}" | ||
} | ||
failure { | ||
emailext attachLog: true, | ||
to: "[email protected]", | ||
subject: "Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}: ${currentBuild.currentResult}", | ||
body: "" | ||
} | ||
always { | ||
archiveArtifacts artifacts: '**/*-debug.apk', allowEmptyArchive: true | ||
junit testResults: '**/testGoogleTuInternalDebugUnitTest/*.xml,**/desktopTest/*.xml', allowEmptyResults: true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.