Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update releases-docker.jfrog.io/jfrog/artifactory-oss docker tag to v7.84.14 #1933

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion embedded-artifactory/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

* `embedded.artifactory.enabled` `(true|false, default is true)`
* `embedded.artifactory.reuseContainer` `(true|false, default is false)`
* `embedded.artifactory.dockerImage` `(default is 'releases-docker.jfrog.io/jfrog/artifactory-oss:7.77.12')`
* `embedded.artifactory.dockerImage` `(default is 'releases-docker.jfrog.io/jfrog/artifactory-oss:7.98.9')`
** Release notes on https://www.jfrog.com/confluence/display/JFROG/Artifactory+Release+Notes[jfrog.com]
* `embedded.artifactory.networkAlias` `(default is 'artifactory')`
* `embedded.artifactory.username` `(default is 'admin')`
Expand Down
6 changes: 5 additions & 1 deletion embedded-artifactory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-toxiproxy</artifactId>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
</dependency>

<dependency>
<groupId>io.rest-assured</groupId>
Expand All @@ -46,4 +50,4 @@
</exclusions>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public ArtifactoryProperties() {
public String getDefaultDockerImage() {
// Please don`t remove this comment.
// renovate: datasource=docker
return "releases-docker.jfrog.io/jfrog/artifactory-oss:7.77.12";
return "releases-docker.jfrog.io/jfrog/artifactory-oss:7.98.9";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.springframework.core.env.MapPropertySource;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.Network;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.containers.ToxiproxyContainer;
import org.testcontainers.containers.wait.strategy.HttpWaitStrategy;
import org.testcontainers.containers.wait.strategy.WaitStrategy;
Expand All @@ -32,7 +33,7 @@
@ConditionalOnExpression("${embedded.containers.enabled:true}")
@AutoConfigureAfter(DockerPresenceBootstrapConfiguration.class)
@ConditionalOnProperty(name = "embedded.artifactory.enabled", matchIfMissing = true)
@EnableConfigurationProperties(ArtifactoryProperties.class)
@EnableConfigurationProperties({ArtifactoryProperties.class, PostgreSQLProperties.class})
public class EmbeddedArtifactoryBootstrapConfiguration {

private static final String ARTIFACTORY_NETWORK_ALIAS = "artifactory.testcontainer.docker";
Expand Down Expand Up @@ -69,14 +70,33 @@ ToxiproxyContainer.ContainerProxy artifactoryContainerProxy(ToxiproxyContainer t
@Bean(name = ARTIFACTORY_BEAN_NAME, destroyMethod = "stop")
public GenericContainer<?> artifactory(ConfigurableEnvironment environment,
ArtifactoryProperties properties,
PostgreSQLProperties postgresqlProperties,
WaitStrategy artifactoryWaitStrategy,
Optional<Network> network) {

PostgreSQLContainer postgresql =
new PostgreSQLContainer<>(ContainerUtils.getDockerImageName(postgresqlProperties))
.withNetwork(Network.SHARED)
.withUsername(postgresqlProperties.getUser())
.withPassword(postgresqlProperties.getPassword())
.withDatabaseName(postgresqlProperties.getDatabase())
.withInitScript(postgresqlProperties.initScriptPath)
.withNetworkAliases(properties.getNetworkAlias(), ARTIFACTORY_NETWORK_ALIAS)
.withNetworkAliases(ARTIFACTORY_NETWORK_ALIAS);

network.ifPresent(postgresql::withNetwork);
configureCommonsAndStart(postgresql, postgresqlProperties, log);

GenericContainer<?> container =
new GenericContainer<>(ContainerUtils.getDockerImageName(properties))
.withExposedPorts(properties.getRestApiPort(), properties.getGeneralPort())
.withNetwork(Network.SHARED)
.withNetworkAliases(properties.getNetworkAlias(), ARTIFACTORY_NETWORK_ALIAS)
.withEnv("username", postgresqlProperties.user)
.withEnv("password", postgresqlProperties.password)
.withEnv("url", "jdbc:postgresql://localhost:5432/" + postgresqlProperties.database)
.withEnv("type", "postgresql")
.withEnv("driver", "org.postgresql.Driver")
.waitingFor(artifactoryWaitStrategy);

network.ifPresent(container::withNetwork);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.playtika.testcontainer.artifactory;

import com.playtika.testcontainer.common.properties.CommonContainerProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@EqualsAndHashCode(callSuper = true)
@ConfigurationProperties("embedded.artifactory.postgresql")
public class PostgreSQLProperties extends CommonContainerProperties {
static final String BEAN_NAME_EMBEDDED_POSTGRESQL = "embeddedPostgreSql";

String user = "artifactory";
String password = "artifactory";
String database = "artifactory";
String startupLogCheckRegex;
/**
* The SQL file path to execute after the container starts to initialize the database.
*/
String initScriptPath;

// https://hub.docker.com/_/postgres
@Override
public String getDefaultDockerImage() {
// Please don`t remove this comment.
// renovate: datasource=docker
return "postgres:17-alpine";
}
}
Loading