Skip to content

Commit

Permalink
Merge pull request #28 from prefeiturasp/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
luizhpriotto authored Apr 28, 2023
2 parents 8cc91fb + 2d78466 commit 0438669
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pipeline {
}
}
}

stage('Build APK Dev') {
when {
anyOf {
Expand All @@ -41,18 +41,22 @@ pipeline {
file(credentialsId: 'plateia-app_key-properties', variable: 'APPKEYPROPERTIES'),
file(credentialsId: 'plateia-app_firebase_options_development', variable: 'FIREBASEDEV'),
file(credentialsId: 'plateia-app_upload-keystore-jks', variable: 'APPKEYUPLOAD'),
file(credentialsId: "plateia-app_env_${branchname}", variable: 'env'),
]) {
sh 'cd ${WORKSPACE}'
sh 'cp ${GOOGLEJSONDEV} android/app/src/development/google-services.json'
sh 'mkdir -p lib/app/firebase'
sh 'cp ${FIREBASEDEV} lib/app/firebase/firebase_options_development.dart '
sh 'cp ${APPKEYPROPERTIES} android/key.properties'
sh 'cp ${APPKEYUPLOAD} android/app/upload-keystore.jks'
sh 'if [ -d ".env" ]; then rm -f .env; fi'
sh 'cp ${env} .env'
sh 'flutter clean'
sh 'flutter pub get'
sh 'flutter packages pub run build_runner build --delete-conflicting-outputs'
sh "flutter build apk --build-name=${APP_VERSION} --build-number=${BUILD_NUMBER} --release --flavor=development --target lib/main_development.dart --no-tree-shake-icons"
sh "ls -ltra build/app/outputs/flutter-apk/"
sh 'if [ -d ".env" ]; then rm -f .env; fi'
stash includes: 'build/app/outputs/flutter-apk/**/*.apk', name: 'appbuild'
}
}
Expand All @@ -70,18 +74,22 @@ pipeline {
file(credentialsId: 'plateia-app_key-properties', variable: 'APPKEYPROPERTIES'),
file(credentialsId: 'plateia-app_firebase_options_staging', variable: 'FIREBASEHOM'),
file(credentialsId: 'plateia-app_upload-keystore-jks', variable: 'APPKEYUPLOAD'),
file(credentialsId: "plateia-app_env_${branchname}", variable: 'env'),
]) {
sh 'cd ${WORKSPACE}'
sh 'cp ${GOOGLEJSONHOM} android/app/src/staging/google-services.json'
sh 'mkdir -p lib/app/firebase'
sh 'cp ${FIREBASEHOM} lib/app/firebase/firebase_options_staging.dart '
sh 'cp ${APPKEYPROPERTIES} android/key.properties'
sh 'cp ${APPKEYUPLOAD} android/app/upload-keystore.jks'
sh 'if [ -d ".env" ]; then rm -f .env; fi'
sh 'cp ${env} .env'
sh 'flutter clean'
sh 'flutter pub get'
sh 'flutter packages pub run build_runner build --delete-conflicting-outputs'
sh "flutter build apk --build-name=${APP_VERSION} --build-number=${BUILD_NUMBER} --release --flavor=staging --target lib/main_staging.dart --no-tree-shake-icons"
sh "ls -ltra build/app/outputs/flutter-apk/"
sh 'if [ -d ".env" ]; then rm -f .env; fi'
stash includes: 'build/app/outputs/flutter-apk/**/*.apk', name: 'appbuild'
}
}
Expand All @@ -97,18 +105,22 @@ pipeline {
file(credentialsId: 'plateia-app_key-properties', variable: 'APPKEYPROPERTIES'),
file(credentialsId: 'plateia-app_firebase_options_production', variable: 'FIREBASEPROD'),
file(credentialsId: 'plateia-app_upload-keystore-jks', variable: 'APPKEYUPLOAD'),
file(credentialsId: "plateia-app_env_${branchname}", variable: 'env'),
]) {
sh 'cd ${WORKSPACE}'
sh 'cp ${GOOGLEJSONPROD} android/app/src/production/google-services.json'
sh 'mkdir -p lib/app/firebase'
sh 'cp ${FIREBASEPROD} lib/app/firebase/firebase_options_production.dart '
sh 'cp ${APPKEYPROPERTIES} android/key.properties'
sh 'cp ${APPKEYUPLOAD} android/app/upload-keystore.jks'
sh 'if [ -d ".env" ]; then rm -f .env; fi'
sh 'cp ${env} .env'
sh 'flutter clean'
sh 'flutter pub get'
sh 'flutter packages pub run build_runner build --delete-conflicting-outputs'
sh "flutter build apk --build-name=${APP_VERSION} --build-number=${BUILD_NUMBER} --release --flavor=production --target lib/main_production.dart --no-tree-shake-icons"
sh "ls -ltra build/app/outputs/flutter-apk/"
sh 'if [ -d ".env" ]; then rm -f .env; fi'
stash includes: 'build/app/outputs/flutter-apk/**/*.apk', name: 'appbuild'
}
}
Expand Down

0 comments on commit 0438669

Please sign in to comment.