diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ea6e42419fa0468999bd0546ad2708da3b85ba9..be73b7688d05b7c6725a0fe8c604941158fb1845 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,7 +52,7 @@ Build Image 2018: FROM_IMAGE=${DEVOPS_REGISTRY}usgs/java:11 ci_job_token=${CI_JOB_TOKEN} netcdf_file=DATA/data.nc - UPSTREAM_PATH: ghsc/nshmp/nshmp-netcdf + UPSTREAM_PATH: ghsc/nshmp/nshmp-ws-static Build Project: extends: @@ -156,14 +156,14 @@ Trigger nshmp-webapps: fi - | curl --request POST \ - --form token=${NSHMP_HAZ_STATIC_CDK_TRIGGER_TOKEN} \ + --form token=${NSHMP_WS_STATIC_CDK_TRIGGER_TOKEN} \ --form ref=${REF} \ - --form "variables[description]=Triggered by nshmp-netcdf" \ + --form "variables[description]=Triggered by nshmp-ws-static" \ --form "variables[ENVIRONMENT]=${ENVIRONMENT}" \ --form "variables[NSHMP_NETCDF_CONUS_2018_IMAGE]=${IMAGE_NAME}" \ - --form "variables[TRIGGER_PASSCODE]=${NSHMP_HAZ_STATIC_CDK_TRIGGER_TOKEN}" \ - "https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_HAZ_STATIC_CDK_PROJECT_ID}/trigger/pipeline" + --form "variables[TRIGGER_PASSCODE]=${NSHMP_WS_STATIC_CDK_TRIGGER_TOKEN}" \ + "https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_WS_STATIC_CDK_PROJECT_ID}/trigger/pipeline" stage: trigger variables: REF: main - UPSTREAM_PATH: ghsc/nshmp/nshmp-netcdf + UPSTREAM_PATH: ghsc/nshmp/nshmp-ws-static diff --git a/Dockerfile b/Dockerfile index 392a451bdf3cb7ef1bbfb27e31b93790f97f4c3c..17caddf098076e3f772b3b0f6c082fd2168ae12f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ # Build locally: # docker build # --build-arg gitlab_token=<token> -# -t nshmp-netcdf . +# -t nshmp-ws-static . #### ARG BUILD_IMAGE=usgs/java:11 ARG FROM_IMAGE=usgs/java:11 -ARG project=nshmp-netcdf +ARG project=nshmp-ws-static ARG workdir=/app/${project} ARG libs_dir=${workdir}/build/libs ARG jar_file=${libs_dir}/${project}.jar diff --git a/openapi.properties b/openapi.properties index f0c72b31810df273636e566865112dc94f062246..75e362540a617f22719aa540e333d8a469f33b0b 100644 --- a/openapi.properties +++ b/openapi.properties @@ -1 +1 @@ -micronaut.openapi.target.file = build/classes/java/main/META-INF/swagger/nshmp-netcdf.yml +micronaut.openapi.target.file = build/classes/java/main/META-INF/swagger/nshmp-ws-static.yml diff --git a/settings.gradle b/settings.gradle index a350942c6c95852053b5ccd644e6297f40d2d6a8..bf70eec81ed3bebe3c40593f3557d30dbfcd7a12 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1 @@ -rootProject.name = "nshmp-netcdf" +rootProject.name = "nshmp-ws-static" diff --git a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/swagger/UpdateSwagger.java b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/swagger/UpdateSwagger.java index 5c66bb2ff3381a1b50ee4c8613028a5761376adf..2a00e1f69a1e985be2670157e0cc618073ce54fc 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/swagger/UpdateSwagger.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/swagger/UpdateSwagger.java @@ -55,7 +55,7 @@ class UpdateSwagger { options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); var yaml = new Yaml(options); - var out = SWAGGER_DIR.resolve("netcdf-swagger-" + nshmGroup.model() + ".yml"); + var out = SWAGGER_DIR.resolve("ws-static-swagger-" + nshmGroup.model() + ".yml"); try { var yamlFile = yaml.loadAs(new FileReader(yamlPath.toFile()), Swagger.class); diff --git a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/Application.java b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/Application.java index 22c7312a11a26d8147c2189c2245ad9a42b00cc8..396bc14e9d2c2fd4abc44ad61ac64e9c89a22dec 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/Application.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/Application.java @@ -6,8 +6,8 @@ import io.swagger.v3.oas.annotations.info.Info; @OpenAPIDefinition( info = @Info( - title = "NetCDF Services", - description = "### Get hazard curves from a NSHM NetCDF file\n" + + title = "NSHMP Static Data Services", + description = "### Get static hazard curves\n" + "See the service usage for current NSHM with supported longitudes, " + "latitudes, site classes, and IMTS")) public class Application { diff --git a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfController.java b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfController.java index 0ca245f306ab7a25d6ff9e6dc581db69d14dbb9e..414c7b4cc500e12282c3f8e0956afe27aebe2817 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfController.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfController.java @@ -40,10 +40,10 @@ public class NetcdfController { @Inject private NshmpMicronautServlet servlet; - @Value("${nshmp-netcdf.nshm-group}") + @Value("${nshmp-ws-static.nshm-group}") NshmGroup nshmGroup; - @Value("${nshmp-netcdf.netcdf-file}") + @Value("${nshmp-ws-static.netcdf-file}") Path path; /** diff --git a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/SwaggerController.java b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/SwaggerController.java index c738ecedaafeca4088f1600a8bc7b3d2d8673dec..87062bc05c2004531b09cd2cea778b6c8c7f6aa2 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/SwaggerController.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/SwaggerController.java @@ -35,7 +35,7 @@ public class SwaggerController { @Get(produces = MediaType.TEXT_EVENT_STREAM) public HttpResponse<String> doGet(HttpRequest<?> request) { try { - var url = Resources.getResource("META-INF/swagger/nshmp-netcdf.yml"); + var url = Resources.getResource("META-INF/swagger/nshmp-ws-static.yml"); var yml = Resources.readLines(url, StandardCharsets.UTF_8) .stream() .collect(Collectors.joining("\n")); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a441e8112770aa12f0c136068ff85e17981d6ee0..24a15687398711ea6ada3a3c156bab1c2ec3b958 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -10,6 +10,6 @@ micronaut: paths: classpath:swagger mapping: /** -nshmp-netcdf: +nshmp-ws-static: netcdf-file: ${netcdf:src/main/resources/default.nc} nshm-group: ${nshm:CONUS_2018A} diff --git a/src/main/resources/swagger/index.html b/src/main/resources/swagger/index.html index f5fc92b68b0608f312b6385ed3ba97dc4b748a17..3ed5a71d3a886cd929205a87d7137105c840beb0 100644 --- a/src/main/resources/swagger/index.html +++ b/src/main/resources/swagger/index.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <html lang="en"> <head> - <title>NSHMP NetCDF Services</title> + <title>NSHMP Static Data Services</title> <meta charset="UTF-8" /> <link rel="icon" @@ -39,11 +39,11 @@ <div id="swagger-ui"></div> <footer class="nshmp-template-footer"> - <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-netcdf/-/blob/master/LICENSE.md"> + <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-ws-static/-/blob/master/LICENSE.md"> License </a> - <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-netcdf/-/blob/master/DISCLAIMER.md"> + <a href="https://code.usgs.gov/ghsc/nshmp/nshmp-ws-static/-/blob/master/DISCLAIMER.md"> Disclaimer </a>