diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000..eb5a316cbd195 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +target diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000..7095badb29a4d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM swd847/centos-graal-maven +ENV DATABASE_URL=jdbc:postgresql:hibernate_orm_test +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app +COPY . /usr/src/app +ENTRYPOINT ["mvn", "-Dno-postgres"] + + diff --git a/codeship-services.yml b/codeship-services.yml new file mode 100644 index 0000000000000..ad7d6846a4b63 --- /dev/null +++ b/codeship-services.yml @@ -0,0 +1,17 @@ +shamrock: + build: + image: swd847/shamrock + dockerfile: Dockerfile + depends_on: + - postgres + environment: + - DATABASE_URL=jdbc:postgresql://postgres/hibernate_orm_test +# volumes: +# - /Users/stuart/.m2:/root/.m2 +postgres: + image: healthcheck/postgres:alpine + environment: + POSTGRES_USER: hibernate_orm_test + POSTGRES_PASSWORD: hibernate_orm_test + POSTGRES_DB: hibernate_orm_test + diff --git a/codeship-steps.yml b/codeship-steps.yml new file mode 100644 index 0000000000000..ef0c3ea25845b --- /dev/null +++ b/codeship-steps.yml @@ -0,0 +1,3 @@ +- name: ci + service: shamrock + command: install diff --git a/docker/centos-graal-maven/Dockerfile b/docker/centos-graal-maven/Dockerfile new file mode 100644 index 0000000000000..6d0b0d0c91d43 --- /dev/null +++ b/docker/centos-graal-maven/Dockerfile @@ -0,0 +1,13 @@ +FROM swd847/centos-graal + +ARG MAVEN_VERSION=3.3.9 +ARG USER_HOME_DIR="/root" +RUN mkdir -p /usr/share/maven && \ +curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xzC /usr/share/maven --strip-components=1 && \ +ln -s /usr/share/maven/bin/mvn /usr/bin/mvn +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" +# speed up Maven JVM a bit +ENV MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1" +#ENTRYPOINT ["/usr/bin/mvn"] + diff --git a/docker/centos-graal/Dockerfile b/docker/centos-graal/Dockerfile new file mode 100644 index 0000000000000..6caee88a20a40 --- /dev/null +++ b/docker/centos-graal/Dockerfile @@ -0,0 +1,21 @@ +FROM centos:latest + +ARG GRAAL_VERSION +ENV GRAAL_VERSION=${GRAAL_VERSION:-1.0.0-rc6} +ENV GRAAL_CE_URL=https://github.com/oracle/graal/releases/download/vm-${GRAAL_VERSION}/graalvm-ce-${GRAAL_VERSION}-linux-amd64.tar.gz + +ENV JAVA_HOME=/opt/graalvm +ENV PATH=$PATH:$JAVA_HOME/bin +ENV GRAALVM_HOME=/opt/graalvm + + +RUN yum update -y && \ + yum install -y tar gzip gcc glibc-devel zlib-devel curl && \ + mkdir -p /opt/graalvm && \ + cd /opt/graalvm && \ + curl -fsSL $GRAAL_CE_URL | tar -xzC /opt/graalvm --strip-components=1 + + + + + diff --git a/examples/jpa-strict/pom.xml b/examples/jpa-strict/pom.xml index 08e308bdf1923..58b7a8ab5e637 100644 --- a/examples/jpa-strict/pom.xml +++ b/examples/jpa-strict/pom.xml @@ -48,6 +48,12 @@ + + + src/main/resources + true + + ${project.groupId} @@ -61,55 +67,6 @@ - - io.fabric8 - docker-maven-plugin - 0.26.1 - - - - postgres:10.5 - postgresql - - - hibernate_orm_test - hibernate_orm_test - hibernate_orm_test - - - 5432:5432 - - - - mapped - - 5432 - - - - - - - - - - - docker-start - compile - - stop - start - - - - docker-stop - post-integration-test - - stop - - - - @@ -167,6 +124,68 @@ + + + postgres + + + !no-postgres + + + + + + io.fabric8 + docker-maven-plugin + 0.26.1 + + + + postgres:10.5 + postgresql + + + hibernate_orm_test + hibernate_orm_test + hibernate_orm_test + + + 5432:5432 + + + + mapped + + 5432 + + + + + + + + + + + docker-start + compile + + stop + start + + + + docker-stop + post-integration-test + + stop + + + + + + + diff --git a/examples/jpa-strict/src/main/resources/META-INF/persistence.xml b/examples/jpa-strict/src/main/resources/META-INF/persistence.xml index 46d838c1fb142..304de9432b6d4 100644 --- a/examples/jpa-strict/src/main/resources/META-INF/persistence.xml +++ b/examples/jpa-strict/src/main/resources/META-INF/persistence.xml @@ -14,7 +14,7 @@ - + diff --git a/examples/strict/pom.xml b/examples/strict/pom.xml index 41b9341bb059a..d024f67a4f8d8 100644 --- a/examples/strict/pom.xml +++ b/examples/strict/pom.xml @@ -136,6 +136,12 @@ + + + src/main/resources + true + + ${project.groupId} @@ -149,55 +155,6 @@ - - io.fabric8 - docker-maven-plugin - 0.26.1 - - - - postgres:10.5 - postgresql - - - hibernate_orm_test - hibernate_orm_test - hibernate_orm_test - - - 5432:5432 - - - - mapped - - 5432 - - - - - - - - - - - docker-start - compile - - stop - start - - - - docker-stop - post-integration-test - - stop - - - - @@ -254,6 +211,67 @@ + + postgres + + + !no-postgres + + + + + + io.fabric8 + docker-maven-plugin + 0.26.1 + + + + postgres:10.5 + postgresql + + + hibernate_orm_test + hibernate_orm_test + hibernate_orm_test + + + 5432:5432 + + + + mapped + + 5432 + + + + + + + + + + + docker-start + compile + + stop + start + + + + docker-stop + post-integration-test + + stop + + + + + + + diff --git a/examples/strict/src/main/resources/META-INF/persistence.xml b/examples/strict/src/main/resources/META-INF/persistence.xml index ef7dd949d0f96..c04f0ec1230c4 100644 --- a/examples/strict/src/main/resources/META-INF/persistence.xml +++ b/examples/strict/src/main/resources/META-INF/persistence.xml @@ -16,7 +16,7 @@ - + diff --git a/pom.xml b/pom.xml index 6b53b8977fc34..4bc176542af87 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,8 @@ 1.0.6.Final ${env.GRAALVM_HOME} + + ${env.DATABASE_URL} @@ -132,6 +134,28 @@ + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + validate + + run + + + true + + + + + + + + @@ -749,4 +773,18 @@ + + + database-url + + + !env.DATABASE_URL + + + + jdbc:postgresql:hibernate_orm_test + + + +