Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghsc/nshmp/nshmp-ws-static
1 result
Show changes
Commits on Source (7)
......@@ -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
......@@ -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
......
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
rootProject.name = "nshmp-netcdf"
rootProject.name = "nshmp-ws-static"
......@@ -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);
......
......@@ -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 {
......
......@@ -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;
/**
......
......@@ -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"));
......
......@@ -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}
<!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>
......