From 3e80bea04ca1fd4d230403203e18774a984dc79f Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 09:39:32 -0600 Subject: [PATCH 01/33] Remove auth for conus repo --- settings.gradle | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/settings.gradle b/settings.gradle index bdd1c7b20..fc1c63a45 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,20 +6,10 @@ rootProject.name = "nshmp-haz" /** * Download default model, nshm-conus-2018. - * - * To download the model set environmnet variables: - * - GIT_NSHMP_USERNAME="The GitLab user name" - * - GIT_NSHMP_PASSWORD="The GitLab API token" */ git { - defaultAuthGroup "nshmp" - def user = System.getenv("GIT_NSHMP_USERNAME") - def pass = System.getenv("GIT_NSHMP_PASSWORD") - - if (user && pass) { - fetch("https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus.git", { - name "nshmp-haz-dep--nshm-conus-2018" - branch "origin/5.1.1" - }) - } + fetch("https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus.git", { + name "nshmp-haz-dep--nshm-conus-2018" + branch "origin/5.1.1" + }) } -- GitLab From c3a7533740d5141bfc9234cb4ff61c450d3fc9d8 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 09:39:53 -0600 Subject: [PATCH 02/33] Push to docker hub --- .gitlab-ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5347ec02c..06fe93c44 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml - NSHMP_HAZ_WS_IMAGE: ${CODE_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports # Do not run for merge requests @@ -104,6 +103,19 @@ stages: - latest_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - docker tag "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}" "${latest_image_name}"; - docker push "${latest_image_name}"; + - if [[ + ${CI_COMMIT_REF_SLUG} == "${CI_DEFAULT_BRANCH}" || + ${CI_COMMIT_REF_SLUG} == "production" || + -n "${CI_COMMIT_TAG}" + ]]; then + docker tag "${latest_image_name}" "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + docker push "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + + if [[ ${ENVIRONMENT} == "staging" ]]; then + docker tag "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest" "usgs/${CI_PROJECT_NAME}:latest"; + docker push "usgs/${CI_PROJECT_NAME}:latest"; + fi + fi - | printf " -------- @@ -211,7 +223,6 @@ Trigger nshmp-haz-ws CDK: --form ref=${REF} \ --form "variables[description]=Triggered by nshmp-haz" \ --form "variables[ENVIRONMENT]=${ENVIRONMENT}" \ - --form "variables[NSHMP_HAZ_WS_IMAGE]=${NSHMP_HAZ_WS_IMAGE}" \ --form "variables[TRIGGER_PASSCODE]=${NSHMP_HAZ_WS_CDK_TRIGGER_TOKEN}" \ "https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_HAZ_WS_CDK_PROJECT_ID}/trigger/pipeline" stage: trigger -- GitLab From 14a59d96f3152ea8dc3b06edfa91acbfbb8ca1ee Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 13:28:52 -0600 Subject: [PATCH 03/33] Specify tag --- settings.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index fc1c63a45..960079145 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,6 +10,6 @@ rootProject.name = "nshmp-haz" git { fetch("https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus.git", { name "nshmp-haz-dep--nshm-conus-2018" - branch "origin/5.1.1" + tag "5.1.1" }) } -- GitLab From e3370a86558e8ca2aa7438fad1dd887fdec3f54c Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 14:39:21 -0600 Subject: [PATCH 04/33] Switch to model --- ws.Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ws.Dockerfile b/ws.Dockerfile index 35f812588..4d1e9f44b 100644 --- a/ws.Dockerfile +++ b/ws.Dockerfile @@ -43,7 +43,7 @@ LABEL maintainer="Peter Powers <pmpowers@usgs.gov>, Brandon Clayton <bclayton@us ENV CONTEXT_PATH="/" ENV JAVA_OPTS="-Xms2g -Xmx8g" -ENV MODELS_DIRECTORY="/models" +ENV MODELS_DIRECTORY="/model" WORKDIR /app @@ -58,4 +58,4 @@ ENTRYPOINT java \ -jar \ nshmp-haz.jar \ "-Dmicronaut.server.context-path=${CONTEXT_PATH}" \ - --models="${MODELS_DIRECTORY}"; + --model="${MODELS_DIRECTORY}"; -- GitLab From 61076c7f184e16d2b7d1faf91bd9a6166f4a8e33 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 14:39:31 -0600 Subject: [PATCH 05/33] Switch to model --- src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index c0eb1c75e..ea2748c5f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -19,6 +19,6 @@ nshmp-haz: ## # The path to the models. # To specify the model to use: - # java -jar build/libs/nshmp-haz.jar --models=<path/to/models> + # java -jar build/libs/nshmp-haz.jar --model=<path/to/model> # - model-path: ${models:libs/nshmp-haz-dep--nshm-conus-2018} + model-path: ${model:libs/nshmp-haz-dep--nshm-conus-2018} -- GitLab From d2b642bdcf2bd5fa222b2bfdf64fd325470ca95a Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 14:39:46 -0600 Subject: [PATCH 06/33] Add web service docs --- docs/README.md | 1 + docs/pages/Building-&-Running.md | 1 + docs/pages/Web-Services.md | 165 +++++++++++++++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 docs/pages/Web-Services.md diff --git a/docs/README.md b/docs/README.md index 6a952c9a8..fcf5ab4e0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,6 +19,7 @@ use *nshmp-haz* as well as underlying model implementation details. * [Calculation Configuration](./pages/Calculation-Configuration.md) * [Site Specification](./pages/Site-Specification.md) * [Examples](../../etc/examples) + * [Web Services](./pages/Web-Services.md) * [Hazard Model](./pages/Hazard-Model.md) * [Model Structure](./pages/Model-Structure.md) * [Model Files](./pages/Model-Files.md) diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index fd9104395..12d1ad33e 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -8,6 +8,7 @@ * [Site Specification](./Site-Specification.md#site-specification) * [Examples](../../etc/examples) (or [on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples)) + * [Web Services](./Web-Services.md) ## Build & Run Options diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md new file mode 100644 index 000000000..44b3284a0 --- /dev/null +++ b/docs/pages/Web-Services.md @@ -0,0 +1,165 @@ +# Web Services + +## Related Pages + +* [Building & Running](./Building-&-Running.md#building-&-running) + * [Developer Basics](./Developer-Basics.md#developer-basics) + +## Build & Run Options + +* [Build and run locally](#build-and-run-locally) +* [Run with Docker](#run-with-docker) + +## Build and Run Locally + +Building and running *nshmp-haz* web services requires prior +installation of Git and Java. Please see the [developer basics](./Developer-Basics.md) +page for system configuration guidance. + +### Building + +Navigate to a location on your system where you want *nshmp-haz* code to reside, clone the +repository, and compile: + +```bash +cd /path/to/project/directory +git clone https://code.usgs.gov/ghsc/nshmp/nshmp-haz.git +cd nshmp-haz +./gradlew assemble +``` + +This creates a single file, `build/libs/nshmp-haz.jar` that may be used to run the web services. +`./gradlew` executes the Gradle Wrapper script (there is a `gradlew.bat` equivalent for Windows +users using the native command prompt). This executes any tasks (e.g. `assemble`) after +downloading all required dependencies, including Gradle itself. + +## Running Web Services + +```bash +java -jar path/to/nshmp-haz.jar --model=path/to/model +``` + +Web service runs on [http://localhost:8080/](http://localhost:8080/) + +The `--model` argument should contain the path to a single +hazard source [model](./Hazard-Model.md). + +The [National Seisimic Hazard Models (NSHMs)](https://code.usgs.gov/ghsc/nshmp/nshms) +are available to download. + +### Example with NSHM + +```bash +# Build nshmp-haz +cd /path/to/nshmp-haz +./gradle assemble + +# Download NSHM CONUS +cd .. +git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus + +# Run web services +cd /path/to/nshmp-haz +java -jar build/libs/nshmp-haz.jar --model=../nshm-conus +``` + +Open browser to [http://localhost:8080/](http://localhost:8080/). + +## Run with Docker + +### Docker Requirments + +* [Docker](https://docs.docker.com/install/) + +#### Docker Memory on Mac + +By default, Docker Desktop for Mac is set to use 2 GB runtime memory. To run nshmp-haz-ws, the +memory available to Docker must be [increased](https://docs.docker.com/docker-for-mac/#advanced) +to a minimum of 4 GB. + +### Docker Build Options + +* [Build and run docker locally](#build-and-run-docker-locally) +* [Run from Docker Hub](#run-from-docker-hub) + +### Build and Run Docker Locally + +The Docker image may be built with the provided web service [Dockerfile](../../ws.Dockerfile). + +```bash +cd /path/to/nshmp-haz + +# Build docker image +docker build -f ws.Dockerfile -t nshmp-haz-ws . + +# Run Docker image +docker run -p 8080:8080 -v "path/to/model:/model" nshmp-haz-ws +``` + +Web service runs on [http://localhost:8080/](http://localhost:8080/) + +The hazard model is read in via Docker volumes. + +#### Local Docker Example with NSHM + +```bash +# Build docker image +cd /path/to/nshmp-haz +docker build -f ws.Dockerfile -t nshmp-haz-ws . + +# Download NSHM CONUS +cd .. +git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus + +# Run web services +docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws +``` + +Open browser to [http://localhost:8080/](http://localhost:8080/). + +### Run from Docker Hub + +A public Docker image is avaialable on [Docker Hub](https://hub.docker.com/r/usgs/nshmp-haz-ws) + +There are 2 main tags: + +* staging-latest (latest): Refers to the +[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates +* production-latest: Refers to the +[production](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/production) branch and is stable + +```bash +# Pull image +docker pull nshmp-haz-ws:latest + +# Run +docker run -p 8080:8080 -v "/path/to/model:/model" nshmp-haz-ws +``` + +Web service runs on [http://localhost:8080/](http://localhost:8080/) + +The hazard model is read in via Docker volumes. + +#### Docker Hub Example with NSHM + +```bash +# Pull image +docker pull nshmp-haz-ws:latest + +# Download NSHM CONUS +cd .. +git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus + +# Run web services +docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws +``` + +Open browser to [http://localhost:8080/](http://localhost:8080/). + +--- + +* [**Documentation Index**](../README.md) + +--- + [U.S. Geological Survey](https://www.usgs.gov) +National Seismic Hazard Mapping Project ([NSHMP](https://earthquake.usgs.gov/hazards/)) -- GitLab From 4c0f6e70e4e9a2074a6b9f68b2e5be8e02d5e842 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 15:00:13 -0600 Subject: [PATCH 07/33] Fix markdown --- docs/pages/Calculation-Configuration.md | 2 +- docs/pages/Functional-PSHA.md | 14 ++-- docs/pages/Ground-Motion-Models.md | 26 +++---- docs/pages/Logic-Trees-&-Uncertainty.md | 94 ++++++++++++------------ docs/pages/Model-Editions.md | 2 +- docs/pages/Model-Structure.md | 4 +- docs/pages/Site-Specification.md | 2 +- docs/pages/Source-Types.md | 30 ++++---- docs/pages/USGS-Models.md | 8 +- docs/pages/Web-Services.md | 2 +- etc/examples/1-hazard-curve/README.md | 2 +- etc/examples/2-custom-config/README.md | 2 +- etc/examples/3-sites-file/README.md | 2 +- etc/examples/4-hazard-map/README.md | 2 +- etc/examples/5-complex-model/README.md | 2 +- etc/examples/6-enhanced-output/README.md | 2 +- etc/examples/7-disaggregation/README.md | 2 +- gradle/node.gradle | 4 +- 18 files changed, 101 insertions(+), 101 deletions(-) diff --git a/docs/pages/Calculation-Configuration.md b/docs/pages/Calculation-Configuration.md index 8ed8b9276..7f8bf3d8a 100644 --- a/docs/pages/Calculation-Configuration.md +++ b/docs/pages/Calculation-Configuration.md @@ -106,7 +106,7 @@ T ≤ 10 s | 0.000333, 0.000499, 0.000749, 0.00112, 0.00169, 0.00253, <br>0.00 * [Site Specification](./Site-Specification.md#site-specification) * [Examples](../../etc/examples) (or [on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples)) -* [**Documentation Index**](../README.md) +* [__Documentation Index__](../README.md) ---  [U.S. Geological Survey](https://www.usgs.gov) diff --git a/docs/pages/Functional-PSHA.md b/docs/pages/Functional-PSHA.md index 24fad1092..0b936d6c1 100644 --- a/docs/pages/Functional-PSHA.md +++ b/docs/pages/Functional-PSHA.md @@ -119,10 +119,10 @@ foreach IMT { Break the traditional PSHA formulation down into discrete steps and preserve the data associated with each step: -* **[1]** Source & Site parameterization -* **[2]** Ground motion calculation (mean and standard deviation only) -* **[3]** Exceedance curve calculation (per source) -* **[4]** Recombine +* __[1]__ Source & Site parameterization +* __[2]__ Ground motion calculation (mean and standard deviation only) +* __[3]__ Exceedance curve calculation (per source) +* __[4]__ Recombine Whereas the traditional pipeline looks something like this: @@ -132,9 +132,9 @@ The functional pipeline can be processed stepwise:  -**Need a disaggregation?** Revisit and parse the results of steps 1 and 2 +__Need a disaggregation?__ Revisit and parse the results of steps 1 and 2 -**Need a response spectra?** Spawn more calculations, one for each IMT, at step 2. +__Need a response spectra?__ Spawn more calculations, one for each IMT, at step 2. ## Benefits @@ -161,7 +161,7 @@ The functional pipeline can be processed stepwise: --- -[**Documentation Index**](../README.md) +[__Documentation Index__](../README.md) ---  [U.S. Geological Survey](https://www.usgs.gov) diff --git a/docs/pages/Ground-Motion-Models.md b/docs/pages/Ground-Motion-Models.md index f18344593..4419608b2 100644 --- a/docs/pages/Ground-Motion-Models.md +++ b/docs/pages/Ground-Motion-Models.md @@ -44,7 +44,7 @@ The following sample `gmm-config.json` file applies the NGA-West 2 epistemic unc ## GMM Uncertainty Models -*nshmp-haz* supports additional epistemic uncertainty models derived from the PEER NGA-West 1 +_nshmp-haz_ supports additional epistemic uncertainty models derived from the PEER NGA-West 1 and PEER NGA-West 2 projects. These models both have factors for distance (`Rrup`) bins Rrup < 10 km, 10 km <= Rrup, < 30 km, and 30 km <= Rrup, and for magnitude bins M < 6.0, 6.0 <= M < 7.0, and 7.0 <= M. These models can be applied within the `gmm-config.json` file as shown in @@ -52,7 +52,7 @@ the [GMM Uncertainty](#gmm-uncertainty) section above. ## GMMs By Tectonic Setting -GMMs available in *nshmp-haz* are tabulated by tectonic setting below. See the javadocs for the +GMMs available in _nshmp-haz_ are tabulated by tectonic setting below. See the javadocs for the [GMM Package](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/package-summary.html) for implementation details of each GMM and comprehensive lists of GMM IDs. @@ -93,7 +93,7 @@ NGA-East<br>[Goulet et al., 2017](https://peer.berkeley.edu/sites/default/files/ [Shahjouei and Pezeshk, 2016](http://dx.doi.org/10.1785/0120140367) | NGA_EAST_SEED_SP16 | RotD50 | 3 **Other** [Atkinson, 2008](http://dx.doi.org/10.1785/0120070199)<br>[Atkinson & Boore, 2011](http://dx.doi.org/10.1785/0120100270) | ATKINSON_08_PRIME | horizontal | 4 -[Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245) | *AB_06_\*<br>140BAR\|200BAR<br>none\|_AB\|_J* | horizontal | 4 +[Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245) | _AB\_06\_\*<br>140BAR\|200BAR<br>none\|\_AB\|\_J_ | horizontal | 4 [Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245)<br>[Atkinson & Boore, 2011](http://dx.doi.org/10.1785/0120100270) | AB_06_PRIME | horizontal | 4 [Campbell, 2003](http://dx.doi.org/10.1785/0120020002) | CAMPBELL_03<br>CAMPBELL_03_AB<br>CAMPBELL_03_J | Geometric mean | 4 [Frankel et al., 1996](https://pubs.usgs.gov/of/1996/532/) | FRANKEL_96<br>FRANKEL_96_AB<br>FRANKEL_96_J | not specified | 4 @@ -112,24 +112,24 @@ for individual NGA-East component model IDs ### Subduction GMMs -*Note: See the [GMM javadocs](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/Gmm.html) -for a comprehensive list of GMM IDs.* +_Note: See the [GMM javadocs](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/Gmm.html) +for a comprehensive list of GMM IDs._ Reference | ID | Component | Notes :---------|:---|:----------|:------: **NGA-Subduction** -[Abrahamson & Gülerce, 2020](https://peer.berkeley.edu/sites/default/files/2020_25.pdf) | *AG_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50 -[Kuehn et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_04_kuehn_final.pdf) | *KBCG_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50 -[Parker et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_03_parker_final.pdf) | *PSHAB_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50 +[Abrahamson & Gülerce, 2020](https://peer.berkeley.edu/sites/default/files/2020_25.pdf) | _AG\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50 +[Kuehn et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_04_kuehn_final.pdf) | _KBCG\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50 +[Parker et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_03_parker_final.pdf) | _PSHAB\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50 **Other** -[Atkinson & Boore, 2003](http://dx.doi.org/10.1785/0120020156) | *AB_03\*<br>GLOBAL\|CASCADIA<br>INTERFACE\|SLAB<br>none\|_LOW_SAT*| horizontal | +[Atkinson & Boore, 2003](http://dx.doi.org/10.1785/0120020156) | _AB\_03\*<br>GLOBAL\|CASCADIA<br>INTERFACE\|SLAB<br>none\|\_LOW_SAT_| horizontal | [Atkinson & Macias, 2009](http://dx.doi.org/10.1785/0120080147) | AM_09_INTERFACE<br>AM_09_INTERFACE_BASIN | Geometric mean | 1 -BC Hydro<br>[Abrahamson et al., 2016](http://dx.doi.org/10.1193/051712EQS188MR) | *BCHYDRO_12_\*<br>INTERFACE\|SLAB<br>none\|_BASIN<br>none\|_BACKARC* | Geometric mean | -BC Hydro NGA<br>[Abrahamson et al., 2018](https://peer.berkeley.edu/sites/default/files/2018_02_abrahamson_9.10.18.pdf)² | *BCHYDRO_18_NGA_\*<br>INTERFACE\|SLAB<br>none\|_NO_EPI* | Geometric mean | 3 +BC Hydro<br>[Abrahamson et al., 2016](http://dx.doi.org/10.1193/051712EQS188MR) | _BCHYDRO\_12\_\*<br>INTERFACE\|SLAB<br>none\|\_BASIN<br>none\|\_BACKARC_ | Geometric mean | +BC Hydro NGA<br>[Abrahamson et al., 2018](https://peer.berkeley.edu/sites/default/files/2018_02_abrahamson_9.10.18.pdf)² | _BCHYDRO\_18\_NGA\_\*<br>INTERFACE\|SLAB<br>none\|\_NO_EPI_ | Geometric mean | 3 [McVerry et al., 2000](http://doi.org/10.5459/BNZSEE.39.1.1-58) | MCVERRY_00_INTERFACE<br>MCVERRY_00_SLAB<br>MCVERRY_00_VOLCANIC | Max-horizontal,<br>also supports geometric mean | 4 [Youngs et al., 1997](http://dx.doi.org/10.1785/gssrl.68.1.58) | YOUNGS_97_INTERFACE<br>YOUNGS_97_SLAB | Geometric mean | -[Zhao et al., 2006](http://dx.doi.org/10.1785/0120050122) | *ZHAO_06_\*<br>INTERFACE\|SLAB<br>none\|_BASIN* | Geometric mean | -[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150034)<br>[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150056) | ZHAO_16_INTERFACE<br>ZHAO_16_SLAB<br>*ZHAO_16_UPPER_MANTLE* | Geometric mean<br>(random orientation) | 5 +[Zhao et al., 2006](http://dx.doi.org/10.1785/0120050122) | _ZHAO\_06\_\*<br>INTERFACE\|SLAB<br>none\|\_BASIN_ | Geometric mean | +[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150034)<br>[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150056) | ZHAO_16_INTERFACE<br>ZHAO_16_SLAB<br>_ZHAO_16_UPPER_MANTLE_ | Geometric mean<br>(random orientation) | 5 ¹ Interface only ² Likely to be superseded by the final EQ Spectra paper diff --git a/docs/pages/Logic-Trees-&-Uncertainty.md b/docs/pages/Logic-Trees-&-Uncertainty.md index 313fb029d..e1c4f1022 100644 --- a/docs/pages/Logic-Trees-&-Uncertainty.md +++ b/docs/pages/Logic-Trees-&-Uncertainty.md @@ -3,7 +3,7 @@ The following page details the logic trees of epistemic uncertainty considered in NSHMs supported by *nshmp-haz*. Logic trees are represented in a NSHM using files ending in `-tree.json`. -[[_TOC_]] +[[*TOC*]] ## Terminology @@ -15,34 +15,34 @@ alternative models. | Description | 2008 | 2014 | 2018 | |:----------- |:----- |:---- |:---- | -| CEUS | __0.1__ : AB_06 (140 bar)<br>__0.1__ : AB_06 (200 bar)<br>__0.1__ : CAMPBELL_03<br>__0.1__ : FRANKEL_96<br>__0.1__ : SILVA_02<br>__0.2__ : SOMERVILLE_01<br>__0.2__ : TORO_97<br>__0.1__ : TP_05 | __0.22__ : AB_06'<br>__0.08__ : ATKINSON_08'<br>__0.11__ : CAMPBELL_03<br>__0.06__ : FRANKEL_96<br>__0.15__ : PEZESHK_11<br>__0.06__ : SILVA_02<br>__0.10__ : SOMERVILLE_01<br>__0.11__ : TORO_97<br>__0.11__ : TP_05 | __0.667__ : NGA_EAST_USGS (17)<br>__0.333__ : NGA_EAST_SEEDS (14)<br>(common aleatory variability) | -| Sigma Epistemic | _(none)_ | _(no change)_ | __0.2__ : USGS Panel<br>__0.8__ : EPRI | -| Site Aleatory | _(none)_ | _(no change)_ | __0.185, 0.63, 0.185__ : Site ± σ | +| CEUS | **0.1** : AB_06 (140 bar)<br>**0.1** : AB_06 (200 bar)<br>**0.1** : CAMPBELL_03<br>**0.1** : FRANKEL_96<br>**0.1** : SILVA_02<br>**0.2** : SOMERVILLE_01<br>**0.2** : TORO_97<br>**0.1** : TP_05 | **0.22** : AB_06'<br>**0.08** : ATKINSON_08'<br>**0.11** : CAMPBELL_03<br>**0.06** : FRANKEL_96<br>**0.15** : PEZESHK_11<br>**0.06** : SILVA_02<br>**0.10** : SOMERVILLE_01<br>**0.11** : TORO_97<br>**0.11** : TP_05 | **0.667** : NGA_EAST_USGS (17)<br>**0.333** : NGA_EAST_SEEDS (14)<br>(common aleatory variability) | +| Sigma Epistemic | *(none)* | *(no change)* | **0.2** : USGS Panel<br>**0.8** : EPRI | +| Site Aleatory | *(none)* | *(no change)* | **0.185, 0.63, 0.185** : Site ± σ | ## Active Crustal Ground Motion Models | Description | 2008 | 2014 | 2018 | |:----------- |:----- |:---- |:---- | -| WUS | __0.3333__ : BA_08<br>__0.3333__ : CB_08<br>__0.3334__ : CY_08 | __0.22__ : ASK_14<br>__0.22__ : BSSA_14<br>__0.22__ : CB_14<br>__0.22__ : CY_14<br>__0.22__ : IDRISS_14 | __0.25__ : ASK_14<br>__0.25__ : BSSA_14<br>__0.25__ : CB_14<br>__0.25__ : CY_14 | -| Mean Epistemic | NGA-West1 (M,R)<br>__0.185__ : epi+<br>__0.630__ : off<br>__0.185__ : epi- | NGA-West2 (M,R)<br>__0.185__ : epi+<br>__0.630__ : off<br>__0.185__ : epi- | _(no change)_ | +| WUS | **0.3333** : BA_08<br>**0.3333** : CB_08<br>**0.3334** : CY_08 | **0.22** : ASK_14<br>**0.22** : BSSA_14<br>**0.22** : CB_14<br>**0.22** : CY_14<br>**0.22** : IDRISS_14 | **0.25** : ASK_14<br>**0.25** : BSSA_14<br>**0.25** : CB_14<br>**0.25** : CY_14 | +| Mean Epistemic | NGA-West1 (M,R)<br>**0.185** : epi+<br>**0.630** : off<br>**0.185** : epi- | NGA-West2 (M,R)<br>**0.185** : epi+<br>**0.630** : off<br>**0.185** : epi- | *(no change)* | ## Subduction Ground Motion Models | Description | 2008 | 2014 | 2018 | |:----------- |:----- |:---- |:---- | -| Cascadia<br>(interface) | __0.25__ : AB_03 (global)<br>__0.25__ : YOUNGS_97<br>__0.50__ : ZHAO_06 | __0.1__ : AB_03 (global)<br>__0.3__ : AM_09<br>__0.3__ : BCHYDRO_12<br>__0.3__ : ZHAO_06 | __0.3333__ : AM_09<br>__0.3334__ : BCHYDRO_12<br>__0.3333__ : ZHAO_06 | -| Cascadia<br>(slab) | __0.25__ : AB_03 (global)<br>__0.25__ : AB_03 (cascadia)<br>__0.50__ : YOUNGS_97 | __0.1665__ : AB_03 (global, mod)<br>__0.1665__ : AB_03 (cascadia, mod)<br>__0.3330__ : BCHYDRO_12<br>__0.3340__ : ZHAO_06 | __0.5__ : BCHYDRO_12<br>__0.5__ : ZHAO_06 | +| Cascadia<br>(interface) | **0.25** : AB_03 (global)<br>**0.25** : YOUNGS_97<br>**0.50** : ZHAO_06 | **0.1** : AB_03 (global)<br>**0.3** : AM_09<br>**0.3** : BCHYDRO_12<br>**0.3** : ZHAO_06 | **0.3333** : AM_09<br>**0.3334** : BCHYDRO_12<br>**0.3333** : ZHAO_06 | +| Cascadia<br>(slab) | **0.25** : AB_03 (global)<br>**0.25** : AB_03 (cascadia)<br>**0.50** : YOUNGS_97 | **0.1665** : AB_03 (global, mod)<br>**0.1665** : AB_03 (cascadia, mod)<br>**0.3330** : BCHYDRO_12<br>**0.3340** : ZHAO_06 | **0.5** : BCHYDRO_12<br>**0.5** : ZHAO_06 | ## Fault Source Model (CEUS) | Model | Description | 2008 | 2014 | 2018 | |:----- |:----------- |:---- |:---- |:---- | -| Deformation | | __1.0__ : GEO | __0.1__ : BIRD<br>__0.8__ : GEO<br>__0.1__ : ZENG | _(no change)_ | -| Rupture | | __0.5__ : Full<br> __0.5__ : Partial | _(no change)_ | _(no change)_ | -| Magnitude Scaling | | __1.0__ : Somerville-01 (area) | _(no change)_ | _(no change)_ | -| Maximum M¹ | Partial: epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ | -| | Full : epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ | -| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | _(no change)_ | _(no change)_ | +| Deformation | | **1.0** : GEO | **0.1** : BIRD<br>**0.8** : GEO<br>**0.1** : ZENG | *(no change)* | +| Rupture | | **0.5** : Full<br> **0.5** : Partial | *(no change)* | *(no change)* | +| Magnitude Scaling | | **1.0** : Somerville-01 (area) | *(no change)* | *(no change)* | +| Maximum M¹ | Partial: epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* | +| | Full : epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* | +| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | *(no change)* | *(no change)* | ¹ There are a very limited number of fault sources in CEUS @@ -50,59 +50,59 @@ alternative models. | Model | Description | 2008 | 2014 | 2018 | |:----- |:----------- |:---- |:---- |:---- | -| Deformation | | __1.0__ : GEO | __0.1__ : BIRD<br>__0.8__ : GEO<br>__0.1__ : ZENG | _(no change)_ | -| Rupture | Partial | __0.333__ : IMW, __0.5__ : PNW | _(no change)_ | _(no change)_ | -| | Full | __0.667__ : IMW, __0.5__ : PNW | _(no change)_ | _(no change)_ | -| Magnitude Scaling | | __1.0__ : WC_94 (length) | _(no change)_ | _(no change)_ | -| Maximum M | Partial: epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ | -| | Full : epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ | -| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | _(no change)_ | _(no change)_ | -| Dip | Reverse & Strike-Slip | __1.0__ : assigned | _(no change)_ | _(no change)_ | -| | Normal | __0.2, 0.6, 0.2__ : 50 ± 10° | __0.2, 0.6, 0.2__ : 50±15° | _(no change)_ | +| Deformation | | **1.0** : GEO | **0.1** : BIRD<br>**0.8** : GEO<br>**0.1** : ZENG | *(no change)* | +| Rupture | Partial | **0.333** : IMW, **0.5** : PNW | *(no change)* | *(no change)* | +| | Full | **0.667** : IMW, **0.5** : PNW | *(no change)* | *(no change)* | +| Magnitude Scaling | | **1.0** : WC_94 (length) | *(no change)* | *(no change)* | +| Maximum M | Partial: epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* | +| | Full : epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* | +| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | *(no change)* | *(no change)* | +| Dip | Reverse & Strike-Slip | **1.0** : assigned | *(no change)* | *(no change)* | +| | Normal | **0.2, 0.6, 0.2** : 50 ± 10° | **0.2, 0.6, 0.2** : 50±15° | *(no change)* | ## Grid Source Model | Model | Description | 2008 | 2014 | 2018 | |:----- |:----------- |:---- |:---- |:---- | -| Maximum M | WUS (exceptions) | __1.0__ : 7.0 | __0.9__ : 7.5 (truncated)<br>__0.1__ : 8.0 (tapered) | _(no change)_ | -| | CEUS (craton) | __0.1__ : 6.6<br>__0.2__ : 6.8<br>__0.5__ : 7.0<br>__0.2__ : 7.2 | __0.2__ : 6.5<br>__0.5__ : 7.0<br>__0.2__ : 7.5<br>__0.1__ : 8.0 | _(no change)_ | -| Smoothing | | __1.0__ : Fixed |__0.4__ : Adaptive<br>__0.6__ : Fixed | _(no change)_ | -| Magnitude Scaling | CEUS & WUS | __1.0__ : WC_94 (length) | _(no change)_ | _(no change)_ | -| Focal Mechanisms | Spatially Varying | __1.0__ : assigned | _(no change)_ | _(no change)_ | -| Depth (zTor) | WUS, M < 6.5 | __1.0__ : 5.0 km | _(no change)_ | _(no change)_ | -| | WUS, M ≥ 6.5 | __1.0__ : 1.0 km | _(no change)_ | _(no change)_ | -| | CEUS, All M | __1.0__ : 5.0 km | _(no change)_ | _(no change)_ | +| Maximum M | WUS (exceptions) | **1.0** : 7.0 | **0.9** : 7.5 (truncated)<br>**0.1** : 8.0 (tapered) | *(no change)* | +| | CEUS (craton) | **0.1** : 6.6<br>**0.2** : 6.8<br>**0.5** : 7.0<br>**0.2** : 7.2 | **0.2** : 6.5<br>**0.5** : 7.0<br>**0.2** : 7.5<br>**0.1** : 8.0 | *(no change)* | +| Smoothing | | **1.0** : Fixed |**0.4** : Adaptive<br>**0.6** : Fixed | *(no change)* | +| Magnitude Scaling | CEUS & WUS | **1.0** : WC_94 (length) | *(no change)* | *(no change)* | +| Focal Mechanisms | Spatially Varying | **1.0** : assigned | *(no change)* | *(no change)* | +| Depth (zTor) | WUS, M < 6.5 | **1.0** : 5.0 km | *(no change)* | *(no change)* | +| | WUS, M ≥ 6.5 | **1.0** : 1.0 km | *(no change)* | *(no change)* | +| | CEUS, All M | **1.0** : 5.0 km | *(no change)* | *(no change)* | ## Fault Source Model (CA, UCERF3) | Model | 2014 | 2018 | |:----- |:---- |:---- | -| Fault | __0.5__ : FM3.1<br> __0.5__ : FM3.2 | _(no change)_ | -| Deformation | __0.1__ : ABM<br>__0.3__ : BIRD<br>__0.3__ : GEO<br>__0.3__ : ZENG | _(no change)_ | -| Scaling Relationship<br>(mag-area & slip-length)| __0.2__ : ELLS_B<br>__0.2__ : ELLS_B (sqrt-L)<br>__0.2__ : HB_08<br>__0.2__ : SHAW_09<br>__0.2__ : SHAW_09 (csd) | _(no change)_ | -| Slip Distribution | __0.5__ : Tapered<br>__0.5__ : Boxcar | _(no change)_ | -| M ≥ 5 rate (yrâ»Â¹) | __0.1__ : 6.5<br>__0.6__ : 7.9<br>__0.3__ : 9.6 | _(no change)_ | -| Inversion Constraint | __1.0__ : UCERF2 (CH) | _(no change)_ | -| Fault Mo Rate | __1.0__ : off | _(no change)_ | +| Fault | **0.5** : FM3.1<br> **0.5** : FM3.2 | *(no change)* | +| Deformation | **0.1** : ABM<br>**0.3** : BIRD<br>**0.3** : GEO<br>**0.3** : ZENG | *(no change)* | +| Scaling Relationship<br>(mag-area & slip-length)| **0.2** : ELLS_B<br>**0.2** : ELLS_B (sqrt-L)<br>**0.2** : HB_08<br>**0.2** : SHAW_09<br>**0.2** : SHAW_09 (csd) | *(no change)* | +| Slip Distribution | **0.5** : Tapered<br>**0.5** : Boxcar | *(no change)* | +| M ≥ 5 rate (yrâ»Â¹) | **0.1** : 6.5<br>**0.6** : 7.9<br>**0.3** : 9.6 | *(no change)* | +| Inversion Constraint | **1.0** : UCERF2 (CH) | *(no change)* | +| Fault Mo Rate | **1.0** : off | *(no change)* | ## Grid Source Model (CA, UCERF3) | Model | 2014 | 2018 | |:----- |:---- |:---- | -| Grid: Maximum M | __0.1__ : 7.3<br>__0.8__ : 7.6<br>__0.1__ : 7.9 | _(no change)_ | -| Grid: Smoothing | __0.5__ : Adaptive<br>__0.5__ : Fixed | _(no change)_ | -| Grid: Focal Mechanisms | __1.0__ : assigned | _(no change)_ | -| Magnitude Scaling | __1.0__ : WC_94 (length) | _(no change)_ | +| Grid: Maximum M | **0.1** : 7.3<br>**0.8** : 7.6<br>**0.1** : 7.9 | *(no change)* | +| Grid: Smoothing | **0.5** : Adaptive<br>**0.5** : Fixed | *(no change)* | +| Grid: Focal Mechanisms | **1.0** : assigned | *(no change)* | +| Magnitude Scaling | **1.0** : WC_94 (length) | *(no change)* | ## Subduction seismic source model | Model | 2008 | 2014 | 2018 | |:----- |:---- |:---- |:---- | -| Rupture | __0.67__ : Full<br>__0.33__ : Partial | __1.0__ : Full<br>__0.5__ : Partial (segmented)<br>__0.5__ : Partial (unsegmented) | _(no change)_ | -| Magnitude Scaling | __1.0__ : Youngs et al. (length) | __0.334__ : Strasser et al. (2010)<br>__0.333__ : Murotani et al. (2008)<br>__0.333__ : Papazachos et al. (2004) | _(no change)_ | -| Magnitude Uncertainty | __0.2, 0.6, 0.2__ : M±0.2 | _(none)_ | _(no change)_ | -| Depth | __0.5__ : Base<br>__0.2__ : Bottom<br>__0.2__ : Middle<br>__0.1__ : Top | __0.3__ : Bottom<br>__0.5__ : Middle<br>__0.2__ : Top | _(no change)_ | -| Slab: Maximum M | __1.0__ : 7.2 | __0.9__ : 7.5<br>__0.1__ : 8.0 | _(no change)_ | +| Rupture | **0.67** : Full<br>**0.33** : Partial | **1.0** : Full<br>**0.5** : Partial (segmented)<br>**0.5** : Partial (unsegmented) | *(no change)* | +| Magnitude Scaling | **1.0** : Youngs et al. (length) | **0.334** : Strasser et al. (2010)<br>**0.333** : Murotani et al. (2008)<br>**0.333** : Papazachos et al. (2004) | *(no change)* | +| Magnitude Uncertainty | **0.2, 0.6, 0.2** : M±0.2 | *(none)* | *(no change)* | +| Depth | **0.5** : Base<br>**0.2** : Bottom<br>**0.2** : Middle<br>**0.1** : Top | **0.3** : Bottom<br>**0.5** : Middle<br>**0.2** : Top | *(no change)* | +| Slab: Maximum M | **1.0** : 7.2 | **0.9** : 7.5<br>**0.1** : 8.0 | *(no change)* | * Full: a.k.a. 'characteristic' * Partial: a.k.a. 'Gutenberg-Richter' or 'floating' diff --git a/docs/pages/Model-Editions.md b/docs/pages/Model-Editions.md index b875007e6..206a5de56 100644 --- a/docs/pages/Model-Editions.md +++ b/docs/pages/Model-Editions.md @@ -99,7 +99,7 @@ one of the dynamic editions is likely better. * [Model Editions](./Model-Editions.md#model-editions) * [Logic Trees & Uncertainty](./Logic-Trees-&-Uncertainty.md#logic-trees-&-uncertainty) * [Code Versions](./Code-Versions.md#code-versions) -* [**Documentation Index**](../README.md) +* [__Documentation Index__](../README.md) ---  [U.S. Geological Survey](https://www.usgs.gov) diff --git a/docs/pages/Model-Structure.md b/docs/pages/Model-Structure.md index e5f15da23..7af9614f6 100644 --- a/docs/pages/Model-Structure.md +++ b/docs/pages/Model-Structure.md @@ -139,9 +139,9 @@ See also: [Grid Source Type](./Source-Types.md#grid-sources) Zone sources specify a single rate that is distributed over a GeoJSON `Polygon` using point source rupture models. Presently, there is a 1:1 mapping of source zones to their associated rate files. -*__Note:__ The rate file approach will be discouraged and/or deprecated in the near future in favor +_**Note:** The rate file approach will be discouraged and/or deprecated in the near future in favor of dynamically computing rates over a zone from a single value or `rate-tree.json` when the loading -a model.* +a model._ ```text zone/ diff --git a/docs/pages/Site-Specification.md b/docs/pages/Site-Specification.md index 796f52840..2032f2375 100644 --- a/docs/pages/Site-Specification.md +++ b/docs/pages/Site-Specification.md @@ -107,7 +107,7 @@ outside the 'calculation' polygon are set to zero. For an example, see the * [Site Specification](./Site-Specification.md#site-specification) * [Examples](../../etc/examples) (or [on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples)) -* [**Documentation Index**](../README.md) +* [__Documentation Index__](../README.md) ---  [U.S. Geological Survey](https://www.usgs.gov) diff --git a/docs/pages/Source-Types.md b/docs/pages/Source-Types.md index 56ca3c289..90b24bbe9 100644 --- a/docs/pages/Source-Types.md +++ b/docs/pages/Source-Types.md @@ -12,15 +12,15 @@ geometry itself is unknown or very poorly defined. [[_TOC_]] -Source models for use with *nshmp-haz* are defined using [JSON](https://www.json.org) and -[GeoJSON](https://geojson.org). *nshmp-haz* makes determinations about how to represent a source +Source models for use with _nshmp-haz_ are defined using [JSON](https://www.json.org) and +[GeoJSON](https://geojson.org). _nshmp-haz_ makes determinations about how to represent a source based on a GeoJSON geometry type in conjunction with supporting JSON configuration files. Example source configuration files, `*-config.json`, are provided with each source type description. Configuration files must be fully specified with `null` JSON member values used to specify 'do nothing' where appropriate. Any configuration member value in ALL_CAPS indicates the value is one of a fixed number of options commonly referred to as an enum. -__Note on Coordinates:__ *nshmp-haz* supports longitude and latitude values in the closed ranges +__Note on Coordinates:__ _nshmp-haz_ supports longitude and latitude values in the closed ranges `[-360°‥360°]` and `[-90°‥90°]`. Note, however, that mixing site and/or source coordinates across the antimeridian (the -180° to 180° transition) will yield unexpected results. For Pacific models and calculations, always use positive or negative longitudes exclusively. @@ -43,7 +43,7 @@ Grid sources are represented in a model using a logic tree with a `rupture-sets. ruptures on each branch. Because gridded seismicity models may be governed by regionally varying MFD properties (e.g. `mMax`), rupture sets for grids are defined in a JSON array. -**rupture-sets.json**: Defines an array of one or more rupture sets. Multiple rupture sets are +__rupture-sets.json__: Defines an array of one or more rupture sets. Multiple rupture sets are used to model regional differences in MFD properties such as maximum magnitude. The `feature` member points to the ID of a geojson feature (in the `grid-sources/features` directory) that defines the bounds of the gridded seismicity source. A grid rupture set `mfd-tree` is never @@ -62,7 +62,7 @@ defined inline and always points to a tree in a ] ``` -**grid-config.json**: A `grid-depth-map` defines a mapping of magnitude ranges to logic trees of +__grid-config.json__: A `grid-depth-map` defines a mapping of magnitude ranges to logic trees of depth distributions. The map can use arbitrary names as keys, but the magnitude ranges defined by each member must be non-overlapping. The magnitude ranges are interpreted as closed (inclusive) – open (exclusive), e.g. [mMin..mMax). `maxDepth` constrains the maximum depth of any pseudo fault @@ -104,7 +104,7 @@ to upper-right). While most gridded rate files contain columns of longitude, lat some may contain depth values (intraslab sources), maximum magnitude caps, or other values. Scaled spatial PDFs are the preferred approach to modeling regional rate variations, however it is also possible to define explicit MFDs at each grid node. To do so, the `spatial-pdf` member -of a **rupture-sets.json** is replaced with `grid-mfds`. See +of a __rupture-sets.json__ is replaced with `grid-mfds`. See `2018 CONUS NSHM > active-crust > grid-sources` for examples of both approaches. ## Zone Sources @@ -146,7 +146,7 @@ directly. } ``` -**zone-config.json:** Zone source model configuration is identical to a grid source configuration. +__zone-config.json:__ Zone source model configuration is identical to a grid source configuration. ```json { @@ -182,7 +182,7 @@ they occur in multiple locations on the fault surface with appropriately scaled associated with finite fault models may be explicitly defined or derived from slip rates. Fault rupture rates may be modeled using explicitly defined MFDs or logic trees of slip rate. -**fault-source.geojson**: Defines the geometry and properties of a single source. In the example +__fault-source.geojson__: Defines the geometry and properties of a single source. In the example below the presence of a `rate-map` property indicates MFDs should be constructed from the supplied slip rates and using the weights defined in a `rate-tree.json`. @@ -229,7 +229,7 @@ slip rates and using the weights defined in a `rate-tree.json`. } ``` -**fault-config.json**: Controls the point spacing on a gridded surface used to realize the fault +__fault-config.json__: Controls the point spacing on a gridded surface used to realize the fault geometry as well as define the models to use for magnitude scaling and rupture floating. Dip variations and an associated slip-rate scaling model are also supported for normal faults. @@ -243,7 +243,7 @@ variations and an associated slip-rate scaling model are also supported for norm } ``` -**rupture-set.json**: When a fault source is represented with a logic tree a +__rupture-set.json__: When a fault source is represented with a logic tree a `rupture-set.json` defines the ruptures for each branch. A rupture set _may_ also define custom properties and _may_ also contain a `sections` member that defines the fault sections for the rupture set (see note on fault section stitching, [below](#fault-section-stitching)). @@ -281,7 +281,7 @@ as the joint probability of exceeding ground motions from each independent event a cluster may only have an mfd-tree composed of `Mfd.Type.SINGLE` MFDs and the mfd-trees must match across all sources in a cluster (i.e. each mfd-tree has the same IDs and weights). -**cluster-set.json** A specialized type of rupture set, this file defines the array of fault +__cluster-set.json__ A specialized type of rupture set, this file defines the array of fault rupture sets that make up a 'cluster'. As with fault sources, the nested rupture sets in a cluster set _may_ define `properties` and `sections` members. @@ -317,10 +317,10 @@ U.S. Fault system source sets require three files: `rupture_set.json`, `sections logic tree. Note that system sources _may_ have complementary gridded seismicity source models with matching logic trees. -**rupture-set.json**: Provides identifying information for the ruptures defined in the adjacant +__rupture-set.json__: Provides identifying information for the ruptures defined in the adjacant sections and ruptures files. -**sections.geojson**: defines a feature collection of the fault sections in a fault network. +__sections.geojson__: defines a feature collection of the fault sections in a fault network. Because fault sections are derived by dividing larger faults into subsections, section features contain several properties that differ from standalone fault section source models (e.g. `dip-direction`). @@ -356,7 +356,7 @@ contain several properties that differ from standalone fault section source mode } ``` -**ruptures.csv**: Defines the properties of every rupture. The last column in a rupture file +__ruptures.csv__: Defines the properties of every rupture. The last column in a rupture file defines the ordered array of participating fault section IDs using the shorthand `1127:1131-2411:2412`. Colons denote continous ranges of sections and hyphens denote breaks. @@ -383,7 +383,7 @@ using an `slab-config.json` file. * [Magnitude Frequency Distributions (MFDs)](./Magnitude-Frequency-Distributions.md#magnitude-frequency-distributions) * [Rupture Scaling Relations](./Rupture-Scaling-Relations.md#rupture-scaling-relations) * [Ground Motion Models (GMMs)](./Ground-Motion-Models.md#ground-motion-models) -* [**Documentation Index**](../README.md) +* [__Documentation Index__](../README.md) ---  [U.S. Geological Survey](https://www.usgs.gov) diff --git a/docs/pages/USGS-Models.md b/docs/pages/USGS-Models.md index 63f3ce6a0..c71012dd4 100644 --- a/docs/pages/USGS-Models.md +++ b/docs/pages/USGS-Models.md @@ -20,10 +20,10 @@ Each model region has a dedicated repository with version tags marking different * [Conterminous U.S.](https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus) * [Hawaii](https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii) -* Alaska - _update not yet published_ -* Guam & Marianas - _update not yet published_ -* Puerto Rico & U.S. Virgin Islands - _update not yet published_ -* Samoa & Pacific Islands - _update not yet published_ +* Alaska - *update not yet published* +* Guam & Marianas - *update not yet published* +* Puerto Rico & U.S. Virgin Islands - *update not yet published* +* Samoa & Pacific Islands - *update not yet published* --- diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md index 44b3284a0..09fd88452 100644 --- a/docs/pages/Web-Services.md +++ b/docs/pages/Web-Services.md @@ -73,7 +73,7 @@ Open browser to [http://localhost:8080/](http://localhost:8080/). #### Docker Memory on Mac -By default, Docker Desktop for Mac is set to use 2 GB runtime memory. To run nshmp-haz-ws, the +By default, Docker Desktop for Mac is set to use 2 GB runtime memory. To run nshmp-haz-ws, the memory available to Docker must be [increased](https://docs.docker.com/docker-for-mac/#advanced) to a minimum of 4 GB. diff --git a/etc/examples/1-hazard-curve/README.md b/etc/examples/1-hazard-curve/README.md index f136d550c..ceb307b95 100644 --- a/etc/examples/1-hazard-curve/README.md +++ b/etc/examples/1-hazard-curve/README.md @@ -49,4 +49,4 @@ In the next example, we'll override the model supplied configuration with a cust --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/2-custom-config/README.md b/etc/examples/2-custom-config/README.md index fee21af31..1af09bb27 100644 --- a/etc/examples/2-custom-config/README.md +++ b/etc/examples/2-custom-config/README.md @@ -47,4 +47,4 @@ __Results directory structure:__ --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/3-sites-file/README.md b/etc/examples/3-sites-file/README.md index 97ec338b4..2a3c5a404 100644 --- a/etc/examples/3-sites-file/README.md +++ b/etc/examples/3-sites-file/README.md @@ -45,4 +45,4 @@ __Results directory structure:__ --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/4-hazard-map/README.md b/etc/examples/4-hazard-map/README.md index 641feee17..fb600c012 100644 --- a/etc/examples/4-hazard-map/README.md +++ b/etc/examples/4-hazard-map/README.md @@ -37,4 +37,4 @@ __Results directory structure:__ --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/5-complex-model/README.md b/etc/examples/5-complex-model/README.md index 29a3ee9b4..b76e83b68 100644 --- a/etc/examples/5-complex-model/README.md +++ b/etc/examples/5-complex-model/README.md @@ -76,4 +76,4 @@ __Results directory structure:__ --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/6-enhanced-output/README.md b/etc/examples/6-enhanced-output/README.md index c20c6d251..08143bdac 100644 --- a/etc/examples/6-enhanced-output/README.md +++ b/etc/examples/6-enhanced-output/README.md @@ -64,4 +64,4 @@ __Results directory structure:__ --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/etc/examples/7-disaggregation/README.md b/etc/examples/7-disaggregation/README.md index a01f54397..e6578d88e 100644 --- a/etc/examples/7-disaggregation/README.md +++ b/etc/examples/7-disaggregation/README.md @@ -65,4 +65,4 @@ will not be saved. --- -* [**Documentation Index**](../../../docs/README.md) +* [__Documentation Index__](../../../docs/README.md) diff --git a/gradle/node.gradle b/gradle/node.gradle index 147caa205..f54048d6b 100644 --- a/gradle/node.gradle +++ b/gradle/node.gradle @@ -10,8 +10,8 @@ task nodeInstall(type: NpmTask) { description "Install markdownlint-clia and yamllint with NPM" args = [ "install", - "markdownlint-cli", - "yaml-lint", + "markdownlint-cli@0.31.1", + "yaml-lint@1.2.4", "--save-dev", "--loglevel", "error" -- GitLab From 9732d22561dce9b6416b689c87247283907d9bef Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 15:00:49 -0600 Subject: [PATCH 08/33] remove allow failuer --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06fe93c44..076d2adc1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -183,7 +183,6 @@ Markdown Lint: - .java script: - ./gradlew markdownlint - allow_failure: true Unit Tests: artifacts: -- GitLab From 25170e49946403ab1f56ff4e418dbe1fda764e56 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 15:21:31 -0600 Subject: [PATCH 09/33] Add java memory --- docs/pages/Web-Services.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md index 09fd88452..4e22d15d3 100644 --- a/docs/pages/Web-Services.md +++ b/docs/pages/Web-Services.md @@ -121,11 +121,13 @@ Open browser to [http://localhost:8080/](http://localhost:8080/). A public Docker image is avaialable on [Docker Hub](https://hub.docker.com/r/usgs/nshmp-haz-ws) -There are 2 main tags: +There are 3 main tags: -* staging-latest (latest): Refers to the +* `latest`: Refers to the [main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates -* production-latest: Refers to the +* `staging-latest`: Refers to the +[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates +* `production-latest`: Refers to the [production](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/production) branch and is stable ```bash @@ -156,6 +158,22 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws Open browser to [http://localhost:8080/](http://localhost:8080/). +#### Java Memory + +When running **nshmp-haz** web services with Docker +the initial (Xms) and maximum (Xmx) JVM memory sizes can +be set with the environment flag (-e, -env): + +```bash +docker run -p <PORT>:8080 -e JAVA_OPTS="-Xms<INITIAL> -Xmx<MAX>" -d usgs/nshmp-haz-ws + +# Example +docker run -p 8080:8080 -e JAVA_OPTS="-Xms1g -Xmx8g" -d usgs/nshmp-haz-ws +``` + +Where `<INITIAL>` and `<MAX >`should be set to the desired initial and maximum memory sizes, +respectively. + --- * [**Documentation Index**](../README.md) -- GitLab From befbf11c42774948f2769ba35de6d185f45fc472 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 15:21:56 -0600 Subject: [PATCH 10/33] Fix --- docs/pages/Web-Services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md index 4e22d15d3..2285cd0c2 100644 --- a/docs/pages/Web-Services.md +++ b/docs/pages/Web-Services.md @@ -158,7 +158,7 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws Open browser to [http://localhost:8080/](http://localhost:8080/). -#### Java Memory +### Java Memory When running **nshmp-haz** web services with Docker the initial (Xms) and maximum (Xmx) JVM memory sizes can -- GitLab From 395fc4b0853a0ab16970ff8d102ff67e39b5e6ba Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 16:55:21 -0600 Subject: [PATCH 11/33] Push to repos registry --- .gitlab-ci.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 076d2adc1..be7115b3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,26 +96,13 @@ stages: docker build \ ${BUILD_ARGS} \ --pull \ - --tag "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}" \ + --tag "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}" \ --file "${CI_PROJECT_DIR}/${DOCKERFILE}" \ "${CI_PROJECT_DIR}/."; - - docker push "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - - latest_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - docker tag "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}" "${latest_image_name}"; + - docker push "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - latest_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - docker tag "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}" "${latest_image_name}"; - docker push "${latest_image_name}"; - - if [[ - ${CI_COMMIT_REF_SLUG} == "${CI_DEFAULT_BRANCH}" || - ${CI_COMMIT_REF_SLUG} == "production" || - -n "${CI_COMMIT_TAG}" - ]]; then - docker tag "${latest_image_name}" "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - docker push "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - if [[ ${ENVIRONMENT} == "staging" ]]; then - docker tag "usgs/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest" "usgs/${CI_PROJECT_NAME}:latest"; - docker push "usgs/${CI_PROJECT_NAME}:latest"; - fi - fi - | printf " -------- -- GitLab From ff3e3a5e18d24b36f25f2d967634e077c2582080 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 17:02:44 -0600 Subject: [PATCH 12/33] push latest --- .gitlab-ci.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be7115b3e..6d512c27b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,23 +92,18 @@ stages: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done + - latest_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:latest"; + - env_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - | docker build \ ${BUILD_ARGS} \ --pull \ - --tag "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}" \ + --tag "${env_image_name}" \ --file "${CI_PROJECT_DIR}/${DOCKERFILE}" \ "${CI_PROJECT_DIR}/."; - - docker push "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - - latest_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - docker tag "${CI_REGISTRY}/${CI_PROJECT_NAME}:${IMAGE_TAG}" "${latest_image_name}"; - - docker push "${latest_image_name}"; - - | - printf " - -------- - Image Name - %s:%s - -------- - " "${CI_PROJECT_NAME}" "${IMAGE_TAG}"; + - docker push "${env_image_name}"; + - docker tag "${env_image_name}" "${latest_image_name}" + - docker push "${latest_image_name}" stage: build tags: - build -- GitLab From 4b50e7131ec5b596825568b77cd456c354ce166e Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Wed, 13 Apr 2022 17:07:23 -0600 Subject: [PATCH 13/33] fix variable --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d512c27b..001933ad7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,8 +92,8 @@ stages: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done - - latest_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:latest"; - - env_image_name="${CI_REGISTRY}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; + - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - | docker build \ ${BUILD_ARGS} \ -- GitLab From 5ab8630d5b0138edaecb6eab08e2f996237066ea Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 10:57:42 -0600 Subject: [PATCH 14/33] cleanup --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 001933ad7..12415fa11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -110,9 +110,8 @@ stages: variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | - BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/centos:latest - FROM_IMAGE=${DEVOPS_REGISTRY}usgs/centos:latest - IMAGE_TAG: ${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 + FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 #### # Java Templates -- GitLab From cb64d8c4ef616db8e8cc8d67d444049a2a056f6a Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 11:02:17 -0600 Subject: [PATCH 15/33] switch tags --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12415fa11..730b9a513 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,10 @@ stages: - build - trigger +default: + tags: + - nshmp + #### # Environment Templates #### @@ -105,8 +109,6 @@ stages: - docker tag "${env_image_name}" "${latest_image_name}" - docker push "${latest_image_name}" stage: build - tags: - - build variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | @@ -123,8 +125,6 @@ stages: .java: image: ${DEVOPS_REGISTRY}usgs/amazoncorretto:11 stage: build - tags: - - development #### # Stage: build -- GitLab From 742301c20d736b8f98ffe38d7f32d3c03f8a4d93 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 11:09:15 -0600 Subject: [PATCH 16/33] tags --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 730b9a513..ee98582a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,6 +109,8 @@ default: - docker tag "${env_image_name}" "${latest_image_name}" - docker push "${latest_image_name}" stage: build + tags: + - development variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | -- GitLab From 6519dea89e7d2ce6d3c347273756fd20eab17c86 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 11:56:29 -0600 Subject: [PATCH 17/33] add login --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee98582a3..d52086251 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -83,6 +83,8 @@ default: # on default upstream and production upstream branches. ## .docker-build: + before_script: + - docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} extends: - .dind needs: [] @@ -109,8 +111,6 @@ default: - docker tag "${env_image_name}" "${latest_image_name}" - docker push "${latest_image_name}" stage: build - tags: - - development variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | -- GitLab From d5108553795e9cf323de78024ee8b679a45c72c5 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 12:15:50 -0600 Subject: [PATCH 18/33] update docker path --- docs/pages/Building-&-Running.md | 27 ++++++++++++++++----------- docs/pages/Web-Services.md | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index 12d1ad33e..37a93a42d 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -107,11 +107,16 @@ to a minimum of 4 GB. ### Run nshmp-haz in Docker The *nshmp-haz* application may be run as a Docker container which mitigates the need to install -Git, Java, or other dependencies besides Docker. A public image is available on -Docker hub at [https://hub.docker.com/r/usgs/nshmp-haz](https://hub.docker.com/r/usgs/nshmp-haz) +Git, Java, or other dependencies besides Docker. A public image is available +from this repository's +[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry). which can be run with: ```bash +# Pull docker image +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest + +# Run docker image docker run \ --env CLASS_NAME=<DisaggCalc | HazardCalc | RateCalc> \ --env IML=<NUMBER> \ @@ -119,7 +124,7 @@ docker run \ --volume /absolute/path/to/sites/file:/app/sites.<geojson | csv> \ --volume /absolute/path/to/config/file:/app/config.json \ --volume /absolute/path/to/output:/app/output \ - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Where: @@ -152,7 +157,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz HazardCalc docker run \ @@ -160,7 +165,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-hazard-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` #### [`DisaggCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java) Example @@ -174,7 +179,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz DisaggCalc docker run \ @@ -183,7 +188,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-disagg-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest ``` #### [`RateCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java) Example @@ -197,7 +202,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git # Pull image -docker pull usgs/nshmp-haz:production-latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest # Run nshmp-haz RateCalc docker run \ @@ -205,7 +210,7 @@ docker run \ --volume "$(pwd)/nshm-hawaii:/app/model" \ --volume "$(pwd)/sites.geojson" \ --volume "$(pwd)/hawaii-rate-output:/app/output" \ - usgs/nshmp-haz:production-latest + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` ### Run Customization @@ -217,13 +222,13 @@ be set with the environment flag (-e, -env): docker run \ --env JAVA_MEMORY=<MEMORY> \ ... - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz # Example docker run \ --env JAVA_MEMORY="12g" \ ... - usgs/nshmp-haz + code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz ``` Where: diff --git a/docs/pages/Web-Services.md b/docs/pages/Web-Services.md index 2285cd0c2..3076ca1db 100644 --- a/docs/pages/Web-Services.md +++ b/docs/pages/Web-Services.md @@ -80,7 +80,7 @@ to a minimum of 4 GB. ### Docker Build Options * [Build and run docker locally](#build-and-run-docker-locally) -* [Run from Docker Hub](#run-from-docker-hub) +* [Run from Container Registry](#run-from-container-registry) ### Build and Run Docker Locally @@ -117,14 +117,14 @@ docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws Open browser to [http://localhost:8080/](http://localhost:8080/). -### Run from Docker Hub +### Run from Container Registry -A public Docker image is avaialable on [Docker Hub](https://hub.docker.com/r/usgs/nshmp-haz-ws) +A public Docker image is avaialable from this repository's +[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry). There are 3 main tags: -* `latest`: Refers to the -[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates +* `latest`: Refers to the latest updates from the main or production branch * `staging-latest`: Refers to the [main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates * `production-latest`: Refers to the @@ -132,28 +132,28 @@ There are 3 main tags: ```bash # Pull image -docker pull nshmp-haz-ws:latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest # Run -docker run -p 8080:8080 -v "/path/to/model:/model" nshmp-haz-ws +docker run -p 8080:8080 -v "/path/to/model:/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Web service runs on [http://localhost:8080/](http://localhost:8080/) The hazard model is read in via Docker volumes. -#### Docker Hub Example with NSHM +#### Container Registry Example with NSHM ```bash # Pull image -docker pull nshmp-haz-ws:latest +docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest # Download NSHM CONUS cd .. git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus # Run web services -docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws +docker run -p 8080:8080 -v "$(pwd):/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws ``` Open browser to [http://localhost:8080/](http://localhost:8080/). -- GitLab From 02e074904ce2d54b095e91491e24bbbb58a48d9a Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 12:31:57 -0600 Subject: [PATCH 19/33] Simplify node install --- .gitignore | 2 - gradle/git-hooks.gradle | 2 +- gradle/node.gradle | 16 +- package-lock.json | 1179 +++++++++++++++++++++++++++++++++++++++ package.json | 11 + 5 files changed, 1194 insertions(+), 16 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index b8ac68d35..df0ac6ee9 100644 --- a/.gitignore +++ b/.gitignore @@ -25,5 +25,3 @@ libs # Node node_modules -package.json -package-lock.json diff --git a/gradle/git-hooks.gradle b/gradle/git-hooks.gradle index 15c974ecb..2d58b58af 100644 --- a/gradle/git-hooks.gradle +++ b/gradle/git-hooks.gradle @@ -10,7 +10,7 @@ githook { hooks { "pre-push" { - task = "markdownlint yamllint spotlessCheck spotbugsMain spotbugsTest" + task = "nodeInstall markdownlint yamllint spotlessCheck spotbugsMain spotbugsTest" } } } diff --git a/gradle/node.gradle b/gradle/node.gradle index f54048d6b..9a368c898 100644 --- a/gradle/node.gradle +++ b/gradle/node.gradle @@ -5,23 +5,15 @@ node { version = "${nodeVersion}" } -/* Install markdownlint-cli with NPM */ +/* Install Dependencies */ task nodeInstall(type: NpmTask) { - description "Install markdownlint-clia and yamllint with NPM" - args = [ - "install", - "markdownlint-cli@0.31.1", - "yaml-lint@1.2.4", - "--save-dev", - "--loglevel", - "error" - ] + description "Install dependencies" + args = ["install"] } /* Run markdownlint */ task markdownlint(type: NpxTask) { description "Run markdownlint" - dependsOn nodeInstall command = "markdownlint" args = ["**/*.md"] } @@ -29,7 +21,6 @@ task markdownlint(type: NpxTask) { /* Apply markdownlint fixes */ task markdownlintApply(type: NpxTask) { description "Apply markdownlint fixes" - dependsOn nodeInstall command = "markdownlint" args = [ "**/*.md", @@ -40,7 +31,6 @@ task markdownlintApply(type: NpxTask) { /* Run yamllint */ task yamllint(type: NpxTask) { description "Run yamllint" - dependsOn nodeInstall command = "yamllint" args = [ "**/*.yml", diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..086e592de --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1179 @@ +{ + "name": "nshmp-haz", + "version": "2.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "nshmp-haz", + "version": "2.0.0", + "devDependencies": { + "markdownlint-cli": "^0.31.1", + "yaml-lint": "^1.2.4" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/leprechaun": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/leprechaun/-/leprechaun-0.0.2.tgz", + "integrity": "sha1-i5ZRSp5jTFP75ZqAlPM3jI+yCE0=", + "dev": true, + "dependencies": { + "log-symbols": "^1.0.2" + } + }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "dependencies": { + "chalk": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdownlint": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.25.1.tgz", + "integrity": "sha512-AG7UkLzNa1fxiOv5B+owPsPhtM4D6DoODhsJgiaNg1xowXovrYgOnLqAgOOFQpWOlHFVQUzjMY5ypNNTeov92g==", + "dev": true, + "dependencies": { + "markdown-it": "12.3.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/markdownlint-cli": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.31.1.tgz", + "integrity": "sha512-keIOMwQn+Ch7MoBwA+TdkyVMuxAeZFEGmIIlvwgV0Z1TGS5MxPnRr29XCLhkNzCHU+uNKGjU+VEjLX+Z9kli6g==", + "dev": true, + "dependencies": { + "commander": "~9.0.0", + "get-stdin": "~9.0.0", + "glob": "~7.2.0", + "ignore": "~5.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.0.0", + "markdownlint": "~0.25.1", + "markdownlint-rule-helpers": "~0.16.0", + "minimatch": "~3.0.5", + "run-con": "~1.2.10" + }, + "bin": { + "markdownlint": "markdownlint.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/markdownlint-rule-helpers": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz", + "integrity": "sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==", + "dev": true + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "dev": true, + "dependencies": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/nconf/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/run-con": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.10.tgz", + "integrity": "sha512-n7PZpYmMM26ZO21dd8y3Yw1TRtGABjRtgPSgFS/nhzfvbJMXFtJhJVyEgayMiP+w/23craJjsnfDvx4W4ue/HQ==", + "dev": true, + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~2.0.0", + "minimist": "^1.2.5", + "strip-json-comments": "~3.1.1" + }, + "bin": { + "run-con": "cli.js" + } + }, + "node_modules/secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "node_modules/window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true, + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "dev": true + }, + "node_modules/yaml-lint": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.2.4.tgz", + "integrity": "sha512-qpKE0szyKsE9TrlVPi+bxKxVAjl30QjNAOyOxy7noQdf/WCCYUlT4xiCRxMG48eyeBzMBtBN6PgGfaB0MJePNw==", + "dev": true, + "dependencies": { + "glob": "^7.1.2", + "js-yaml": "^3.10.0", + "leprechaun": "0.0.2", + "lodash.merge": "^4.6.1", + "lodash.snakecase": "^4.1.1", + "nconf": "^0.10.0" + }, + "bin": { + "yamllint": "cli.js" + } + }, + "node_modules/yaml-lint/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/yaml-lint/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "dev": true, + "dependencies": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + } + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "ignore": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "leprechaun": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/leprechaun/-/leprechaun-0.0.2.tgz", + "integrity": "sha1-i5ZRSp5jTFP75ZqAlPM3jI+yCE0=", + "dev": true, + "requires": { + "log-symbols": "^1.0.2" + } + }, + "linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=", + "dev": true + }, + "log-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", + "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", + "dev": true, + "requires": { + "chalk": "^1.0.0" + } + }, + "markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "requires": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "markdownlint": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.25.1.tgz", + "integrity": "sha512-AG7UkLzNa1fxiOv5B+owPsPhtM4D6DoODhsJgiaNg1xowXovrYgOnLqAgOOFQpWOlHFVQUzjMY5ypNNTeov92g==", + "dev": true, + "requires": { + "markdown-it": "12.3.2" + } + }, + "markdownlint-cli": { + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.31.1.tgz", + "integrity": "sha512-keIOMwQn+Ch7MoBwA+TdkyVMuxAeZFEGmIIlvwgV0Z1TGS5MxPnRr29XCLhkNzCHU+uNKGjU+VEjLX+Z9kli6g==", + "dev": true, + "requires": { + "commander": "~9.0.0", + "get-stdin": "~9.0.0", + "glob": "~7.2.0", + "ignore": "~5.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "~3.0.0", + "markdownlint": "~0.25.1", + "markdownlint-rule-helpers": "~0.16.0", + "minimatch": "~3.0.5", + "run-con": "~1.2.10" + } + }, + "markdownlint-rule-helpers": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.16.0.tgz", + "integrity": "sha512-oEacRUVeTJ5D5hW1UYd2qExYI0oELdYK72k1TKGvIeYJIbqQWAz476NAc7LNixSySUhcNl++d02DvX0ccDk9/w==", + "dev": true + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "dev": true, + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + }, + "dependencies": { + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + } + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "run-con": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.10.tgz", + "integrity": "sha512-n7PZpYmMM26ZO21dd8y3Yw1TRtGABjRtgPSgFS/nhzfvbJMXFtJhJVyEgayMiP+w/23craJjsnfDvx4W4ue/HQ==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~2.0.0", + "minimist": "^1.2.5", + "strip-json-comments": "~3.1.1" + } + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", + "dev": true + }, + "yaml-lint": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.2.4.tgz", + "integrity": "sha512-qpKE0szyKsE9TrlVPi+bxKxVAjl30QjNAOyOxy7noQdf/WCCYUlT4xiCRxMG48eyeBzMBtBN6PgGfaB0MJePNw==", + "dev": true, + "requires": { + "glob": "^7.1.2", + "js-yaml": "^3.10.0", + "leprechaun": "0.0.2", + "lodash.merge": "^4.6.1", + "lodash.snakecase": "^4.1.1", + "nconf": "^0.10.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "dev": true, + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..bf79dd711 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "nshmp-haz", + "version": "2.0.0", + "repository": { + "url": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz" + }, + "devDependencies": { + "markdownlint-cli": "^0.31.1", + "yaml-lint": "^1.2.4" + } +} -- GitLab From 0aba10d2f3421f4b22b14c99dec93b4f7615ee89 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 12:34:20 -0600 Subject: [PATCH 20/33] fix markdown pipeline --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d52086251..fb10bfa45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -165,8 +165,16 @@ Markdown Lint: extends: - .java script: + - ./gradlew nodeInstall - ./gradlew markdownlint +YAML Lint: + extends: + - .java + script: + - ./gradlew nodeInstall + - ./gradlew yamllint + Unit Tests: artifacts: paths: -- GitLab From 5802322192a621e5108a4805f6f46b8e3021c2df Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 12:38:55 -0600 Subject: [PATCH 21/33] update docker info --- docs/pages/Building-&-Running.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/pages/Building-&-Running.md b/docs/pages/Building-&-Running.md index 37a93a42d..5bafde11c 100644 --- a/docs/pages/Building-&-Running.md +++ b/docs/pages/Building-&-Running.md @@ -74,10 +74,11 @@ files. Disaggregations also have some independent ## Run with [Docker](https://docs.docker.com/install/) -nshmp-haz is available as a [public image](https://hub.docker.com/repository/docker/usgs/nshmp-haz) +nshmp-haz is available as a public image from the +[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry) with tags: -* `development-latest`: Developer forks +* `latest`: Refers to the latest updates from the main or production branch * `staging-latest`: Latest updates associated with the [main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch * `production-latest`: Latest stable release associated with the -- GitLab From 51e9933d27e2e92c8294d78ac91a8e251cf21f5c Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 13:16:05 -0600 Subject: [PATCH 22/33] fix trigger --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb10bfa45..32495dd21 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,10 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml + NSHMP_HAZ_WS_IMAGE: ${CODE_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports + # Do not run for merge requests workflow: rules: @@ -213,6 +215,7 @@ Trigger nshmp-haz-ws CDK: --form ref=${REF} \ --form "variables[description]=Triggered by nshmp-haz" \ --form "variables[ENVIRONMENT]=${ENVIRONMENT}" \ + --form "variables[NSHMP_HAZ_WS_IMAGE]=${NSHMP_HAZ_WS_IMAGE}" \ --form "variables[TRIGGER_PASSCODE]=${NSHMP_HAZ_WS_CDK_TRIGGER_TOKEN}" \ "https://${PRIVATE_GITLAB}/api/v4/projects/${NSHMP_HAZ_WS_CDK_PROJECT_ID}/trigger/pipeline" stage: trigger -- GitLab From e0e39147f7f733c52c1cc4d4eee676219a1e026e Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 13:27:17 -0600 Subject: [PATCH 23/33] push sha bashed image --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32495dd21..0fe14e72c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,6 +102,7 @@ default: done - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - | docker build \ ${BUILD_ARGS} \ @@ -112,12 +113,21 @@ default: - docker push "${env_image_name}"; - docker tag "${env_image_name}" "${latest_image_name}" - docker push "${latest_image_name}" + - docker tag "${latest_image_name}" "${sha_image_name}" + - docker push "${sha_image_name}" + - | + printf " + -------- + Image Name - %s:%s + -------- + " "${CI_PROJECT_NAME}" "${IMAGE_TAG}"; stage: build variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 + IMAGE_TAG: ${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} #### # Java Templates -- GitLab From 9da3eb42aabc9b24c4b87241a2efc93b61dced13 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 13:28:04 -0600 Subject: [PATCH 24/33] update docker image path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0fe14e72c..690beef33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml - NSHMP_HAZ_WS_IMAGE: ${CODE_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports -- GitLab From 8708ec94676d46d9ed1e9dba716dbbfdaf650e2b Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:21:55 -0600 Subject: [PATCH 25/33] push to upstream --- .gitlab-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 690beef33..f6321e50c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,9 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml - NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY}/${UPSTREAM_PATH}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz # Do not run for merge requests @@ -100,9 +101,9 @@ default: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done - - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; - - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - latest_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:latest"; + - env_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - sha_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - | docker build \ ${BUILD_ARGS} \ @@ -153,7 +154,6 @@ Build Image Haz: BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Image WS: extends: @@ -165,7 +165,6 @@ Build Image WS: FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} DOCKERFILE: ws.Dockerfile - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Project: extends: @@ -231,4 +230,3 @@ Trigger nshmp-haz-ws CDK: stage: trigger variables: REF: main - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz -- GitLab From 499bf12817968cee91eac842713731fd6e0d2d8e Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:29:21 -0600 Subject: [PATCH 26/33] revert docker image name --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6321e50c..a6b385565 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,8 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml - NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY}/${UPSTREAM_PATH}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports - UPSTREAM_PATH: ghsc/nshmp/nshmp-haz - # Do not run for merge requests workflow: @@ -101,9 +99,9 @@ default: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done - - latest_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:latest"; - - env_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - sha_image_name="${CI_REGISTRY}/${UPSTREAM_PATH}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; + - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - | docker build \ ${BUILD_ARGS} \ @@ -154,6 +152,7 @@ Build Image Haz: BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Image WS: extends: @@ -165,6 +164,7 @@ Build Image WS: FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} DOCKERFILE: ws.Dockerfile + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Project: extends: @@ -230,3 +230,4 @@ Trigger nshmp-haz-ws CDK: stage: trigger variables: REF: main + UPSTREAM_PATH: ghsc/nshmp/nshmp-haz -- GitLab From 5ce21a7519b85cecb405dc50659dc44fe2880e16 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:40:37 -0600 Subject: [PATCH 27/33] push to repo and chs --- .gitlab-ci.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6b385565..620437a75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: JACOCO_HTML_DIR: ${REPORTS_DIR}/jacoco/test/html JUNIT_FILES: build/test-results/test/TEST-*.xml - NSHMP_HAZ_WS_IMAGE: ${CI_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + NSHMP_HAZ_WS_IMAGE: ${CODE_REGISTRY_IMAGE}/nshmp-haz-ws:${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} REPORTS_DIR: build/reports # Do not run for merge requests @@ -101,19 +101,28 @@ default: done - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - chs_sha_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - chs_env_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - | docker build \ ${BUILD_ARGS} \ --pull \ - --tag "${env_image_name}" \ + --tag "${latest_image_name}" \ --file "${CI_PROJECT_DIR}/${DOCKERFILE}" \ "${CI_PROJECT_DIR}/."; - - docker push "${env_image_name}"; - - docker tag "${env_image_name}" "${latest_image_name}" - - docker push "${latest_image_name}" - - docker tag "${latest_image_name}" "${sha_image_name}" - - docker push "${sha_image_name}" + - docker push "${latest_image_name}"; + - | + docker tag "${latest_image_name}" "${env_image_name}"; + docker push "${env_image_name}"; + - | + docker tag "${latest_image_name}" "${sha_image_name}"; + docker push "${sha_image_name}"; + - | + docker tag "${latest_image_name}" "${chs_sha_image_name}"; + docker push "${chs_sha_image_name}"; + - | + docker tag "${latest_image_name}" "${chs_env_image_name}"; + docker push "${chs_env_image_name}"; - | printf " -------- -- GitLab From 69a25cfd5c3a439b9393e105a589537fb959c03a Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:46:24 -0600 Subject: [PATCH 28/33] add sha --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 620437a75..35fb25a45 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,10 +99,11 @@ default: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done - - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; - - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - chs_sha_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - chs_env_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - chs_sha_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; + - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - | docker build \ ${BUILD_ARGS} \ -- GitLab From ea91b3f6a8f1d480863c33b8c97ab99762144553 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:50:23 -0600 Subject: [PATCH 29/33] add tags to docker build --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35fb25a45..4d59fb7b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -131,6 +131,9 @@ default: -------- " "${CI_PROJECT_NAME}" "${IMAGE_TAG}"; stage: build + tags: + - nshmp + - build variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | -- GitLab From c76ededc0c44a21faf1eb7e9d8e6bb28afd0081d Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:50:59 -0600 Subject: [PATCH 30/33] fix tag --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d59fb7b9..eea26c0ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,7 +132,6 @@ default: " "${CI_PROJECT_NAME}" "${IMAGE_TAG}"; stage: build tags: - - nshmp - build variables: DOCKERFILE: Dockerfile -- GitLab From 7f5c2a7785bd3f8cf175ca3ee7c0a842e3692faa Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 14:58:30 -0600 Subject: [PATCH 31/33] make parallel --- .gitlab-ci.yml | 53 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eea26c0ca..ae17a83f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -84,8 +84,6 @@ default: # on default upstream and production upstream branches. ## .docker-build: - before_script: - - docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} extends: - .dind needs: [] @@ -99,11 +97,9 @@ default: for arg in ${DOCKER_BUILD_ARGS}; do BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}"; done - - chs_env_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - chs_sha_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - - env_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; - - latest_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; - - sha_image_name="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; + - env_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest"; + - latest_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest"; + - sha_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}"; - | docker build \ ${BUILD_ARGS} \ @@ -118,12 +114,6 @@ default: - | docker tag "${latest_image_name}" "${sha_image_name}"; docker push "${sha_image_name}"; - - | - docker tag "${latest_image_name}" "${chs_sha_image_name}"; - docker push "${chs_sha_image_name}"; - - | - docker tag "${latest_image_name}" "${chs_env_image_name}"; - docker push "${chs_env_image_name}"; - | printf " -------- @@ -132,13 +122,15 @@ default: " "${CI_PROJECT_NAME}" "${IMAGE_TAG}"; stage: build tags: - - build + - ${TAG} variables: DOCKERFILE: Dockerfile DOCKER_BUILD_ARGS: | BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 IMAGE_TAG: ${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA} + REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE} + TAG: build #### # Java Templates @@ -155,27 +147,50 @@ default: # Stage: build #### -Build Image Haz: +CHS Registry: extends: - .docker-build + parallel: + matrix: + - + CI_PROJECT_NAME: nshmp-haz + DOCKERFILE: Dockerfile + REGISTRY_IMAGE: ${CODE_REGISTRY_IMAGE} + TAG: build + - + CI_PROJECT_NAME: nshmp-haz-ws + DOCKERFILE: Dockerfile + REGISTRY_IMAGE: ${CODE_REGISTRY_IMAGE} + TAG: build variables: - CI_PROJECT_NAME: nshmp-haz DOCKER_BUILD_ARGS: | BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} UPSTREAM_PATH: ghsc/nshmp/nshmp-haz -Build Image WS: +Container Registry: + before_script: + - docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} extends: - .docker-build + parallel: + matrix: + - + CI_PROJECT_NAME: nshmp-haz + DOCKERFILE: Dockerfile + REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE} + TAG: nshmp + - + CI_PROJECT_NAME: nshmp-haz-ws + DOCKERFILE: Dockerfile + REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE} + TAG: nshmp variables: - CI_PROJECT_NAME: nshmp-haz-ws DOCKER_BUILD_ARGS: | BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_JOB_TOKEN=${CI_JOB_TOKEN} - DOCKERFILE: ws.Dockerfile UPSTREAM_PATH: ghsc/nshmp/nshmp-haz Build Project: -- GitLab From 2b3f78ec120f8355341284045d6d5d2cecd8197f Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 15:00:54 -0600 Subject: [PATCH 32/33] fix needs --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae17a83f4..98f9e8c19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -232,7 +232,7 @@ Unit Tests: Trigger nshmp-haz-ws CDK: needs: - - Build Image WS + - CHS Registry rules: - <<: *development-env -- GitLab From 89f55161521fe02490af5c3a38b8c98e255f9256 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 14 Apr 2022 15:01:57 -0600 Subject: [PATCH 33/33] change dockerfile path --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98f9e8c19..9c76c4088 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -159,7 +159,7 @@ CHS Registry: TAG: build - CI_PROJECT_NAME: nshmp-haz-ws - DOCKERFILE: Dockerfile + DOCKERFILE: ws.Dockerfile REGISTRY_IMAGE: ${CODE_REGISTRY_IMAGE} TAG: build variables: @@ -183,7 +183,7 @@ Container Registry: TAG: nshmp - CI_PROJECT_NAME: nshmp-haz-ws - DOCKERFILE: Dockerfile + DOCKERFILE: ws.Dockerfile REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE} TAG: nshmp variables: -- GitLab