Commit 68259885 authored by Boris Feld's avatar Boris Feld

Import scmperf Jenkinsfile from evolve-ci

parents
pipeline {
agent { label 'gcloud-public' }
environment {
HGTEST_PORT = Integer.toString(Math.abs((new Random().nextInt() % 8000) * 5) + 20000)
}
stages {
stage('Checkout Mercurial') {
steps {
checkout([$class: 'MercurialSCM', credentialsId: '', source: 'https://www.mercurial-scm.org/repo/hg/', revision: 'tip', clean: true, disableChangeLog: false, subdir: 'mercurial'])
}
}
stage('Checkout Scmperf') {
steps {
checkout([$class: 'MercurialSCM', credentialsId: '', source: 'https://bitbucket.org/octobus/bighgperf/', clean: true, disableChangeLog: false, subdir: 'scmperf'])
}
}
stage('Install dependencies') {
steps {
dir("scmperf") {
sh "virtualenv .venv"
sh ".venv/bin/pip install -U pip"
sh ".venv/bin/pip install -r requirements.txt"
}
}
}
stage("Compiled tests") {
steps {
dir("scmperf/tests") {
withEnv(['PATH+EXTRA=../.venv/bin']) {
catchError {
sh "echo $HGTEST_PORT"
sh "hg id"
sh "which -a hg"
sh "hg debuginstall"
sh "hg --version -q"
sh "pip freeze"
sh "which asv"
sh "which python"
sh "pwd"
sh "(. ../.venv/bin/activate; pip install -r ../requirements.txt; ../../mercurial/tests/run-tests.py -j 1 --allow-slow-tests)"
}
}
}
}
}
stage("Unit tests") {
steps {
dir("scmperf") {
catchError {
sh ".venv/bin/pytest tests"
}
}
}
}
}
post {
failure {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'boris.feld@octobus.net pierre-yves.david@octobus.net', sendToIndividuals: false])
sh "CHANNEL=octobus-hg ./irc_notification.sh 'ScmPerf build is broken, see ${BUILD_URL}'"
}
}
}
#!/bin/bash
set -euox pipefail
MSG=$1
SERVER=irc.freenode.net
CHANNEL="${CHANNEL:-hg-evolve}"
USER=octobus-ci
(
echo NICK $USER
echo USER $USER 8 x : $USER
sleep 1
#echo PASS $USER:$MYPASSWORD
echo "JOIN #$CHANNEL"
echo "PRIVMSG #$CHANNEL" :$MSG
echo QUIT
) | nc $SERVER 6667
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment