Skip to content
Snippets Groups Projects
Commit 56e29623 authored by Martin Weise's avatar Martin Weise
Browse files

Remove zenodo

Former-commit-id: 2d0541ec
parent 716370db
No related branches found
No related tags found
1 merge request!42Fixed the query service tests
ZENODO_API_KEY= REGISTRY="docker.example.com"
API=http://fda-gateway-service:9095 API="http://fda-gateway-service:9095"
KEY_STORE_PASSWORD="12345"
...@@ -232,7 +232,6 @@ services: ...@@ -232,7 +232,6 @@ services:
- fda-public - fda-public
environment: environment:
SPRING_PROFILES_ACTIVE: docker SPRING_PROFILES_ACTIVE: docker
ZENODO_API_KEY: "${ZENODO_API_KEY}"
ports: ports:
- "9096:9096" - "9096:9096"
depends_on: depends_on:
......
...@@ -246,7 +246,7 @@ test-backend-citation: ...@@ -246,7 +246,7 @@ test-backend-citation:
dependencies: dependencies:
- build-backend-citation - build-backend-citation
script: script:
- "ZENODO_API_KEY=${ZENODO_API_KEY} mvn -f fda-citation-service/pom.xml clean test verify" - mvn -f fda-citation-service/pom.xml clean test verify
- cat ./fda-citation-service/report/target/site/jacoco-aggregate/index.html - cat ./fda-citation-service/report/target/site/jacoco-aggregate/index.html
artifacts: artifacts:
when: always when: always
......
REGISTRY=docker.ossdip.at
all: all:
config-backend: config-backend:
./.rhel-prod/fda-authentication-service/install_cert ./.fda-deployment/fda-authentication-service/install_cert
config-registry: config-registry:
./.rhel-registry/install_cert ./.fda-builder/registry/install_cert
config-frontend: config-frontend:
./.rhel-prod/fda-ui/install_cert ./.fda-deployment/fda-ui/install_cert
docker-compose -f docker-compose.prod.yml config docker-compose -f docker-compose.prod.yml config
config-docker: config-docker:
...@@ -58,8 +56,8 @@ build-docker-sandbox: ...@@ -58,8 +56,8 @@ build-docker-sandbox:
docker-compose -f docker-compose.prod.yml build docker-compose -f docker-compose.prod.yml build
build-frontend: build-frontend:
yarn --cwd ./fda-ui install --legacy-peer-deps API="${GATEWAY}" yarn --cwd ./fda-ui install --legacy-peer-deps
yarn --cwd ./fda-ui run build API="${GATEWAY}" yarn --cwd ./fda-ui run build
build: clean build-backend build-frontend build-docker build: clean build-backend build-frontend build-docker
...@@ -95,9 +93,9 @@ coverage-frontend: clean build-frontend ...@@ -95,9 +93,9 @@ coverage-frontend: clean build-frontend
yarn --cwd ./fda-ui run coverage || true yarn --cwd ./fda-ui run coverage || true
test-frontend: clean build-frontend test-frontend: clean build-frontend
yarn --cwd ./fda-ui install API="${GATEWAY}" yarn --cwd ./fda-ui install
docker-compose up -d docker-compose up -d
yarn --cwd ./fda-ui run test API="${GATEWAY}" yarn --cwd ./fda-ui run test
test: test-backend test-frontend test: test-backend test-frontend
......
...@@ -234,7 +234,6 @@ services: ...@@ -234,7 +234,6 @@ services:
# - fda-public # - fda-public
# environment: # environment:
# SPRING_PROFILES_ACTIVE: docker # SPRING_PROFILES_ACTIVE: docker
# ZENODO_API_KEY: "${ZENODO_API_KEY}"
# TZ: Europe/Vienna # TZ: Europe/Vienna
# ports: # ports:
# - "9096:9096" # - "9096:9096"
......
...@@ -29,6 +29,3 @@ fda: ...@@ -29,6 +29,3 @@ fda:
mapping.path: /root mapping.path: /root
table.path: /root table.path: /root
query.endpoint: fda-table-service:9093 query.endpoint: fda-table-service:9093
zenodo:
endpoint: https://sandbox.zenodo.org/
api_key: "${ZENODO_API_KEY}"
\ No newline at end of file
...@@ -29,6 +29,3 @@ fda: ...@@ -29,6 +29,3 @@ fda:
mapping.path: rest-service/src/main/resources mapping.path: rest-service/src/main/resources
table.path: rest-service/src/main/java/at/tuwien/userdb table.path: rest-service/src/main/java/at/tuwien/userdb
query.endpoint: fda-query-service:9093 query.endpoint: fda-query-service:9093
zenodo:
endpoint: https://sandbox.zenodo.org/
api_key: "${ZENODO_API_KEY}"
\ No newline at end of file
...@@ -16,5 +16,3 @@ spring.jpa.show-sql=false ...@@ -16,5 +16,3 @@ spring.jpa.show-sql=false
fda.mapping.path: /tmp fda.mapping.path: /tmp
fda.table.path: /tmp fda.table.path: /tmp
zenodo.endpoint: https://sandbox.zenodo.org/
\ No newline at end of file
package at.tuwien.config;
import at.tuwien.exception.RemoteAuthenticationException;
import lombok.Getter;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.DefaultUriBuilderFactory;
import javax.validation.constraints.NotNull;
@Log4j2
@Configuration
public class ZenodoConfig {
@Getter
@NotNull
@Value("${zenodo.endpoint}")
private String zenodoEndpoint;
@NotNull
@Value("${zenodo.api_key}")
private String apiKey;
public String getApiKey() throws RemoteAuthenticationException {
if (apiKey == null || apiKey.isEmpty()) {
log.debug("api key is {}", apiKey);
throw new RemoteAuthenticationException("Did not find a valid Zenodo API key in environment variable ZENODO_API_KEY");
}
return apiKey;
}
@Bean
public RestTemplate zenodoTemplate() {
return new RestTemplateBuilder()
.uriTemplateHandler(new DefaultUriBuilderFactory(zenodoEndpoint))
.build();
}
}
...@@ -24,5 +24,3 @@ spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.elastic ...@@ -24,5 +24,3 @@ spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.elastic
fda.mapping.path: /tmp fda.mapping.path: /tmp
fda.table.path: /tmp fda.table.path: /tmp
zenodo.endpoint: https://sandbox.zenodo.org/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment