diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..d09de0470 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Maven +# Build your Java project and run tests with Apache Maven. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/java + +trigger: + branches: + include: + - '*' # must quote since "*" is a YAML reserved character; we want a string + +pool: + vmImage: 'ubuntu-16.04' + +steps: +- task: Maven@3 + inputs: + mavenPomFile: 'pom.xml' + mavenOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/surefire-reports/TEST-*.xml' + goals: 'package' diff --git a/flink-connector-mysql-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/mysql/utils/MySQLContainer.java b/flink-connector-mysql-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/mysql/utils/MySQLContainer.java index 46310df15..ea9b88c9a 100644 --- a/flink-connector-mysql-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/mysql/utils/MySQLContainer.java +++ b/flink-connector-mysql-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/mysql/utils/MySQLContainer.java @@ -18,7 +18,6 @@ package com.alibaba.ververica.cdc.connectors.mysql.utils; -import org.jetbrains.annotations.NotNull; import org.testcontainers.containers.ContainerLaunchException; import org.testcontainers.containers.JdbcDatabaseContainer; @@ -50,7 +49,6 @@ public class MySQLContainer extends JdbcDatabaseContainer { addExposedPort(MYSQL_PORT); } - @NotNull @Override protected Set getLivenessCheckPorts() { return new HashSet<>(getMappedPort(MYSQL_PORT)); diff --git a/flink-connector-postgres-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/postgres/PostgresTestBase.java b/flink-connector-postgres-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/postgres/PostgresTestBase.java index d4fbd247e..ea5e03a05 100644 --- a/flink-connector-postgres-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/postgres/PostgresTestBase.java +++ b/flink-connector-postgres-cdc/src/test/java/com/alibaba/ververica/cdc/connectors/postgres/PostgresTestBase.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.lifecycle.Startables; +import org.testcontainers.utility.DockerImageName; import java.net.URL; import java.nio.file.Files; @@ -50,8 +51,11 @@ public abstract class PostgresTestBase extends AbstractTestBase { private static final Logger LOG = LoggerFactory.getLogger(PostgresTestBase.class); private static final Pattern COMMENT_PATTERN = Pattern.compile("^(.*)--.*$"); + private static final DockerImageName PG_IMAGE = DockerImageName + .parse("debezium/postgres:9.6") + .asCompatibleSubstituteFor("postgres"); - protected static final PostgreSQLContainer POSTGERS_CONTAINER = new PostgreSQLContainer<>("debezium/postgres:9.6") + protected static final PostgreSQLContainer POSTGERS_CONTAINER = new PostgreSQLContainer<>(PG_IMAGE) .withDatabaseName("postgres") .withUsername("postgres") .withPassword("postgres") diff --git a/pom.xml b/pom.xml index 6c7f5670a..dbb91a531 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ under the License. 1.11.1 1.2.1.Final - 1.14.3 + 1.15.1 1.8 2.11 ${java.version}