Skip to content

Commit

Permalink
DAT-16295 Configure liquibase-yugabytedb repo to use build-logic (#155)
Browse files Browse the repository at this point in the history
* DAT-16295

* Fix tests

---------

Co-authored-by: filipe <[email protected]>
  • Loading branch information
jandroav and filipelautert authored Nov 16, 2023
1 parent 5d3a68b commit 6add7b7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 205 deletions.
25 changes: 2 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
build:
needs: authorize
uses: liquibase/build-logic/.github/workflows/[email protected]
with:
java: '[11, 17, 18]'
secrets: inherit

# integration-test:
Expand Down Expand Up @@ -57,26 +55,7 @@ jobs:
# **/target/jacoco.exec



dependabot:
name: Merge dependabot
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
pull-requests: write
if: ${{ github.actor == 'dependabot[bot]' }}

steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/[email protected]

- name: Approve patch and minor updates
if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'}}
run: |
gh pr merge --auto --merge "$PR_URL"
gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch or minor update**"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
uses: liquibase/build-logic/.github/workflows/[email protected]
secrets: inherit
203 changes: 25 additions & 178 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,26 @@
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>

<parent>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-parent-pom</artifactId>
<version>0.3.2</version>
</parent>

<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-yugabytedb</artifactId>
<version>0-SNAPSHOT</version>
<version>4.25.0-SNAPSHOT</version>

<name>Liquibase Extension: YugabyteDB support</name>
<description>Add this Liquibase extension to your project to support YugabyteDB</description>
<url>https://github.com/liquibase/liquibase-yugabytedb</url>

<organization>
<name>Yugabyte, Inc.</name>
<url>http://www.yugabyte.com</url>
</organization>

<licenses>
<license>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<name>Apache License, Version 2.0</name>
</license>
</licenses>

<issueManagement>
<url>https://github.com/liquibase/liquibase-yugabytedb/issues</url>
</issueManagement>

<scm>
<connection>scm:git:http://github.com/liquibase/liquibase-yugabytedb.git</connection>
<url>https://github.com/liquibase/liquibase-yugabytedb</url>
<tag>HEAD</tag>
</scm>
<connection>scm:git:${project.scm.url}</connection>
<developerConnection>scm:git:${project.scm.url}</developerConnection>
<url>https://github.com/liquibase/liquibase-yugabytedb.git</url>
<tag>HEAD</tag>
</scm>

<developers>
<developer>
Expand All @@ -57,57 +48,18 @@
<email>[email protected]</email>
</developer>
</developers>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<liquibase.version>4.25.0</liquibase.version>
<liquibase.sdk.github.token>${env.GITHUB_TOKEN}</liquibase.sdk.github.token>

<sonar.organization>liquibase</sonar.organization>
<sonar.projectKey>${project.artifactId}</sonar.projectKey>
<sonar.projectName>${project.name}</sonar.projectName>
<sonar.projectDescription>${project.description}</sonar.projectDescription>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.scm.provider>git</sonar.scm.provider>
<sonar.qualitygate.wait>true</sonar.qualitygate.wait>

<jacoco.fileset.directory>target</jacoco.fileset.directory>
</properties>

<dependencies>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-commercial</artifactId>
<version>${liquibase.version}</version>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>2.2-groovy-2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-test-harness</artifactId>
<version>1.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.yugabyte</groupId>
<artifactId>jdbc-yugabytedb</artifactId>
<version>42.3.5-yb-4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
Expand All @@ -125,6 +77,18 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>com.yugabyte</groupId>
<artifactId>jdbc-yugabytedb</artifactId>
<version>42.3.5-yb-3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand All @@ -137,121 +101,4 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>8</release>
<optimize>true</optimize>
<debug>true</debug>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reportFormat>plain</reportFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<attach>true</attach>
<author>false</author>
<doctitle>Liquibase YugabyteDB ${version} API</doctitle>
<quiet>true</quiet>
<doclint>none</doclint>
<encoding>UTF-8</encoding>

<includeDependencySources>false</includeDependencySources>
</configuration>
<executions>
<execution>
<id>javadoc-default</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<configuration>
<fileSets>
<fileSet>
<directory>${jacoco.fileset.directory}</directory>
<includes>
<include>**/jacoco.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</plugin>

<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.10.0.2594</version>
</plugin>

<plugin>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-sdk-maven-plugin</artifactId>
<version>0.10.22</version>
</plugin>
</plugins>

</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package liquibase.harness.snapshot.yugabytedb

import liquibase.harness.snapshot.SnapshotTest
import liquibase.harness.snapshot.SnapshotObjectTests
import liquibase.snapshot.DatabaseSnapshot
import liquibase.structure.core.Column
import liquibase.structure.core.Table
Expand Down Expand Up @@ -34,4 +34,4 @@ import liquibase.structure.core.Table
}
}
],
] as SnapshotTest.TestConfig[]
] as SnapshotObjectTests[]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package liquibase.harness.snapshot.yugabytedb

import liquibase.harness.snapshot.SnapshotTest
import liquibase.harness.snapshot.SnapshotObjectTests
import liquibase.snapshot.DatabaseSnapshot
import liquibase.structure.core.Table

Expand All @@ -17,4 +17,4 @@ import liquibase.structure.core.Table

}
],
] as SnapshotTest.TestConfig[]
] as SnapshotObjectTests[]

0 comments on commit 6add7b7

Please sign in to comment.