From eb7b184de187785bcb6f6d0d6d51bbb7baed85b9 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Fri, 15 Nov 2024 19:23:23 +0000 Subject: [PATCH] chore: combine server PRs (#166) * build(deps): bump com.puppycrawl.tools:checkstyle in /server Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 10.20.0 to 10.20.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-10.20.0...checkstyle-10.20.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * build(deps): bump org.hibernate.orm.tooling:hibernate-enhance-maven-plugin Bumps [org.hibernate.orm.tooling:hibernate-enhance-maven-plugin](https://github.com/hibernate/hibernate-orm) from 6.5.3.Final to 6.6.2.Final. - [Release notes](https://github.com/hibernate/hibernate-orm/releases) - [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.6.2/changelog.txt) - [Commits](https://github.com/hibernate/hibernate-orm/compare/6.5.3...6.6.2) --- updated-dependencies: - dependency-name: org.hibernate.orm.tooling:hibernate-enhance-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * ci: add script to run with native pr --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- server/pom.xml | 4 ++-- tools/run-docker-server-native-pr.sh | 34 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tools/run-docker-server-native-pr.sh diff --git a/server/pom.xml b/server/pom.xml index f436db1..a3a3366 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -42,7 +42,7 @@ ${project.build.directory}/coverage-reports ${maven.build.timestamp} yyyy-MM-dd HH:mm:ss - 6.5.3.Final + 6.6.2.Final @@ -415,7 +415,7 @@ com.puppycrawl.tools checkstyle - 10.20.0 + 10.20.1 diff --git a/tools/run-docker-server-native-pr.sh b/tools/run-docker-server-native-pr.sh new file mode 100644 index 0000000..6cc1c0b --- /dev/null +++ b/tools/run-docker-server-native-pr.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +VERSION="$1" + +echo "Received version $VERSION" + +if [ ! -f "server/.env" ]; then + echo "No env file found for back-end. Creating one for you.." + bash tools/run-create-env.sh "back" +else + echo "Env file in place. Moving on.." +fi + +echo "Getting env vars and making them visible" +cd server/ +export $(cat .env | xargs) +echo "Done!" + +cd .. + +DB_HOST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' db) + +docker run -d --rm \ + --name server \ + -p 8585:8585 \ + -p 5005:5005 \ + -e POSTGRES_DB=$POSTGRES_DB \ + -e POSTGRES_USER=$POSTGRES_USER \ + -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \ + -e POSTGRES_PORT=$POSTGRES_PORT \ + -e POSTGRES_HOST=$DB_HOST \ + -e CORS_ALLOWED_ORIGINS=$CORS_ALLOWED_ORIGINS \ + -e SERVER_SERVLET_CONTEXT_PATH=$SERVER_SERVLET_CONTEXT_PATH \ + $VERSION