Skip to content

Commit

Permalink
Merge pull request #16746 from stuartwdouglas/containers-fix
Browse files Browse the repository at this point in the history
Use newer versions of containers
  • Loading branch information
stuartwdouglas authored Apr 23, 2021
2 parents 89130b4 + f24213a commit 0300aab
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@

public class DB2DevServicesProcessor {

/**
* If you update this remember to update the container-license-acceptance.txt in the tests
*/
public static final String TAG = "11.5.5.1";

@BuildStep
DevServicesDatasourceProviderBuildItem setupDB2() {
return new DevServicesDatasourceProviderBuildItem(DatabaseKind.DB2, new DevServicesDatasourceProvider() {
@Override
public RunningDevServicesDatasource startDatabase(Optional<String> username, Optional<String> password,
Optional<String> datasourceName, Optional<String> imageName, Map<String, String> additionalProperties) {
Db2Container container = new Db2Container(
DockerImageName.parse(imageName.orElse("ibmcom/db2:" + Db2Container.DEFAULT_TAG))
DockerImageName.parse(imageName.orElse("ibmcom/db2:" + TAG))
.asCompatibleSubstituteFor(DockerImageName.parse("ibmcom/db2")))
.withPassword(password.orElse("quarkus"))
.withUsername(username.orElse("quarkus"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@

public class MariaDBDevServicesProcessor {

public static final String TAG = "10.5.9";

@BuildStep
DevServicesDatasourceProviderBuildItem setupMariaDB() {
return new DevServicesDatasourceProviderBuildItem(DatabaseKind.MARIADB, new DevServicesDatasourceProvider() {
@Override
public RunningDevServicesDatasource startDatabase(Optional<String> username, Optional<String> password,
Optional<String> datasourceName, Optional<String> imageName, Map<String, String> additionalProperties) {
MariaDBContainer container = new MariaDBContainer(
DockerImageName.parse(imageName.orElse(MariaDBContainer.IMAGE + ":" + MariaDBContainer.DEFAULT_TAG))
DockerImageName.parse(imageName.orElse(MariaDBContainer.IMAGE + ":" + TAG))
.asCompatibleSubstituteFor(DockerImageName.parse(MariaDBContainer.IMAGE)))
.withPassword(password.orElse("quarkus"))
.withUsername(username.orElse("quarkus"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

public class MSSQLDevServicesProcessor {

/**
* If you update this remember to update the container-license-acceptance.txt in the tests
*/
public static final String TAG = "2019-CU10-ubuntu-20.04";

@BuildStep
DevServicesDatasourceProviderBuildItem setupMSSQL() {
return new DevServicesDatasourceProviderBuildItem(DatabaseKind.MSSQL, new DevServicesDatasourceProvider() {
Expand All @@ -24,7 +29,7 @@ public RunningDevServicesDatasource startDatabase(Optional<String> username, Opt
Optional<String> datasourceName, Optional<String> imageName, Map<String, String> additionalProperties) {
JdbcDatabaseContainer container = new MSSQLServerContainer(
DockerImageName
.parse(imageName.orElse(MSSQLServerContainer.IMAGE + ":" + MSSQLServerContainer.DEFAULT_TAG))
.parse(imageName.orElse(MSSQLServerContainer.IMAGE + ":" + TAG))
.asCompatibleSubstituteFor(MSSQLServerContainer.IMAGE))
.withPassword(password.orElse("Quarkuspassword1"));
additionalProperties.forEach(container::withUrlParam);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@

public class MySQLDevServicesProcessor {

public static final String TAG = "8.0.24";

@BuildStep
DevServicesDatasourceProviderBuildItem setupMysql() {
return new DevServicesDatasourceProviderBuildItem(DatabaseKind.MYSQL, new DevServicesDatasourceProvider() {
@Override
public RunningDevServicesDatasource startDatabase(Optional<String> username, Optional<String> password,
Optional<String> datasourceName, Optional<String> imageName, Map<String, String> additionalProperties) {
MySQLContainer container = new MySQLContainer(
DockerImageName.parse(imageName.orElse(MySQLContainer.IMAGE + ":" + MySQLContainer.DEFAULT_TAG))
DockerImageName.parse(imageName.orElse(MySQLContainer.IMAGE + ":" + TAG))
.asCompatibleSubstituteFor(DockerImageName.parse(MySQLContainer.IMAGE)))
.withPassword(password.orElse("quarkus"))
.withUsername(username.orElse("quarkus"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

public class PostgresqlDevServicesProcessor {

public static final String DEFAULT = PostgreSQLContainer.IMAGE + ":" + PostgreSQLContainer.DEFAULT_TAG;
public static final String TAG = "13.2";

@BuildStep
DevServicesDatasourceProviderBuildItem setupPostgres() {
Expand All @@ -24,7 +24,7 @@ DevServicesDatasourceProviderBuildItem setupPostgres() {
public RunningDevServicesDatasource startDatabase(Optional<String> username, Optional<String> password,
Optional<String> datasourceName, Optional<String> imageName, Map<String, String> additionalProperties) {
PostgreSQLContainer container = new PostgreSQLContainer(
DockerImageName.parse(imageName.orElse(DEFAULT))
DockerImageName.parse(imageName.orElse(PostgreSQLContainer.IMAGE + ":" + TAG))
.asCompatibleSubstituteFor(DockerImageName.parse(PostgreSQLContainer.IMAGE)))
.withPassword(password.orElse("quarkus"))
.withUsername(username.orElse("quarkus"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ibmcom/db2:11.5.0.0a
ibmcom/db2:11.5.5.1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mcr.microsoft.com/mssql/server:2017-CU12
mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04

0 comments on commit 0300aab

Please sign in to comment.