Skip to content
Snippets Groups Projects
Unverified Commit 2d0541ec authored by Martin Weise's avatar Martin Weise
Browse files

Remove zenodo

parent 26019f31
No related branches found
No related tags found
3 merge requests!81New stable release,!43Merge dev to master,!33Draft: merge dev to master
ZENODO_API_KEY=
API=http://fda-gateway-service:9095
REGISTRY="docker.example.com"
API="http://fda-gateway-service:9095"
KEY_STORE_PASSWORD="12345"
......@@ -232,7 +232,6 @@ services:
- fda-public
environment:
SPRING_PROFILES_ACTIVE: docker
ZENODO_API_KEY: "${ZENODO_API_KEY}"
ports:
- "9096:9096"
depends_on:
......
......@@ -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
......
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
......
......@@ -234,7 +234,6 @@ services:
# - fda-public
# environment:
# SPRING_PROFILES_ACTIVE: docker
# ZENODO_API_KEY: "${ZENODO_API_KEY}"
# TZ: Europe/Vienna
# ports:
# - "9096:9096"
......
......@@ -29,6 +29,3 @@ fda:
mapping.path: /root
table.path: /root
query.endpoint: fda-table-service:9093
\ No newline at end of file
zenodo:
endpoint: https://sandbox.zenodo.org/
api_key: "${ZENODO_API_KEY}"
\ No newline at end of file
......@@ -29,6 +29,3 @@ fda:
mapping.path: rest-service/src/main/resources
table.path: rest-service/src/main/java/at/tuwien/userdb
query.endpoint: fda-query-service:9093
\ No newline at end of file
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
fda.mapping.path: /tmp
fda.table.path: /tmp
\ No newline at end of file
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
fda.mapping.path: /tmp
fda.table.path: /tmp
\ No newline at end of file
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