diff --git a/.gitignore b/.gitignore index 2156b111..fe6b79ff 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ src/python/account/ .env *.pyc +.env node_modules/ angular-app/.angular diff --git a/Jenkinsfile b/Jenkinsfile index 68813319..14776fd3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,13 +17,17 @@ pipeline { stage('Build') { steps { - sh './gradlew build' + withCredentials([file(credentialsId: 'smartguide-env', variable: 'INSE_ENV_FILE')]) { + sh './gradlew build' + } } } stage('Test') { steps { - sh './gradlew :service:test' + withCredentials([file(credentialsId: 'smartguide-env', variable: 'INSE_ENV_FILE')]) { + sh './gradlew :service:test' + } } } diff --git a/service/build.gradle b/service/build.gradle index 72f5f5fb..72d24dd4 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -33,7 +33,10 @@ task createImage(type: Exec) { task test(type: Exec) { dependsOn createImage - commandLine 'docker', 'run', '--rm', '-e', "DOCKER_DEFAULT_PLATFORM='${targetPlatform}'", '--name', "${imageName}-service-test", "${imagePrefix}-service:${imageVersion}", 'test' + def envFile = System.getenv('INSE_ENV_FILE') + def envArgs = envFile ? ['--env-file', envFile] : [] + commandLine(['docker', 'run', '--rm', '-e', "DOCKER_DEFAULT_PLATFORM='${targetPlatform}'"] + envArgs + + ['--name', "${imageName}-service-test", "${imagePrefix}-service:${imageVersion}", 'test']) ignoreExitValue false } diff --git a/service/src/main/inse/.env.example b/service/src/main/inse/.env.example new file mode 100644 index 00000000..5f5d43f8 --- /dev/null +++ b/service/src/main/inse/.env.example @@ -0,0 +1,29 @@ + +LLM_API_URL= +LLM_API_KEY= +LLM_MODEL= + +# Patent search (EPO + USPTO) +PATENT_ELASTICSEARCH_URL= +PATENT_ELASTICSEARCH_API_KEY= + +ELASTICSEARCH_URL= +ELASTICSEARCH_API_KEY= + +ELASTICSEARCH_INSE_URL= +ELASTICSEARCH_INSE_API_KEY= + +# Debugging: Log every outgoing Elasticsearch query (index + payload) +PRINT_ES_QUERIES= +# Debugging: Log the duration of every Elasticsearch request +PRINT_ES_TIMINGS= + +# Sentence Transformers Configuration +SENTENCE_TRANSFORMERS_MODEL_NAME= + +TOKEN_ISSUER_ID= +TOKEN_HMAC_KEY= + +# Docker-Registry-Login für Background-Jobs (Nexus, nes.uni-due.de) +BACKGROUND_JOBS_REGISTRY_USERNAME= +BACKGROUND_JOBS_REGISTRY_PASSWORD= \ No newline at end of file