Skip to content

Commit

Permalink
LIBS-611 - Rename to springtainer-mysql (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
hennes-maertins authored and julian-eggers committed Dec 19, 2019
1 parent 04950c3 commit 34c79b2
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 46 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-

- name: deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: mvn clean verify deploy

- name: sonar-analyse
run: |
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
mvn clean verify sonar:sonar \
mvn sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io/ \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.java.binaries=./target/classes
- name: deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: mvn deploy
1 change: 1 addition & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
-Dsonar.organization=${SONAR_ORGANIZATION} \
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
-Dsonar.pullrequest.key=${GITHUB_PULL_REQUEST} \
-Dsonar.pullrequest.branch=${GITHUB_REF} \
-Dsonar.java.binaries=./target/classes
- name: pom-analyse
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 springboot-testcontainer
Copyright (c) 2018 springtainer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# springboot-testcontainer-mysql
# springtainer-mysql

[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/avides/springboot/testcontainer/springboot-testcontainer-mysql/maven-metadata.xml.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.avides.springboot.testcontainer%22%20AND%20a%3A%22springboot-testcontainer-mysql%22)
[![Build](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/workflows/release/badge.svg)](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/actions)
[![Nightly build](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/workflows/nightly/badge.svg)](https://github.com/springboot-testcontainer/springboot-testcontainer-mysql/actions)
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=coverage)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=alert_status)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=springboot-testcontainer_springboot-testcontainer-mysql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=springboot-testcontainer_springboot-testcontainer-mysql)
[![Maven Central](https://img.shields.io/maven-metadata/v/http/central.maven.org/maven2/com/avides/springboot/springtainer/springtainer-mysql/maven-metadata.xml.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.avides.springboot.springtainer%22%20AND%20a%3A%22springtainer-mysql%22)
[![Build](https://github.com/springtainer/springtainer-mysql/workflows/release/badge.svg)](https://github.com/springtainer/springtainer-mysql/actions)
[![Nightly build](https://github.com/springtainer/springtainer-mysql/workflows/nightly/badge.svg)](https://github.com/springtainer/springtainer-mysql/actions)
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=coverage)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=alert_status)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=springtainer_springtainer-mysql&metric=sqale_index)](https://sonarcloud.io/dashboard?id=springtainer_springtainer-mysql)

### Dependency
```xml
<dependency>
<groupId>com.avides.springboot.testcontainer</groupId>
<artifactId>springboot-testcontainer-mysql</artifactId>
<version>1.0.0-RC2</version>
<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-mysql</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
```
Expand Down Expand Up @@ -41,14 +41,14 @@ spring.datasource.password=${embedded.container.mysql.root-password}
## Logging
To reduce logging insert this into the logback-configuration:
```xml
<!-- Testcontainers -->
<!-- Springtainer -->
<logger name="com.github.dockerjava.jaxrs" level="WARN" />
<logger name="com.github.dockerjava.core.command" level="WARN" />
<logger name="org.apache.http" level="WARN" />
```

## Labels
The container exports multiple labels to analyze running testcontainers:
- `TESTCONTAINER_SERVICE=mysql`
- `TESTCONTAINER_IMAGE=${embedded.container.mysql.docker-image}`
- `TESTCONTAINER_STARTED=$currentTimestamp`
The container exports multiple labels to analyze running springtainers:
- `SPRINGTAINER_SERVICE=mysql`
- `SPRINGTAINER_IMAGE=${embedded.container.mysql.docker-image}`
- `SPRINGTAINER_STARTED=$currentTimestamp`
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.avides.springboot.testcontainer</groupId>
<artifactId>springboot-testcontainer-mysql</artifactId>
<version>1.0.0-RC2</version>
<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-mysql</artifactId>
<version>1.0.0</version>

<name>springboot-testcontainer-mysql</name>
<name>springtainer-mysql</name>
<description>MySQL test-container</description>
<url>https://github.com/springboot-testcontainer/springboot-testcontainer-mysql</url>
<url>https://github.com/springtainer/springtainer-mysql</url>
<organization>
<name>AVIDES Media AG</name>
<url>http://www.avides.com</url>
Expand All @@ -27,9 +27,9 @@
</developers>

<scm>
<url>https://github.com/springboot-testcontainer/springboot-testcontainer-mysql</url>
<connection>scm:git:https://github.com/springboot-testcontainer/springboot-testcontainer-mysql.git</connection>
<developerConnection>scm:git:https://github.com/springboot-testcontainer/springboot-testcontainer-mysql.git</developerConnection>
<url>https://github.com/springtainer/springtainer-mysql</url>
<connection>scm:git:https://github.com/springtainer/springtainer-mysql.git</connection>
<developerConnection>scm:git:https://github.com/springtainer/springtainer-mysql.git</developerConnection>
</scm>

<properties>
Expand Down Expand Up @@ -59,7 +59,7 @@
<spring.version>5.2.1.RELEASE</spring.version>
<spring-boot.version>2.2.1.RELEASE</spring-boot.version>
<!-- Other -->
<springboot-testcontainer-common.version>1.0.0-RC2</springboot-testcontainer-common.version>
<springtainer-common.version>1.0.0</springtainer-common.version>
</properties>

<dependencies>
Expand All @@ -71,9 +71,9 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.avides.springboot.testcontainer</groupId>
<artifactId>springboot-testcontainer-common</artifactId>
<version>${springboot-testcontainer-common.version}</version>
<groupId>com.avides.springboot.springtainer</groupId>
<artifactId>springtainer-common</artifactId>
<version>${springtainer-common.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import static com.avides.springboot.testcontainer.mysql.MysqlProperties.BEAN_NAME;
import static com.avides.springboot.springtainer.mysql.MysqlProperties.BEAN_NAME;

import java.sql.Connection;
import java.sql.DriverManager;
Expand All @@ -21,8 +21,8 @@
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;

import com.avides.springboot.testcontainer.common.container.AbstractBuildingEmbeddedContainer;
import com.avides.springboot.testcontainer.common.container.EmbeddedContainer;
import com.avides.springboot.springtainer.common.container.AbstractBuildingEmbeddedContainer;
import com.avides.springboot.springtainer.common.container.EmbeddedContainer;
import com.github.dockerjava.api.command.CreateContainerCmd;

import lombok.SneakyThrows;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.avides.springboot.testcontainer.common.container.AbstractEmbeddedContainerProperties;
import com.avides.springboot.springtainer.common.container.AbstractEmbeddedContainerProperties;

import lombok.Getter;
import lombok.Setter;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/spring.factories
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
org.springframework.cloud.bootstrap.BootstrapConfiguration=\
com.avides.springboot.testcontainer.mysql.EmbeddedMysqlContainerAutoConfiguration
com.avides.springboot.springtainer.mysql.EmbeddedMysqlContainerAutoConfiguration
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import javax.annotation.PostConstruct;
import javax.sql.DataSource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.avides.springboot.testcontainer.mysql;
package com.avides.springboot.springtainer.mysql;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
Expand Down

0 comments on commit 34c79b2

Please sign in to comment.