2019-10-29 00:46:56 +01:00
|
|
|
// Job definition to test PostgreSQL connector against different PostgreSQL versions
|
|
|
|
|
2020-10-12 18:27:17 +02:00
|
|
|
matrixJob('connector-debezium-postgresql-matrix-test') {
|
2019-10-29 00:46:56 +01:00
|
|
|
|
2020-10-12 18:27:17 +02:00
|
|
|
displayName('Debezium PostgreSQL Connector Test Matrix')
|
2019-10-29 00:46:56 +01:00
|
|
|
description('Executes tests for PostgreSQL Connector with PostgreSQL matrix')
|
|
|
|
label('Slave')
|
|
|
|
combinationFilter('''
|
|
|
|
DECODER_PLUGIN == "decoderbufs" ||
|
2019-11-28 13:13:23 +01:00
|
|
|
(DECODER_PLUGIN == "pgoutput" && (POSTGRES_VERSION == "10" || POSTGRES_VERSION == "11")) ||
|
|
|
|
POSTGRES_VERSION == "12"
|
2019-10-29 00:46:56 +01:00
|
|
|
''')
|
|
|
|
|
|
|
|
axes {
|
2019-11-28 13:13:23 +01:00
|
|
|
text('POSTGRES_VERSION', '10', '11', '12')
|
2020-04-02 14:07:44 +02:00
|
|
|
text('DECODER_PLUGIN', 'decoderbufs', 'wal2json', 'wal2json_streaming', 'pgoutput')
|
2020-10-12 10:19:55 +02:00
|
|
|
label("Node", "Slave")
|
2019-10-29 00:46:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
properties {
|
|
|
|
githubProjectUrl('https://github.com/debezium/debezium')
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters {
|
|
|
|
stringParam('REPOSITORY', 'https://github.com/debezium/debezium', 'Repository from which Debezium is built')
|
2019-12-10 15:08:40 +01:00
|
|
|
stringParam('BRANCH', 'master', 'A branch/tag from which Debezium is built')
|
|
|
|
stringParam('SOURCE_URL', "", "URL to productised sources")
|
|
|
|
booleanParam('PRODUCT_BUILD', false, 'Is this a productised build?')
|
2019-10-29 00:46:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
cron('H 04 * * 1-5')
|
|
|
|
}
|
|
|
|
|
|
|
|
wrappers {
|
2019-12-10 15:08:40 +01:00
|
|
|
preBuildCleanup()
|
|
|
|
|
2019-10-29 00:46:56 +01:00
|
|
|
timeout {
|
|
|
|
noActivity(1200)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishers {
|
|
|
|
archiveJunit('**/target/surefire-reports/*.xml')
|
|
|
|
archiveJunit('**/target/failsafe-reports/*.xml')
|
|
|
|
mailer('jpechane@redhat.com', false, true)
|
|
|
|
}
|
|
|
|
|
|
|
|
logRotator {
|
|
|
|
daysToKeep(7)
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
2019-12-10 15:08:40 +01:00
|
|
|
shell('''
|
|
|
|
# Ensure WS cleaup
|
|
|
|
ls -A1 | xargs rm -rf
|
|
|
|
|
|
|
|
# Retrieve sources
|
|
|
|
if [ "$PRODUCT_BUILD" == true ] ; then
|
|
|
|
PROFILE_PROD="pnc"
|
|
|
|
curl -OJs $SOURCE_URL && unzip debezium-*-src.zip
|
|
|
|
else
|
|
|
|
PROFILE_PROD="none"
|
|
|
|
git clone $REPOSITORY .
|
|
|
|
git checkout $BRANCH
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Setup pg config for Alpine distributions
|
|
|
|
if [[ $POSTGRES_VERSION =~ alpine$ ]] ; then
|
|
|
|
MAVEN_ARGS = "-Dpostgres.config.file=/usr/local/share/postgresql/postgresql.conf.sample"
|
|
|
|
else
|
|
|
|
MAVEN_ARGS="-Dnone"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Run maven build
|
2020-06-25 11:03:48 +02:00
|
|
|
mvn clean install -U -s $HOME/.m2/settings-snapshots.xml -pl debezium-connector-postgres -am -fae \
|
2019-12-10 15:08:40 +01:00
|
|
|
-Dmaven.test.failure.ignore=true \
|
|
|
|
-Dpostgres.port=55432 \
|
|
|
|
-Dversion.postgres.server=$POSTGRES_VERSION \
|
|
|
|
-Ddecoder.plugin.name=$DECODER_PLUGIN \
|
|
|
|
-Dtest.argline="-Ddebezium.test.records.waittime=5" \
|
|
|
|
-Dinsecure.repositories=WARN \
|
|
|
|
-P$PROFILE_PROD \
|
|
|
|
$MAVEN_ARGS
|
|
|
|
''')
|
2019-10-29 00:46:56 +01:00
|
|
|
}
|
|
|
|
}
|