qaprosoft / qps-pipeline Goto Github PK
View Code? Open in Web Editor NEWJenkins pipeline and jobdsl scripts
Jenkins pipeline and jobdsl scripts
runCron method should scan all sub-projects inside the repo
in order to unify way of cloning and get rid of code duplication we should pass parameters dynamically
Subj
setupGoalsForiOS and setupGoalsForAndroid
all kind of integrations between carina and zafira for emailing should be removed
To reproduce:
To be able to generate unified runner/scanner for the repo it would be nice to have single Jenkinsfile with ability to detect is it pr checker or merge/push startup and execute appropriate logic...
for each run browser value is empty string and it is ignored on child job level somehow
...to avoid following errors:
org.openqa.selenium.WebDriverException: cannot create session QPS-HUB-* on any hosts after 1 attempt(s) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 300.00 seconds
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: '00953bdc2828', ip: '172.18.0.28', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-24-generic', java.version: '1.8.0_151'
Driver info: driver.version: AndroidDriver
com.qaprosoft.carina.core.foundation.webdriver.DriverPool.createDriver(DriverPool.java:370)
com.qaprosoft.carina.core.foundation.webdriver.DriverPool.getDriver(DriverPool.java:146)
com.qaprosoft.carina.core.foundation.webdriver.DriverPool.getDriver(DriverPool.java:98)
com.qaprosoft.carina.core.foundation.webdriver.DriverPool.getDriver(DriverPool.java:67)
com.qaprosoft.carina.core.foundation.utils.factory.CustomTypePageFactory.initPage(CustomTypePageFactory.java:59)
To be able to manage extra actions for cron jobs it is supposed not to re-create them during scanner.
It will allow to adjust those items manually including:
Currently we get default parameter build=.* for all jobs. We don't need this parameter.
Or figure out how to configure them manually. For now only DefaultPool or Any is working.
Every Groovy class initially is either of jobDSL or pipeline type and they both have their own characteristics, so it seems reasonable to store them accordingly in separate directories
In additions to default set of statndard CI parameters we have to provide possibility to declare and create custom arguments: hidden or visible. Using overrideFields declaration is not enough
for now we write into the log and in UI zafira general host like "demo.qaprosoft.com" and port 8000.
this functionality should be improved in such way:
pipeline Runner should detect current ip address
this ip and port should be written in log
wrap this functionality into separate protected method to be able to override on children level
For the case when cron pipeline job has browser parameter declared we should limit children job startup byt his browser only.
If no param["browser"] declared then we should start regression for all supported browsers based on
add new capability for mobile devices:
emulated = true [false]
adjust selenium-hub to be able to track new capability (by default is should be supported without any changes)
adjust pipeline Runner for iOS mobile to detect build artifact extension.
if it is ".ipa" then add capabilities.emulated=false
if it is ".app" then capabilities.emulated=true
also pay attantion for the zip like "...app.zip"
Currently we are able to override retry_count parameter only using override fields. This flow doesn't reflect actual value while starting a job.
We need some flow to reflect a correct value in job's extensible choice parameter.
Current logic for generating local eTAF_report into dedicated location and replacing it by zafira has a lot of custom logic.
We should simplify this process a lot and incorporate into the pipeline runner steps for getting zafira results based on id/ci_run_id
Old logic to find and publish local report could be saved as well but using single findFiles logic and publish with different name: for example: eTAF_Local_Report
let's enable both enableVNC and enableVideo by default where possible:
enbleVNC:
enableVideo
-web
-android
-iOS (still there is a problem in Appium...)
we should support debug mode in order not to comment/uncomment console outputs
https://nerdwallet.qaprosoft.com/jenkins/job/Automation/job/Android_goal_tests/13/
The given job was started from Jenkins with parameter: thread_count = 3
but 4 phones were occupied.
for now browser_version was removed completely from job arguments.
I suggest:
-> So if browsername contain space in jenkinsPipelibebrowsers then it is supposed to be a version. So we have to parse it correctly and generate 5 jobs during startup for:
-chrome *
We use hardcoded URL in the scripts which cause automation fails. File for the reference : https://github.com/qaprosoft/qps-pipeline/blob/master/src/com/qaprosoft/jenkins/repository/jobdsl/Job.groovy
line 281
Some workaround 9dacd54
Pipeline jobs should have such params:
priority - 5 as default and global choice list
env - empty by default as string param (think about global choice usage if possible)
browser - TDB. maybe empty again as default value
The param already exists in Configurator as ci_parent_build. Rename upstream_job_id as well.
for now all scanner jobs are started when push/merge to central master happen. Investigate what we can do with creating personal Automation jobs basde on forked repo and scanner functionality
Summary:
After setting of android pipeline job on specific environment (e.g. MASTER_BETA, QA_REMOTE_PROD) all specific jobs (e.g. SANITY, SMOKE etc.) are triggered on 2 envs: 1) which was determined in pipeline job 2) general env (INT | BETA | PROD)
take a look to commented piece of code
https://github.com/qaprosoft/qps-pipeline/blob/a8b7313a1fb5e81cd232cdea1374fe6c9dbbd62a/src/com/qaprosoft/selenium/grid/ProxyInfo.
groovy#L13
Sometimes we test/debug new features on CI and update job manually adding extra arguments, changing existing one etc.
But as only push happens scanner recreate this job forcibly and we have to declare new fields again.
It would be nice to have possibility to avoid job re-creation via scanner.
Proposed solution:
need adjust process and provide valid git args:
ci.setGitBranch(config.getString("git_branch", null));
ci.setGitCommit(config.getString("git_commit", null));
ci.setGitUrl(config.getString("git_url", null));
Subj
by default we configure scanner to start on each push/merge. It would be nice to analyze changed files and do not recreate jobs if xml were not updated
QA jobs should be forcibly stopped if jenkins is being restarted. So seems like there is an appropriate checkbox in one of the latest Jenkns build.
Please update jobdsl for test job only to make it enabled by default
Details:
within thw suite I want to run following parameter is set:
following pipeline job is created on Jenkins:
https://ua.qaprosoft.com/jenkins/job/Pipeline/job/MMF-Andoid-Minimal-Acceptance-Regression-Pipeline/
in wich following checkbox is checked: Build periodically
and the schedule is set according to the same parameter from within suite:
https://ua.qaprosoft.com/jenkins/job/Management_Jobs/job/PipelineDSL/39/consoleFull
And apply OO approach for this script
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.