Last active
March 12, 2024 08:20
-
-
Save sud007/5a16a02094e98af3861bca702b4cf5fe to your computer and use it in GitHub Desktop.
Azure pipeline for Android MR
This file contains hidden or 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
# Pipeline for develop staging and master branches | |
# Build the mobile app | |
# Distribution of release apk to App Center | |
# for staging, master deploy to play | |
trigger: | |
- develop | |
- staging | |
- release | |
- master | |
pr: none | |
variables: | |
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle | |
KONAN_USER_HOME: /Users/runner/.konan | |
GRADLE_OPTIONS: -Xmx6144m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 | |
DATADOG_API_KEY_TEST: $(DD_MAPPING_API_KEY) | |
pool: | |
vmImage: 'ubuntu-latest' | |
name: $(date:yyyy).$(Month).$(date:dd)-$(Build.BuildId)-$(Build.SourceBranchName) | |
steps: | |
- checkout: self | |
fetchDepth: 1 | |
- script: | | |
rm -rf appium/ | |
displayName: 'Exclude Appium from build' | |
- script: | | |
rm -rf app/api-secrets.properties | |
displayName: 'Delete secret props' | |
- script: | | |
echo SourceBranchName is $(Build.SourceBranchName) to the working directory | |
echo SourceBranch is $(Build.SourceBranch) to the working directory | |
echo SystemSourceBranch is $(System.PullRequest.SourceBranch) to the working directory | |
echo SDK_API_KEY_TEST is $(SDK_API_KEY_TEST) | |
displayName: 'Test Variables' | |
- script: | | |
echo $SDK_TOKEN | |
sed 's/{SDK_API_TOKEN_VALUE}/'"$SDK_TOKEN"'/g' app/src/main/java/com/client/app/android/util/AppConstants.kt \ | |
> app/src/main/java/com/client/app/android/util/AppConstants.kt.tmp | |
mv app/src/main/java/com/client/app/android/util/AppConstants.kt.tmp app/src/main/java/com/client/app/android/util/AppConstants.kt | |
displayName: 'Set api token' | |
env: | |
DD_TOKEN: $(SDK_API_TOKEN) | |
- script: | | |
echo $ENV_NAME | |
sed 's/{ENV_NAME_VALUE}/'"$ENV_NAME"'/g' app/src/main/java/com/client/app/android/util/AppConstants.kt \ | |
> app/src/main/java/com/client/app/android/util/AppConstants.kt.tmp | |
mv app/src/main/java/com/client/app/android/util/AppConstants.kt.tmp app/src/main/java/com/client/app/android/util/AppConstants.kt | |
displayName: 'Set environment name' | |
env: | |
${{ if eq(variables['Build.SourceBranchName'], 'develop') }}: | |
ENV_NAME: develop | |
${{ elseif eq(variables['Build.SourceBranchName'], 'staging') }}: | |
ENV_NAME: uat | |
${{ elseif eq(variables['Build.SourceBranchName'], 'master') }}: | |
ENV_NAME: production | |
${{ elseif eq(variables['Build.SourceBranchName'], 'release') }}: | |
ENV_NAME: uat | |
${{ else }}: | |
ENV_NAME: develop-feature | |
- task: DownloadSecureFile@1 | |
name: upload_keystore | |
inputs: | |
secureFile: 'upload-keystore.jks' | |
retryCount: '10' | |
socketTimeout: '5000' | |
displayName: 'Download Secure App Signing File' | |
- task: Cache@2 | |
inputs: | |
key: 'gradle | "$(Agent.OS)"' | |
restoreKeys: gradle | |
path: $(GRADLE_USER_HOME) | |
displayName: Gradle build cache | |
# - task: Gradle@2 | |
# inputs: | |
# gradleWrapperFile: 'gradlew' | |
# tasks: '--build-cache testPlayRelease jacocoTestReport SonarQube' | |
# options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -Porg.gradle.parallel=true' | |
# publishJUnitResults: true | |
# testResultsFiles: '**/TEST-*.xml' | |
# javaHomeOption: 'JDKVersion' | |
# jdkVersionOption: '1.11' | |
# gradleOptions: '-Xmx4096m' | |
# sonarQubeRunAnalysis: false | |
# continueOnError: false | |
# displayName: "Run Unit Tests & Quality Scan" | |
# env: | |
# SONAR_LOGIN: $(sonar-login) | |
# BRANCH_NAME: $(Build.SourceBranchName) | |
- task: Gradle@3 | |
condition: notIn(variables['Build.SourceBranchName'],'master') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'assemblePlayRelease' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -PsecureSign -Porg.gradle.parallel=true' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
continueOnError: false | |
displayName: "Build UAT APK" | |
env: | |
MYAPP_UPLOAD_STORE_FILE: $(upload_keystore.secureFilePath) | |
MYAPP_UPLOAD_STORE_PASSWORD: $(MYAPP_UPLOAD_STORE_PASSWORD) | |
MYAPP_UPLOAD_KEY_ALIAS: $(MYAPP_UPLOAD_KEY_ALIAS) | |
MYAPP_UPLOAD_KEY_PASSWORD: $(MYAPP_UPLOAD_KEY_PASSWORD) | |
- task: Gradle@3 | |
condition: eq(variables['Build.SourceBranchName'], 'master') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'assembleRelease -x assembleDevRelease' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -PsecureSign -Porg.gradle.parallel=true' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
continueOnError: false | |
displayName: "Build Prod APK" | |
env: | |
MYAPP_UPLOAD_STORE_FILE: $(upload_keystore.secureFilePath) | |
MYAPP_UPLOAD_STORE_PASSWORD: $(MYAPP_UPLOAD_STORE_PASSWORD) | |
MYAPP_UPLOAD_KEY_ALIAS: $(MYAPP_UPLOAD_KEY_ALIAS) | |
MYAPP_UPLOAD_KEY_PASSWORD: $(MYAPP_UPLOAD_KEY_PASSWORD) | |
- task: AppCenterDistribute@3 | |
inputs: | |
serverEndpoint: 'App Center Android' | |
appSlug: 'client-APP/Client-APP' | |
appFile: 'app/build/outputs/apk/play/release/app-play-release.apk' | |
symbolsOption: 'Android' | |
releaseNotesOption: 'input' | |
releaseNotesInput: 'Release version for Google Play' | |
destinationType: 'groups' | |
displayName: Deploy GooglePlay APK to App Center | |
- task: Gradle@3 | |
condition: in(variables['Build.SourceBranchName'],'master', 'release') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'bundlePlayRelease' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -PsecureSign' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
continueOnError: false | |
displayName: "Build App Bundle" | |
env: | |
MYAPP_UPLOAD_STORE_FILE: $(upload_keystore.secureFilePath) | |
MYAPP_UPLOAD_STORE_PASSWORD: $(MYAPP_UPLOAD_STORE_PASSWORD) | |
MYAPP_UPLOAD_KEY_ALIAS: $(MYAPP_UPLOAD_KEY_ALIAS) | |
MYAPP_UPLOAD_KEY_PASSWORD: $(MYAPP_UPLOAD_KEY_PASSWORD) | |
# Commenting this aab push to ITC as, it is not used anymore and is problematic during rejections | |
# - task: GooglePlayRelease@4 | |
# condition: eq(variables['Build.SourceBranchName'], 'release') | |
# inputs: | |
# serviceConnection: 'Google Play - client APP' | |
# applicationId: 'com.client.app' | |
## changesNotSentForReview: true | |
# bundleFile: 'app/build/outputs/bundle/playRelease/app-play-release.aab' | |
# track: 'internal' | |
# continueOnError: true | |
# displayName: Deploy prod bundle to ITC (Beta) | |
- task: GooglePlayRelease@4 | |
condition: eq(variables['Build.SourceBranchName'], 'master') | |
inputs: | |
serviceConnection: 'Google Play - client APP' | |
applicationId: 'com.client.app' | |
# changesNotSentForReview: true | |
bundleFile: 'app/build/outputs/bundle/playRelease/app-play-release.aab' | |
track: 'alpha' | |
displayName: Deploy prod bundle to CTC (Alpha) | |
#Making Sonar task to only run on release branch to save pipeline times for UAT and prod builds | |
- task: Gradle@3 | |
condition: eq(variables['Build.SourceBranchName'], 'release') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'jacocoTestReport SonarQube' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -Porg.gradle.parallel=true' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
continueOnError: true | |
displayName: "Upload results to SonarQube" | |
env: | |
SONAR_LOGIN: $(sonar-login) | |
BRANCH_NAME: $(Build.SourceBranchName) | |
- script: | | |
echo $DATADOG_API_KEY_TEST | |
displayName: 'check env variable value' | |
env: | |
DATADOG_API_KEY_TEST: $(DD_MAPPING_API_KEY) | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'uploadMappingPlayRelease' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
continueOnError: true | |
displayName: "Upload DataDog Mappings" | |
env: | |
DATADOG_API_KEY: $(SDK_API_KEY_TEST) |
This file contains hidden or 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
# Pipeline for pull requests to master and develop branches | |
# Build the mobile app | |
# UI and Unit testing | |
# No Distribution to App Center | |
pr: | |
- release | |
- staging | |
- develop | |
- master | |
trigger: none | |
variables: | |
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle | |
KONAN_USER_HOME: /Users/runner/.konan | |
GRADLE_OPTIONS: -Xmx6144m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 | |
GRADLE_PROPS: -PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -Porg.gradle.parallel=true -Porg.gradle.daemon=true --max-workers=12 | |
pool: | |
vmImage: 'ubuntu-latest' | |
# vmImage: 'macos-latest' | |
name: $(date:yyyy).$(Month).$(date:dd)$(rev:.r)-$(Build.BuildId) | |
stages: | |
- stage: unit_testing | |
displayName: "Unit Testing" | |
jobs: | |
- job: Unit_Testing | |
displayName: "Running unit tests" | |
steps: | |
- checkout: self | |
fetchDepth: 1 | |
- script: | | |
rm -rf appium/ | |
displayName: 'Exclude Appium' | |
- script: | | |
echo SourceBranchName is $(Build.SourceBranchName) to the working directory | |
echo SourceBranch is $(Build.SourceBranch) to the working directory | |
echo SystemSourceBranch is $(System.PullRequest.SourceBranch) to the working directory | |
displayName: Test Variables | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'ktlintMainSourceSetCheck' | |
options: '$(GRADLE_PROPS)' | |
gradleOptions: '$(GRADLE_OPTIONS)' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: 1.11 | |
sonarQubeRunAnalysis: false | |
displayName: "ktlint check" | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'testDevDebugUnitTest' | |
options: '$(GRADLE_PROPS)' | |
gradleOptions: '$(GRADLE_OPTIONS)' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: 1.11 | |
sonarQubeRunAnalysis: false | |
displayName: "execute unit tests" | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'jacocoTestReport SonarQube -x ktlintCheck -x lint' | |
options: '$(GRADLE_PROPS) -PpullRequest=true' | |
gradleOptions: '$(GRADLE_OPTIONS)' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: 1.11 | |
sonarQubeRunAnalysis: false | |
continueOnError: true | |
displayName: "Upload to sonarqube" | |
env: | |
SONAR_LOGIN: $(sonar-login) | |
BRANCH_NAME: $(Build.SourceBranchName) | |
PULL_REQUEST_KEY: $(System.PullRequest.PullRequestId) | |
PULL_REQUEST_BRANCH: $(System.PullRequest.SourceBranch) | |
PULL_REQUEST_TARGET: $(System.PullRequest.TargetBranch) | |
TARGET_BRANCH_NAME: $(System.PullRequest.TargetBranch) |
This file contains hidden or 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
# Pipeline for develop staging and master branches | |
# Build the mobile app | |
# Distribution of release apk to App Center | |
# for staging, master deploy to play | |
trigger: | |
- develop | |
- staging | |
- release | |
- master | |
pr: none | |
variables: | |
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle | |
KONAN_USER_HOME: /Users/runner/.konan | |
GRADLE_OPTIONS: -Xmx6144m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 | |
VERSION: ${{ replace(variables['Build.SourceBranchName'], 'v', '')}} | |
BRANCH_NAME: $(Build.SourceBranchName) | |
pool: | |
vmImage: 'ubuntu-latest' | |
name: $(date:yyyy).$(Month).$(date:dd)-$(Build.SourceBranchName) | |
steps: | |
- checkout: self | |
fetchDepth: 1 | |
- script: | | |
echo SourceBranchName is $(BRANCH_NAME) | |
echo SourceBranch is $(Build.SourceBranch) | |
echo versionName is $(Build.BuildNumber) | |
echo versionCode is $(Build.BuildId) | |
displayName: Test Variables | |
- task: DownloadSecureFile@1 | |
name: upload_keystore | |
inputs: | |
secureFile: 'upload-keystore.jks' | |
retryCount: '10' | |
socketTimeout: '5000' | |
displayName: 'Download Secure App Signing File' | |
- task: DownloadSecureFile@1 | |
name: download_certificate | |
inputs: | |
${{ if eq(variables['Build.SourceBranchName'], 'master') }}: | |
secureFile: 'das_prod.crt' | |
${{ else }}: | |
secureFile: 'das_staging.crt' | |
retryCount: '10' | |
socketTimeout: '5000' | |
displayName: 'Download SSL certificate' | |
- script: | | |
echo Downloading $(download_certificate.secureFilePath) to the working directory | |
mv $(download_certificate.secureFilePath) shared/src/commonMain/resources/MR/files/das_ssl.crt | |
displayName: Move API Certificate | |
- task: DownloadSecureFile@1 | |
name: download_certificate_new | |
condition: eq(variables['Build.SourceBranchName'], 'master') | |
inputs: | |
secureFile: 'das_prod_new.crt' | |
retryCount: '10' | |
socketTimeout: '5000' | |
displayName: 'Download alternate prod SSL certificate' | |
- script: | | |
echo Downloading $(download_certificate_new.secureFilePath) to the working directory | |
mv $(download_certificate_new.secureFilePath) shared/src/commonMain/resources/MR/files/das_ssl_new.crt | |
condition: eq(variables['Build.SourceBranchName'], 'master') | |
displayName: 'Move alternate certificate' | |
- script: | | |
echo $BRANCH_NAME | |
sed 's/{BRANCH_NAME_VALUE}/'"$BRANCH_NAME"'/g' shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt \ | |
> shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp | |
mv shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt | |
displayName: 'Set the current branch name' | |
# env: | |
# BRANCH_NAME: $(Build.SourceBranchName) | |
- script: | | |
echo BRANCH_NAME $(BRANCH_NAME) is Added in Api Constants | |
- script: | | |
echo $API_URI | |
sed 's/{API_VALUE}/'"$API_URI"'/g' shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt \ | |
> shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp | |
mv shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp shared/src/commonMain/kotlin/com/app/app/ktor/ApiConstants.kt | |
displayName: 'Selecting target Api URL' | |
env: | |
${{ if eq(variables['Build.SourceBranchName'], 'master') }}: | |
API_URI: $(PROD-API-DOMAIN) | |
${{ else }}: | |
API_URI: $(STAGING_API) | |
- bash: echo '##vso[task.setvariable variable=release]1.0.$(Build.BuildId)' | |
condition: eq(variables['Build.SourceBranchName'], 'release') | |
displayName: Set release version value | |
- script: | | |
echo $VERSION_VALUE | |
sed 's/{API_VERSION_VALUE}/'"$VERSION_VALUE"'/g' shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt \ | |
> shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp | |
mv shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt.tmp shared/src/commonMain/kotlin/com/client/app/ktor/ApiConstants.kt | |
displayName: 'Setting API version header' | |
env: | |
VERSION_VALUE: v4 | |
- task: Gradle@3 | |
condition: notIn(variables['Build.SourceBranchName'], 'master') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'build publishAndroidPublicationToClientRepository -x linkPodDebugFrameworkIos -x linkPodReleaseFrameworkIos -x test -x lint' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -PsecureSign' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
env: | |
SDK_NAME: 'iphoneos' | |
continueOnError: false | |
displayName: "UAT - Build & publish library" | |
- task: Gradle@3 | |
condition: eq(variables['Build.SourceBranchName'], 'master') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'build publishAllPublicationsToClientRepository -x linkPodDebugFrameworkIos -x linkPodReleaseFrameworkIos -x test -x lint' | |
options: '-PversionName=$(Build.BuildNumber) -Prelease=$(master) -PversionCode=$(Build.BuildId) -PsecureSign' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
env: | |
SDK_NAME: 'iphoneos' | |
continueOnError: false | |
displayName: "Prod - Build & publish library" | |
- task: Gradle@3 | |
condition: eq(variables['Build.SourceBranchName'], 'release') | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'jacocoTestReport SonarQube -x compileDebugAndroidTestKotlinAndroid' | |
options: '-PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -Porg.gradle.parallel=true' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: '1.11' | |
gradleOptions: '-Xmx4096m' | |
sonarQubeRunAnalysis: false | |
continueOnError: false | |
displayName: "Run Quality Scan and upload" | |
env: | |
SONAR_LOGIN: $(sonar-login) | |
BRANCH_NAME: $(Build.SourceBranchName) | |
- bash: | | |
if [ -d $(System.DefaultWorkingDirectory)/shared/build/bin/ios ]; then | |
find $(System.DefaultWorkingDirectory)/shared/build -type d | |
fi |
This file contains hidden or 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
# Pipeline for pull requests to master and develop branches | |
# Build the mobile app | |
# UI and Unit testing | |
# No Distribution to App Center | |
pr: | |
- develop | |
- release | |
- staging | |
- master | |
trigger: none | |
variables: | |
GRADLE_USER_HOME: $(Pipeline.Workspace)/.gradle | |
KONAN_USER_HOME: /Users/runner/.konan | |
GRADLE_OPTIONS: -Xmx6144m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -Dfile.encoding=UTF-8 | |
GRADLE_PROPS: -PversionName=$(Build.BuildNumber) -PversionCode=$(Build.BuildId) -Porg.gradle.parallel=true -Porg.gradle.daemon=true --max-workers=12 | |
pool: | |
vmImage: 'ubuntu-latest' | |
name: $(date:yyyy).$(Month).$(date:dd)$(rev:.r) | |
stages: | |
- stage: unit_testing | |
displayName: "Scanning PR Quality..." | |
jobs: | |
- job: Unit_Testing | |
displayName: "Running Scans..." | |
steps: | |
- checkout: self | |
fetchDepth: 1 | |
- script: | | |
echo SourceBranchName is $(Build.SourceBranchName) to the working directory | |
echo SourceBranch is $(Build.SourceBranch) to the working directory | |
echo SystemSourceBranch is $(System.PullRequest.SourceBranch) to the working directory | |
displayName: Test Variables | |
- task: Cache@2 | |
inputs: | |
key: 'gradle | "$(Agent.OS)"' | |
restoreKeys: gradle | |
path: $(GRADLE_USER_HOME) | |
displayName: Gradle build cache | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'ktlintCommonMainSourceSetCheck ktlintAndroidTestSourceSetCheck ktlintIosMainSourceSetCheck' | |
options: '$(GRADLE_PROPS)' | |
gradleOptions: '$(GRADLE_OPTIONS)' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: 1.11 | |
sonarQubeRunAnalysis: false | |
displayName: "Checking Ktlint Errors" | |
- task: Gradle@3 | |
inputs: | |
gradleWrapperFile: 'gradlew' | |
tasks: 'testDebugUnitTest' | |
options: '$(GRADLE_PROPS)' | |
gradleOptions: '$(GRADLE_OPTIONS)' | |
publishJUnitResults: true | |
testResultsFiles: '**/TEST-*.xml' | |
javaHomeOption: 'JDKVersion' | |
jdkVersionOption: 1.11 | |
sonarQubeRunAnalysis: false | |
displayName: "Execute unit tests" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment