diff --git a/.env.example b/.env.example index 26ae9e5171ec6fb79a3d65eb7cc78b00d7768ea3..d2c96e2a560c74583229b438f9a452be541c84e8 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ -ZENODO_API_KEY= -API=http://fda-gateway-service:9095 +REGISTRY="docker.example.com" +API="http://fda-gateway-service:9095" +KEY_STORE_PASSWORD="12345" diff --git a/.fda-deployment/docker-compose.yml b/.fda-deployment/docker-compose.yml index 699690517230ead569d1c7ba3d461daec10ba8ab..4b5dffb74f091e6495efadc981e7909c5319a30c 100644 --- a/.fda-deployment/docker-compose.yml +++ b/.fda-deployment/docker-compose.yml @@ -232,7 +232,6 @@ services: - fda-public environment: SPRING_PROFILES_ACTIVE: docker - ZENODO_API_KEY: "${ZENODO_API_KEY}" ports: - "9096:9096" depends_on: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f0b3003154fbe11967ed887bd39026f1c3b6eac..e1d57843e90fb8aa0c9b2f9aae6d048fa125ef99 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -246,7 +246,7 @@ test-backend-citation: dependencies: - build-backend-citation 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 artifacts: when: always diff --git a/Makefile b/Makefile index 6cc81347fdf51b93c5595c9ecf8609fa6214dd62..3536e5895ff1e94f6c476dd417c5582a1524907b 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,13 @@ -REGISTRY=docker.ossdip.at - all: config-backend: - ./.rhel-prod/fda-authentication-service/install_cert + ./.fda-deployment/fda-authentication-service/install_cert config-registry: - ./.rhel-registry/install_cert + ./.fda-builder/registry/install_cert config-frontend: - ./.rhel-prod/fda-ui/install_cert + ./.fda-deployment/fda-ui/install_cert docker-compose -f docker-compose.prod.yml config config-docker: @@ -58,8 +56,8 @@ build-docker-sandbox: docker-compose -f docker-compose.prod.yml build build-frontend: - yarn --cwd ./fda-ui install --legacy-peer-deps - yarn --cwd ./fda-ui run build + API="${GATEWAY}" yarn --cwd ./fda-ui install --legacy-peer-deps + API="${GATEWAY}" yarn --cwd ./fda-ui run build build: clean build-backend build-frontend build-docker @@ -95,9 +93,9 @@ coverage-frontend: clean build-frontend yarn --cwd ./fda-ui run coverage || true test-frontend: clean build-frontend - yarn --cwd ./fda-ui install + API="${GATEWAY}" yarn --cwd ./fda-ui install docker-compose up -d - yarn --cwd ./fda-ui run test + API="${GATEWAY}" yarn --cwd ./fda-ui run test test: test-backend test-frontend diff --git a/docker-compose.yml b/docker-compose.yml index e2bef6390d1d9200d520b4652fb7619d69c6e2c8..07fcbb3883e77ae588ac25c16d82f0c4a81894a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -234,7 +234,6 @@ services: # - fda-public # environment: # SPRING_PROFILES_ACTIVE: docker -# ZENODO_API_KEY: "${ZENODO_API_KEY}" # TZ: Europe/Vienna # ports: # - "9096:9096" diff --git a/fda-citation-service/rest-service/src/main/resources/application-docker.yml b/fda-citation-service/rest-service/src/main/resources/application-docker.yml index 468fe81b49d0faea7d93b1f1a611d6638abd676a..3032485c702bb72f201a7ff9ec639c1b32d65847 100644 --- a/fda-citation-service/rest-service/src/main/resources/application-docker.yml +++ b/fda-citation-service/rest-service/src/main/resources/application-docker.yml @@ -28,7 +28,4 @@ fda: ready.path: /ready mapping.path: /root table.path: /root - query.endpoint: fda-table-service:9093 -zenodo: - endpoint: https://sandbox.zenodo.org/ - api_key: "${ZENODO_API_KEY}" \ No newline at end of file + query.endpoint: fda-table-service:9093 \ No newline at end of file diff --git a/fda-citation-service/rest-service/src/main/resources/application.yml b/fda-citation-service/rest-service/src/main/resources/application.yml index 37ac6c912dc6b67a1576363534b0f15cae891e19..83f56409bd8650b8f3f2b93e3c1530b4a0158179 100644 --- a/fda-citation-service/rest-service/src/main/resources/application.yml +++ b/fda-citation-service/rest-service/src/main/resources/application.yml @@ -28,7 +28,4 @@ fda: ready.path: ~/ mapping.path: rest-service/src/main/resources table.path: rest-service/src/main/java/at/tuwien/userdb - query.endpoint: fda-query-service:9093 -zenodo: - endpoint: https://sandbox.zenodo.org/ - api_key: "${ZENODO_API_KEY}" \ No newline at end of file + query.endpoint: fda-query-service:9093 \ No newline at end of file diff --git a/fda-citation-service/rest-service/src/test/resources/application.properties b/fda-citation-service/rest-service/src/test/resources/application.properties index 5002d6fb8f86b0ef84d19bef2f1e169fbd910a59..1226b46442ad34bf669e591ee5b99d5ca29ce823 100644 --- a/fda-citation-service/rest-service/src/test/resources/application.properties +++ b/fda-citation-service/rest-service/src/test/resources/application.properties @@ -15,6 +15,4 @@ spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.show-sql=false fda.mapping.path: /tmp -fda.table.path: /tmp - -zenodo.endpoint: https://sandbox.zenodo.org/ \ No newline at end of file +fda.table.path: /tmp \ No newline at end of file diff --git a/fda-citation-service/services/src/main/java/at/tuwien/config/ZenodoConfig.java b/fda-citation-service/services/src/main/java/at/tuwien/config/ZenodoConfig.java deleted file mode 100644 index 25647383e953bec2980395ca85b370d7340d4482..0000000000000000000000000000000000000000 --- a/fda-citation-service/services/src/main/java/at/tuwien/config/ZenodoConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -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(); - } - -} diff --git a/fda-table-service/rest-service/src/test/resources/application.properties b/fda-table-service/rest-service/src/test/resources/application.properties index 37d0065cbfcf5238b15a77d294de951a169c9521..05fbac4c44f725b078f78d5ff1027832d122c650 100644 --- a/fda-table-service/rest-service/src/test/resources/application.properties +++ b/fda-table-service/rest-service/src/test/resources/application.properties @@ -23,6 +23,4 @@ logging.level.at.tuwien.=trace spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration,org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration,org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration fda.mapping.path: /tmp -fda.table.path: /tmp - -zenodo.endpoint: https://sandbox.zenodo.org/ \ No newline at end of file +fda.table.path: /tmp \ No newline at end of file