gitlab-ci: replace clbin uploads with GitLab CI Artifacts
This gathers all files that are not tracked by git into a named ZIP file, which is available for 1 week to download from the Pipelines page for the fork that ran the build.
This commit is contained in:
		
							parent
							
								
									eda48c09c7
								
							
						
					
					
						commit
						69f6560ba8
					
				| @ -14,8 +14,22 @@ before_script: | |||||||
|   - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` |   - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` | ||||||
|   - echo y | android --silent update sdk --no-ui --filter android-${ANDROID_COMPILE_SDK} |   - echo y | android --silent update sdk --no-ui --filter android-${ANDROID_COMPILE_SDK} | ||||||
| 
 | 
 | ||||||
|  | .test-template: &test-template | ||||||
|  |   artifacts: | ||||||
|  |     name: "${CI_PROJECT_PATH}_${CI_JOB_STAGE}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHA}" | ||||||
|  |     paths: | ||||||
|  |       - logcat.txt | ||||||
|  |       - app/build/reports | ||||||
|  |       - app/build/outputs/*ml | ||||||
|  |       - app/build/outputs/apk | ||||||
|  |     expire_in: 1 week | ||||||
|  |     when: on_failure | ||||||
|  |   after_script: | ||||||
|  |     - echo "Download debug artifacts from https://gitlab.com/${CI_PROJECT_PATH}/-/jobs" | ||||||
|  | 
 | ||||||
| test: | test: | ||||||
|   stage: test |   stage: test | ||||||
|  |   <<: *test-template | ||||||
|   script: |   script: | ||||||
|     - export EXITVALUE=0 |     - export EXITVALUE=0 | ||||||
|     - ./tools/check-format-strings.py |     - ./tools/check-format-strings.py | ||||||
| @ -28,17 +42,12 @@ test: | |||||||
|     - ./gradlew lint |     - ./gradlew lint | ||||||
|     - ./gradlew pmd |     - ./gradlew pmd | ||||||
|     - ./gradlew checkstyle |     - ./gradlew checkstyle | ||||||
|     - ./gradlew test || { |     - ./gradlew test || export EXITVALUE=1 | ||||||
|           for log in app/build/reports/*ests/*/*ml; do |  | ||||||
|               echo "read $log here:"; |  | ||||||
|               (cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true; |  | ||||||
|           done; |  | ||||||
|           export EXITVALUE=1; |  | ||||||
|       } |  | ||||||
|     - exit $EXITVALUE |     - exit $EXITVALUE | ||||||
| 
 | 
 | ||||||
| connected10: | connected10: | ||||||
|   stage: test |   stage: test | ||||||
|  |   <<: *test-template | ||||||
|   variables: |   variables: | ||||||
|     AVD_SDK: "10" |     AVD_SDK: "10" | ||||||
|   script: |   script: | ||||||
| @ -46,23 +55,13 @@ connected10: | |||||||
|     - emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window & |     - emulator64-arm -avd fcl-test-$AVD_SDK -no-skin -no-audio -no-window & | ||||||
|     - ./tools/wait-for-emulator |     - ./tools/wait-for-emulator | ||||||
|     - adb shell input keyevent 82 & |     - adb shell input keyevent 82 & | ||||||
|     - export EXITVALUE=0 |     - ./gradlew connectedCheck || adb -e logcat -d '*:E' > logcat.txt | ||||||
|     - ./gradlew connectedCheck || { |  | ||||||
|         adb -e logcat -d '*:E'; |  | ||||||
|         echo "get the full logcat here:"; |  | ||||||
|         (adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com) || true; |  | ||||||
|         export EXITVALUE=1; |  | ||||||
|       } |  | ||||||
|     - for log in app/build/reports/*ests/*/*ml |  | ||||||
|                  app/build/outputs/*results*/connected/*.xml; do |  | ||||||
|         echo "read $log here:"; |  | ||||||
|         (cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true; |  | ||||||
|       done |  | ||||||
| 
 | 
 | ||||||
| connected24: | connected24: | ||||||
|   stage: test |   stage: test | ||||||
|   variables: |   variables: | ||||||
|     AVD_SDK: "24" |     AVD_SDK: "24" | ||||||
|  |   <<: *test-template | ||||||
|   script: |   script: | ||||||
|     - ./gradlew assembleDebug |     - ./gradlew assembleDebug | ||||||
|     - android list avd |     - android list avd | ||||||
| @ -70,19 +69,7 @@ connected24: | |||||||
|     - ./tools/wait-for-emulator |     - ./tools/wait-for-emulator | ||||||
|     - adb shell input keyevent 82 & |     - adb shell input keyevent 82 & | ||||||
|     - adb devices |     - adb devices | ||||||
|     - export EXITVALUE=0 |     - ./gradlew connectedCheck || adb -e logcat -d '*:E' > logcat.txt | ||||||
|     - ./gradlew connectedCheck || { |  | ||||||
|         adb -e logcat -d '*:E'; |  | ||||||
|         echo "get the full logcat here:"; |  | ||||||
|         (adb -e logcat -d | curl --silent -F 'clbin=<-' https://clbin.com) || true; |  | ||||||
|         export EXITVALUE=1; |  | ||||||
|       } |  | ||||||
|     - for log in app/build/reports/*ests/*/*ml |  | ||||||
|                  app/build/outputs/*results*/connected/*.xml; do |  | ||||||
|         echo "read $log here:"; |  | ||||||
|         (cat "$log" | curl --silent -F 'clbin=<-' https://clbin.com) || true; |  | ||||||
|       done |  | ||||||
|     - exit $EXITVALUE |  | ||||||
| 
 | 
 | ||||||
| deploy_nightly: | deploy_nightly: | ||||||
|   stage: deploy |   stage: deploy | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Hans-Christoph Steiner
						Hans-Christoph Steiner