-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlutterTestPipeline.groovy
More file actions
64 lines (54 loc) · 2.05 KB
/
FlutterTestPipeline.groovy
File metadata and controls
64 lines (54 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
pipeline {
agent any
stages {
stage('Checkout') {
steps {
// Check out your Flutter app repository
git branch: "development", url: 'https://github.com/canibal1/neyasis'
}
}
stage('Package Clean & Update') {
steps {
sh 'flutter pub cache clean -f'
sh 'sudo rm -Rf /var/lib/jenkins/.pub-cache/*'
sh 'flutter pub get'
}
}
stage('Build and Test UAT Flavor') {
steps {
script {
// Install Flutter dependencies
sh 'flutter pub get'
// Build and run the app with the uat flavor
sh 'flutter run --flavor uat --target ../neyasis/lib/main.dart'
// Run integration tests for the uat flavor
sh 'flutter test --flavor uat integration_test/end_to_end_test.dart'
}
}
}
stage('Build and Test FTest Flavor') {
steps {
script {
// Install Flutter dependencies
sh 'flutter pub get'
// Build and run the app with the ftest flavor
sh 'flutter run --flavor ftest --target ../neyasis/lib/main.dart'
// Run integration tests for the ftest flavor
sh 'flutter test --flavor ftest integration_test/end_to_end_test.dart'
}
}
}
stage('Build and Test Prod Flavor') {
steps {
script {
// Install Flutter dependencies
sh 'flutter pub get'
// Build and run the app with the prod flavor
sh 'flutter run --flavor prod --target ../neyasis/lib/main.dart'
// Run integration tests for the prod flavor
sh 'flutter test --flavor prod integration_test/end_to_end_test.dart'
}
}
}
}
}