Zfilipin has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390394 )
Change subject: WIP Wikibase daily browser test does not use Sauce Labs ...................................................................... WIP Wikibase daily browser test does not use Sauce Labs Deleted: selenium-Wikibase Created: selenium-Wikibase-chrome Bug: T167432 Change-Id: I1bf203f4028dbff1f539056217ae7801ea48d8d0 --- M jjb/job-templates-selenium.yaml M jjb/selenium.yaml 2 files changed, 152 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/94/390394/1 diff --git a/jjb/job-templates-selenium.yaml b/jjb/job-templates-selenium.yaml index 39c1526..0bd2cb0 100644 --- a/jjb/job-templates-selenium.yaml +++ b/jjb/job-templates-selenium.yaml @@ -148,3 +148,154 @@ - text: credential-id: sauce-ondemand-access-key variable: SAUCE_ONDEMAND_ACCESS_KEY + +- job-template: + name: 'selenium-{name}-chrome' + project-type: matrix + path_to_ci_yml: tests/browser/ci.yml + yaml-strategy: + exclude-key: 'exclude' + filename: '{path_to_ci_yml}' + axes: + - axis: + type: label-expression + name: label + values: + - BrowserTests + - axis: + name: BROWSER + type: yaml + filename: '{path_to_ci_yml}' + - axis: + name: MEDIAWIKI_ENVIRONMENT + type: yaml + filename: '{path_to_ci_yml}' + - axis: + name: PLATFORM + type: yaml + filename: '{path_to_ci_yml}' + + # Label for the parent job + node: BrowserTests + + repository_host: 'gerrit.wikimedia.org/r' + + properties: + - build-discarder: + days-to-keep: 31 # ~ 2 * 2 weeks sprints + + scm: + - git: + url: https://{repository_host}/{repository} + branches: + - master + wipe-workspace: false # keep the workspace... + clean: + after: true # ... and use git clean instead + prune: true # prune remote obsoletes branches + submodule: + recursive: true + + triggers: + - timed: "@daily" + + builders: + - shell: | + rm -fR log + mkdir -p "$WORKSPACE/log/junit" + - shell: | + # Attempt to figure out MediaWiki branch being used and fetch it out + # if the extension has the same branch + if [[ "$MEDIAWIKI_ENVIRONMENT" == "beta"* ]]; then + export MEDIAWIKI_API_URL="https://en.wikipedia.beta.wmflabs.org/w/api.php" + elif [ "$MEDIAWIKI_ENVIRONMENT" = "mediawiki" ]; then + export MEDIAWIKI_API_URL="https://www.mediawiki.org/w/api.php" + elif [ "$MEDIAWIKI_ENVIRONMENT" = "test" ]; then + export MEDIAWIKI_API_URL="https://test.wikipedia.org/w/api.php" + else + echo "MEDIAWIKI_ENVIRONMENT $MEDIAWIKI_ENVIRONMENT not supported!" + exit 1 + fi + MEDIAWIKI_GIT_BRANCH=$(/srv/deployment/integration/slave-scripts/bin/mw-api-siteinfo.py "$MEDIAWIKI_API_URL" git_branch) + + git checkout -f "origin/$MEDIAWIKI_GIT_BRANCH" || {{ + echo "origin/$MEDIAWIKI_GIT_BRANCH branch does not exist." + echo "Fallbacking to master branch..." + MEDIAWIKI_GIT_BRANCH='master' + git checkout -f origin/$MEDIAWIKI_GIT_BRANCH + }} + git reset --hard "origin/$MEDIAWIKI_GIT_BRANCH" + git clean -x -q -d -f + - shell: | + RUBY_VERSION=$(ruby -e 'print RbConfig::CONFIG["ruby_version"]') + export GEM_HOME="$HOME/.gem/$RUBY_VERSION" + bundle install --verbose + + # credentials + export SAUCE_ONDEMAND_USERNAME=wikimedia-jenkins + if [[ "$MEDIAWIKI_ENVIRONMENT" == "beta"* ]]; then + echo MEDIAWIKI_PASSWORD="\$selenium_user_beta" + set +x + export MEDIAWIKI_PASSWORD="$selenium_user_beta" + set -x + elif [ "$MEDIAWIKI_ENVIRONMENT" = "mediawiki" ] || [ "$MEDIAWIKI_ENVIRONMENT" = "test" ]; then + echo MEDIAWIKI_PASSWORD="\$selenium_user_production" + set +x + export MEDIAWIKI_PASSWORD="$selenium_user_production" + set -x + else + echo "MEDIAWIKI_ENVIRONMENT $MEDIAWIKI_ENVIRONMENT not supported!" + exit 1 + fi + + # run the tests + bundle exec rake selenium + + publishers: + - xunit: + thresholdsmode: 'number' + thresholds: + - failed: + unstable: 0 + failurenew: 0 + types: + - junit: + pattern: 'log/junit/*.xml' + + - email-ext: + recipients: '{recipients}' + body: '${{SCRIPT, template="wikimedia.template"}}' + failure: true + unstable: true + + - browsertests-irc + + - performance: + failed-threshold: -1 + unstable-threshold: -1 + report: + - junit: log/junit/*.xml + + - archive: + artifacts: 'log/*.log, log/junit/*.xml, log/report.html, log/*.png' + + wrappers: + - ansicolor + - timeout: + timeout: 180 + - timestamps + # Wiki usernames and passwords are hold in Jenkins credentials store + # https://integration.wikimedia.org/ci/credential-store/domain/selenium/ + - credentials-binding: + - text: + credential-id: mediawiki-captcha-bypass-password + variable: MEDIAWIKI_CAPTCHA_BYPASS_PASSWORD + - text: + credential-id: selenium-user-beta + variable: selenium_user_beta + - text: + credential-id: selenium-user-production + variable: selenium_user_production + - text: + credential-id: sauce-ondemand-access-key + variable: SAUCE_ONDEMAND_ACCESS_KEY diff --git a/jjb/selenium.yaml b/jjb/selenium.yaml index 852cd9c..9e246d1 100644 --- a/jjb/selenium.yaml +++ b/jjb/selenium.yaml @@ -108,7 +108,7 @@ repository: mediawiki/extensions/Wikibase jobs: - - 'selenium-{name}' + - 'selenium-{name}-chrome' - project: name: WikiLove -- To view, visit https://gerrit.wikimedia.org/r/390394 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1bf203f4028dbff1f539056217ae7801ea48d8d0 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin <zfili...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits