diff --git a/.envrc b/.envrc index 4a4726a..04c7969 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ +type export_alias &>/dev/null && export_alias g "./gradlew" || true use_nix diff --git a/.gitignore b/.gitignore index f7d385b..f8deaee 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,10 @@ xtend-gen/ init.gradle config.local.yml /org.testeditor.web.backend.xtext/repo/ +start.*local.sh ### test executions ### -xvfb.error.log \ No newline at end of file +xvfb.error.log + +### direnv generated scripts +.direnv/ \ No newline at end of file diff --git a/README.md b/README.md index b62f1c5..754e67d 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,18 @@ server: Having all these in place, executing `./gradlew -I init.gradle run --parallel` will automatically build the backend services with the dependency versions specified in `init.gradle` and use the `config.local.yml` when starting dropwizard. +## Running backend via docker with full pull/push of a github repo + +Create a shell file 'start.test-repo-pull.local.sh' with the following content: +(make sure to have the right id_github_rsa key and the right branch name in place) +``` shell +#! /usr/bin/env bash +echo "starting persistence backend locally" +docker run -p 9080:8080 -e GIT_PRIVATE_KEY="$(cat ~/.ssh/id_github_rsa)" -e KNOWN_HOSTS_CONTENT="$(cat ~/.ssh/known_hosts)" -e TARGET_REPO=git@github.com:test-editor/language-examples.git -e BRANCH_NAME=test/pull-action testeditor/persistence:snapshot & +echo "starting xtext backend locally" +docker run -p 8080:8080 -e GIT_PRIVATE_KEY="$(cat ~/.ssh/id_github_rsa)" -e KNOWN_HOSTS_CONTENT="$(cat ~/.ssh/known_hosts)" -e TARGET_REPO=git@github.com:test-editor/language-examples.git -e BRANCH_NAME=test/pull-action testeditor/xtext:snapshot & +``` + ## Debugging In order to debug the backend services you must start the backend services individually. diff --git a/clear_repo_cache_used_by_backends.sh b/clear_repo_cache_used_by_backends.sh index 3bac18d..6d925c1 100755 --- a/clear_repo_cache_used_by_backends.sh +++ b/clear_repo_cache_used_by_backends.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash [ -d "org.testeditor.web.backend.persistence/repo" ] && rm -Rf org.testeditor.web.backend.persistence/repo/ [ -d "org.testeditor.web.backend.xtext/repo" ] && rm -Rf org.testeditor.web.backend.xtext/repo/ diff --git a/shell.nix b/shell.nix index 5a4e283..cf7e656 100644 --- a/shell.nix +++ b/shell.nix @@ -20,10 +20,7 @@ stdenv.mkDerivation { ]; shellHook = '' # do some gradle "finetuning" - alias g="./gradlew" - alias g.="../gradlew" export GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.daemon=false -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 " export JAVA_TOOL_OPTIONS="$_JAVA_OPTIONS -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" - export LC_ALL=en_US.utf8 ''; }