1- name : " E2E UI Test "
1+ name : " Camera Plugin ODC Pipeline "
22
33pr : none
44trigger :
@@ -11,10 +11,10 @@ pool:
1111
1212resources :
1313 repositories :
14- - repository : mobile-ui-tests
14+ - repository : MobilePluginsE2ETests
1515 type : github
16- ref : master
17- name : OutSystems/mobile-ui-tests
16+ ref : main
17+ name : OutSystems/MobilePluginsE2ETests
1818 endpoint : OutSystems
1919 - repository : MobilePluginsODCPipeline
2020 type : github
@@ -28,10 +28,10 @@ stages:
2828 - group : " Camera Plugin Variables"
2929 - group : " Saucelabs User Variables"
3030 jobs :
31- - job : checkout_repos
31+ - job : update_wrapper
32+ displayName : " Update the plugin wrapper"
3233 steps :
3334 - checkout : self
34- - checkout : mobile-ui-tests
3535 - checkout : MobilePluginsODCPipeline
3636 - template : build/ci/update-wrapper.yaml@MobilePluginsODCPipeline
3737 parameters :
@@ -40,6 +40,13 @@ stages:
4040 PLUGIN_UPDATE_URL : " https://github.com/OutSystems/cordova-plugin-camera#$(Build.SourceBranchName)"
4141 PLUGIN_UPDATE_VERSION : " $(Build.SourceBranchName)"
4242 workingDirectory : $(System.DefaultWorkingDirectory)/MobilePluginsODCPipeline
43+ - job : update_sampleapp
44+ dependsOn : update_wrapper
45+ displayName : " Refresh dependencies on the Sample App, deploy to QA and build packages"
46+ steps :
47+ - checkout : self
48+ - checkout : MobilePluginsODCPipeline
49+ - checkout : MobilePluginsE2ETests
4350 - template : build/ci/refresh-sampleapp.yaml@MobilePluginsODCPipeline
4451 parameters :
4552 secretFileName : " eng-osrd-mobile-neo1-StampsInformation.json"
@@ -51,65 +58,78 @@ stages:
5158 echo "##vso[task.setvariable variable=ipaPath]$(cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ipa-path)"
5259 cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ipa-path
5360 name: set_path_vars
54- displayName: "Set package variables"
61+ displayName: "Set package variables"
5562 - task : NodeTool@0
56- displayName : ' Use Node 14.15.4'
63+ displayName : " Use Node 14.15.4"
5764 inputs :
58- versionSpec : ' 14.15.4'
65+ versionSpec : " 14.15.4"
5966 checkLatest : true
6067 - task : npmAuthenticate@0
61- displayName : ' npm Authenticate .npmrc'
68+ displayName : " npm Authenticate .npmrc"
6269 inputs :
63- workingFile : ' $(System.DefaultWorkingDirectory)/mobile-ui-tests /.npmrc'
70+ workingFile : " $(System.DefaultWorkingDirectory)/MobilePluginsE2ETests /.npmrc"
6471 - task : CmdLine@2
6572 name : install_dep_cp2
66- displayName : ' Install dependencies using yarn'
73+ displayName : " Install dependencies using yarn"
6774 inputs :
68- script : ' yarn'
69- workingDirectory : $(System.DefaultWorkingDirectory)/mobile-ui-tests /
70- continueOnError : true
75+ script : " yarn"
76+ workingDirectory : $(System.DefaultWorkingDirectory)/MobilePluginsE2ETests /
77+ continueOnError : true
7178 - script : |
72- node ./scripts/upload_application.js -- -u $SAUCELABS_USER_NAME -k $SAUCELABS_USER_KEY -f $(apkPath) -o /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.android-slid
73- node ./scripts/upload_application.js -- -u $SAUCELABS_USER_NAME -k $SAUCELABS_USER_KEY -f $(ipaPath) -o /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ios-slid
74- workingDirectory: $(System.DefaultWorkingDirectory)/mobile-ui-tests
79+ echo "APK: $(apkPath)"
80+ ls -la $(ipaPath)
81+ echo "IPA: $(ipaPath)"
82+ ls -la $(ipaPath)
83+ node ./scripts/upload_application.js -- -f $(apkPath) -o /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.android-slid
84+ node ./scripts/upload_application.js -- -f $(ipaPath) -o /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ios-slid
85+ workingDirectory: $(System.DefaultWorkingDirectory)/MobilePluginsE2ETests
7586 name: upload_packages
7687 displayName: "Upload package to SauceLabs"
7788 - script : |
78- echo "##vso[task.setvariable variable=androidSLID]$(cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.android-slid)"
79- echo "##vso[task.setvariable variable=iosSLID]$(cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ios-slid)"
89+ echo "##vso[task.setvariable variable=androidSLID;isOutput=true ]$(cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.android-slid)"
90+ echo "##vso[task.setvariable variable=iosSLID;isOutput=true ]$(cat /tmp/3c0451ef-0d99-4e09-adb5-718e009deb9d.ios-slid)"
8091 name: set_slid_vars
8192 displayName: "Set SauceLabs Storage IDs variables"
82- - template : pipelines/templates/build-and-execute-tests-template.yml@mobile-ui-tests
93+ - job : android_e2e_tests
94+ dependsOn : update_sampleapp
95+ displayName : " Android E2E tests"
96+ variables :
97+ - name : storageID
98+ value : $[ dependencies.update_sampleapp.outputs['set_slid_vars.androidSLID'] ]
99+ steps :
100+ - checkout : self
101+ - checkout : MobilePluginsE2ETests
102+ - template : build/ci/templates/run-tests.yaml@MobilePluginsE2ETests
83103 parameters :
84- PACKAGE : $(ANDROID_PACKAGE_ID)
85- MABS : 9
86104 DATACENTER : eu
87105 DEVICE : " samsung or google"
88106 DEVICE_PLATFORM : Android
89107 DEVICE_VERSION : 12
90108 PLATFORM_TYPE : Mobile
91- PLUGIN : camera
92- TAGS : " @p0"
109+ PLUGIN : Camera
93110 RETRY : 1
94111 TEST_TYPE : native
95112 THREADS : 3
96- STORAGE_ID : $(androidSLID)
97- WORKING_DIR : $(System.DefaultWorkingDirectory)/mobile-ui-tests
98- - template : pipelines/templates/build-and-execute-tests-template.yml@mobile-ui-tests
113+ STORAGE_ID : $(storageID)
114+ WORKING_DIR : $(System.DefaultWorkingDirectory)/MobilePluginsE2ETests
115+ - job : iOS_e2e_tests
116+ dependsOn : update_sampleapp
117+ displayName : " iOS E2E tests"
118+ variables :
119+ - name : storageID
120+ value : $[ dependencies.update_sampleapp.outputs['set_slid_vars.iosSLID'] ]
121+ steps :
122+ - checkout : self
123+ - checkout : MobilePluginsE2ETests
124+ - template : build/ci/templates/run-tests.yaml@MobilePluginsE2ETests
99125 parameters :
100- PACKAGE : $(IOS_BUNDLE_ID)
101- MABS : 9
102126 DATACENTER : eu
103127 DEVICE_PLATFORM : iOS
104128 DEVICE_VERSION : 16
105129 PLATFORM_TYPE : Mobile
106- PLUGIN : camera
107- TAGS : " @p0"
130+ PLUGIN : Camera
108131 RETRY : 1
109132 TEST_TYPE : native
110133 THREADS : 3
111- STORAGE_ID : $(iosSLID)
112- WORKING_DIR : $(System.DefaultWorkingDirectory)/mobile-ui-tests
113-
114-
115-
134+ STORAGE_ID : $(storageID)
135+ WORKING_DIR : $(System.DefaultWorkingDirectory)/MobilePluginsE2ETests
0 commit comments