Page MenuHomePhabricator

mwext-mw-selenium-node-composer-jessie

Authored By
zeljkofilipin
Apr 13 2018, 6:26 PM
Size
15 KB
Referenced Files
None
Subscribers
None

mwext-mw-selenium-node-composer-jessie

<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<description>&lt;p&gt;Job is managed by &lt;a href=&quot;https://www.mediawiki.org/wiki/CI/JJB&quot;&gt;Jenkins Job Builder&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
<keepDependencies>false</keepDependencies>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<concurrentBuild>true</concurrentBuild>
<assignedNode>ci-jessie-wikimedia</assignedNode>
<canRoam>false</canRoam>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>15</daysToKeep>
<numToKeep>-1</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</strategy>
</jenkins.model.BuildDiscarderProperty>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>ZUUL_UUID</name>
<description>Zuul provided key to link builds with Gerrit events</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>UUID</name>
<description>Zuul provided key to link builds with Gerrit events (deprecated use ZUUL_UUID instead)</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_PIPELINE</name>
<description>Zuul pipeline triggering this job</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_URL</name>
<description>URL of Zuul's git repos accessible to workers</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_PROJECT</name>
<description>Branch name of triggering project</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_BRANCH</name>
<description>Branch name of triggering change</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_CHANGES</name>
<description>List of dependent changes to merge</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_REF</name>
<description>Reference for the merged commit(s) to use</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_COMMIT</name>
<description>The commit SHA1 at the head of ZUUL_REF</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_CHANGE_IDS</name>
<description>List of included changes</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_CHANGE</name>
<description>ID of triggering change</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_PATCHSET</name>
<description>Patchset of triggering change</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>ZUUL_VOTING</name>
<description>Zuul considered this job voting or not</description>
<defaultValue/>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.scm.NullSCM"/>
<builders>
<hudson.tasks.Shell>
<command>set -eu +x
# castor-env
# Forge castor environement
# Replace slashes with dashes:
NS_PROJECT=${ZUUL_PROJECT////-}
NS_BRANCH=${ZUUL_BRANCH////-}
# Pill up MediaWiki extensions and skins caches together
if [[ &quot;$ZUUL_PROJECT&quot; =~ ^mediawiki/(extensions|skins)/ ]]; then
NS_PROJECT=&quot;castor-mw-ext-and-skins&quot;
fi
# Ex: mediawiki-core/REL1_26/tox-jessie
# Prefer TRIGGERED_JOB_NAME when it is set
NS_JOB=${TRIGGERED_JOB_NAME:-$JOB_NAME}
# Ex: mediawiki-core/REL1_26/tox-jessie
CASTOR_NAMESPACE=&quot;${NS_PROJECT}/${NS_BRANCH}/${NS_JOB}&quot;
export CASTOR_NAMESPACE
echo &quot;Defined: CASTOR_NAMESPACE=\&quot;$CASTOR_NAMESPACE\&quot;&quot;
# castor-load
# Load cache from central repository
set -u
[[ $JOB_NAME == *'docker'* ]] &amp;&amp; is_docker=1 || is_docker=''
if [ $is_docker ]; then
# For containers we mount $WORKSPACE/cache from the host to /cache in the
# container. It is also the value of XDG_CACHE_HOME
DEST=&quot;/cache&quot;
# cache might persist between builds on the Docker slaves
rsync_delete='--delete-delay'
else
DEST=&quot;$HOME&quot;
# On Nodepool it is guaranteed to be empty. Deleting would wipe
# /home/jenkins/workspace!
fi
echo &quot;Syncing...&quot;
rsync \
--archive \
${rsync_delete:-} \
--compress \
--contimeout 3 \
rsync://castor02.integration.eqiad.wmflabs:/caches/&quot;$CASTOR_NAMESPACE&quot;/ &quot;$DEST&quot; \
|| :
echo -e &quot;\nDone&quot;
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo $ZUUL_PROJECT &gt; deps.txt</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo -e $EXT_DEPENDENCIES &gt;&gt; deps.txt</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>echo -e $SKIN_DEPENDENCIES &gt; deps_skins.txt</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>zuul-cloner --version
zuul-cloner \
--color \
--verbose \
--map /srv/deployment/integration/slave-scripts/etc/zuul-clonemap.yaml \
--workspace src \
--cache-dir /srv/git \
https://gerrit.wikimedia.org/r/p \
mediawiki/core $(cat deps.txt) $(cat deps_skins.txt)
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>find src/extensions src/skins -maxdepth 2 \
-name .gitmodules \
-execdir bash -xe -c '
git submodule foreach git clean -xdff -q
git submodule update --init --recursive
git submodule status
' \;
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>mv deps.txt src/extensions_load.txt</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>set -u
cd &quot;src&quot;
[[ -f &quot;composer.json&quot; ]] || exit 0
composer --ansi validate --no-check-publish
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>set -u
cd src
/srv/deployment/integration/slave-scripts/bin/mw-create-composer-local.py &quot;extensions_load.txt&quot; composer.local.json
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>set -ux
cd &quot;src&quot;
[[ -f &quot;composer.json&quot; ]] || exit 0
export HTTP_PROXY_REQUEST_FULLURI=false
export HTTPS_PROXY_REQUEST_FULLURI=false
composer update --ansi --no-progress --prefer-dist --profile -v
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>/srv/deployment/integration/slave-scripts/bin/mw-install-mysql.sh</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>/srv/deployment/integration/slave-scripts/bin/mw-apply-settings.sh</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>/srv/deployment/integration/slave-scripts/bin/mw-run-update-script.sh</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command># Load context (e.g. MW_INSTALL_PATH, MW_SERVER, MW_SCRIPT_PATH)
. /srv/deployment/integration/slave-scripts/bin/mw-set-env-localhost.sh
# Configure MediaWiki
echo -e \
&quot;&lt;?php\n\$wgServer = '${MW_SERVER}';\n&quot;\
&quot;\$wgScriptPath = '${MW_SCRIPT_PATH}';\n&quot;\
&quot;\$wgScript = \$wgStylePath = \$wgLogo = false;\n&quot;\
&quot;\$wgResourceBasePath = null;\n&quot;\
&quot;\$wgEnableJavaScriptTest = true;\n?&gt;\n&quot; &gt;&gt; &quot;$MW_INSTALL_PATH/LocalSettings.php&quot;
# The location is free or we make it free
PUBLIC_DIR=&quot;/srv/localhost-worker/$BUILD_TAG&quot;
test ! -e &quot;$PUBLIC_DIR&quot; || rm &quot;$PUBLIC_DIR&quot;;
# Publish our install in the QUnit server document root
ln -s &quot;$MW_INSTALL_PATH&quot; &quot;$PUBLIC_DIR&quot;
# Fetch headers and content preview for debugging (HTTP 500 Error, Database error, ResourceLoader etc.)
# NB: Avoid &quot;curl: Failed writing body&quot; error when using 'head'. Either by using 'tac|tac', or by ignoring stderr,
# or by writing to a file first and running 'head' on that.
curl --include &quot;${MW_SERVER}${MW_SCRIPT_PATH}/index.php/Special:BlankPage&quot; &gt; log/curl-SpecialBlankPage.log; head -n42 log/curl-SpecialBlankPage.log
curl --include &quot;${MW_SERVER}${MW_SCRIPT_PATH}/load.php?debug=true&amp;modules=startup&amp;only=scripts&quot; &gt; log/curl-load-startup.log; head -n42 log/curl-load-startup.log
curl --include &quot;${MW_SERVER}${MW_SCRIPT_PATH}/index.php?title=Special:JavaScriptTest/qunit/export&quot; &gt; log/curl-SpecialJavaScriptTest.log; head -n11 log/curl-SpecialJavaScriptTest.log
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>. /srv/deployment/integration/slave-scripts/bin/mw-set-env-localhost.sh
cd $MW_INSTALL_PATH
. /srv/deployment/integration/slave-scripts/bin/npm-setup.sh
rm -rf node_modules
npm install
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command># Change to the working directory. EXT_NAME is set by Zuul parameters
# functions
if [ -f ./src/extensions/$EXT_NAME/tests/selenium/LocalSettings.php ]; then
cd ./src/extensions/$EXT_NAME/tests/selenium
. '/srv/deployment/integration/slave-scripts/bin/mw-selenium-setup.sh'
fi
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>. /srv/deployment/integration/slave-scripts/bin/mw-set-env-localhost.sh
cd $MW_INSTALL_PATH
if [ -f ./tests/selenium/wdio.conf.js ]; then
chromedriver --url-base=/wd/hub --port=4444 &amp;
# Make sure it is killed to prevent file descriptors leak
function kill_chromedriver() {
killall chromedriver &gt; /dev/null
}
trap kill_chromedriver EXIT
./node_modules/.bin/grunt webdriver:test
fi
</command>
</hudson.tasks.Shell>
<hudson.tasks.Shell>
<command>set -eu
# The set of log files checked come from integration/jenkins
# mediawiki/conf.d/00_set_debug_log.php
#
# Namely:
# $wgDBerrorLog = &quot;$wmgMwLogDir/mw-dberror.log&quot;;
# $wgDebugLogGroups['exception'] = &quot;$wmgMwLogDir/mw-exception.log&quot;;
# $wgDebugLogGroups['error'] = &quot;$wmgMwLogDir/mw-error.log&quot;;
#
ERROR_FILES=( mw-dberror.log mw-exception.log mw-error.log )
echo &quot;Asserting empty files: ${ERROR_FILES[*]}&quot;
# The minimum RELx_xxx version for which we want to run this test
REL_MAJOR=1
REL_MINOR=30
# The minimum wmf/1.x.0-wmf.xx version for which we want to run this test
WMF_MAJOR=30
WMF_MINOR=12
# A valid version is a version &gt; wmf/1.WMF_MAJOR.0-wmf.WMF_MINOR
valid_wmf_version() {
local version major minor
version=&quot;$1&quot;
major=${version%.*.*}
major=${major##*.}
minor=${version##*.}
if (( major == WMF_MAJOR )) &amp;&amp; (( minor &gt;= WMF_MINOR )); then
return 0
elif (( major &gt; WMF_MAJOR )); then
return 0
else
return 1
fi
}
# A valid version is a version &gt; REL{REL_MAJOR}_{REL_MINOR}
valid_rel_version() {
local version major minor
version=&quot;$1&quot;
major=${version%%_*}
minor=${version##*_}
if (( major == REL_MAJOR )) &amp;&amp; (( minor &gt;= REL_MINOR )); then
return 0
elif (( major &gt; REL_MAJOR )); then
return 0
else
return 1
fi
}
# Ensures that this is a ZUUL_BRANCH for which we want this to be a valid test
valid_version() {
local version wmf_version rel_version
version=&quot;$1&quot;
# Master is valid
if [[ &quot;$version&quot; == &quot;master&quot; ]]; then
return 0
fi
# Is this is a wmf/something
wmf_version=&quot;${version#wmf\/}&quot;
if (( ${#version} != ${#wmf_version} )); then
valid_wmf_version &quot;$wmf_version&quot; &amp;&amp; return 0
fi
# Is this is a RELsomething
rel_version=&quot;${version#REL}&quot;
if (( ${#version} != ${#rel_version} )); then
valid_rel_version &quot;$rel_version&quot; &amp;&amp; return 0
fi
# Unidentified version: invalid
return 1
}
if ! valid_version &quot;$ZUUL_BRANCH&quot;; then
printf 'Test not for branch: %s\n' &quot;$ZUUL_BRANCH&quot;
exit 0
fi
log_files=&quot;$( cd &quot;$WORKSPACE/log&quot;; ls &quot;${ERROR_FILES[@]}&quot; 2&gt; /dev/null || :)&quot;
if [ ! &quot;$log_files&quot; ]; then
echo &quot;No error files. GOOD&quot;
exit 0
fi
echo &quot;Dumping file(s) $log_files&quot;
set +e
# Use `grep --color . file list` to ensure that file names appear next
# to log messages
(cd &quot;$WORKSPACE/log&quot;; grep --color . &quot;${ERROR_FILES[@]}&quot; 2&gt; /dev/null)
set -e
echo -e &quot;MediaWiki emitted some errors. Check output above.&quot;
exit 1
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<org.jenkinsci.plugins.postbuildscript.PostBuildScript>
<buildSteps>
<hudson.plugins.parameterizedtrigger.TriggerBuilder>
<configs>
<hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
<configs>
<hudson.plugins.parameterizedtrigger.CurrentBuildParameters/>
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
<properties>TRIGGERED_JOB_NAME=$JOB_NAME
TRIGGERED_SSH_CONNECTION=$SSH_CONNECTION
</properties>
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
</configs>
<projects>castor-save</projects>
<condition>ALWAYS</condition>
<triggerWithNoParameters>false</triggerWithNoParameters>
<buildAllNodesWithLabel>false</buildAllNodesWithLabel>
<block/>
</hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig>
</configs>
</hudson.plugins.parameterizedtrigger.TriggerBuilder>
</buildSteps>
<scriptOnlyIfSuccess>true</scriptOnlyIfSuccess>
<scriptOnlyIfFailure>false</scriptOnlyIfFailure>
<markBuildUnstable>false</markBuildUnstable>
</org.jenkinsci.plugins.postbuildscript.PostBuildScript>
<hudson.tasks.ArtifactArchiver>
<artifacts>log/*</artifacts>
<latestOnly>false</latestOnly>
<defaultExcludes>true</defaultExcludes>
</hudson.tasks.ArtifactArchiver>
</publishers>
<buildWrappers>
<hudson.plugins.build__timeout.BuildTimeoutWrapper>
<timeoutMinutes>30</timeoutMinutes>
<failBuild>true</failBuild>
<writingDescription>false</writingDescription>
<timeoutPercentage>0</timeoutPercentage>
<timeoutMinutesElasticDefault>3</timeoutMinutesElasticDefault>
<timeoutType>absolute</timeoutType>
</hudson.plugins.build__timeout.BuildTimeoutWrapper>
<hudson.plugins.timestamper.TimestamperBuildWrapper/>
<hudson.plugins.ansicolor.AnsiColorBuildWrapper/>
</buildWrappers>
</project>

File Metadata

Mime Type
application/xml
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5732082
Default Alt Text
mwext-mw-selenium-node-composer-jessie (15 KB)

Event Timeline