From a887df33bb6d92d6fa42bd97e00f131a195aeaf9 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Thu, 28 Apr 2022 09:27:43 -0600 Subject: [PATCH 1/8] updated lib --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 8bd1b10..9f13ebe 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ micronautPluginVersion = 3.1.1 nodePluginVersion = 3.0.1 nodeVersion = 16.3.0 nshmFaultSectionsTag = v0.1 -nshmpLibVersion = 1.0.6 +nshmpLibVersion = 1.1.0 nshmpWsUtilsVersion = 0.3.7 shadowVersion = 7.1.2 spotbugsVersion = 4.7.0 -- GitLab From e8f37d30aa920df4896067ee1190d26ae59e59fa Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 5 May 2022 14:00:43 -0600 Subject: [PATCH 2/8] fix links --- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index aaf77a3..ce3bee9 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -3,4 +3,4 @@ All contributions to and interactions surrounding this project will abide by the [USGS Code of Scientific Conduct][1]. -[1]: https://www.usgs.gov/about/organization/science-support/office-science-quality-and-integrity/code-scientific-conduct +[1]: https://www.usgs.gov/office-of-science-quality-and-integrity/fundamental-science-practices diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6464ce0..8ba000b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ Contributions are welcome from the community. Questions can be asked on the [issues page][1]. Before creating a new issue, please take a moment to search and make sure a similar issue does not already exist. If one does exist, you -can comment (most simply even with just a :+1: ) to show your support for that +can comment (most simply even with just a :+1:) to show your support for that issue. If you have direct contributions you would like considered for incorporation @@ -11,5 +11,5 @@ into the project you can [fork this repository][2] and [submit a merge request][3] for review. [1]: https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/issues -[2]: https://docs.gitlab.com/ee/gitlab-basics/fork-project.html -[3]: https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html +[2]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#creating-a-fork +[3]: https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html -- GitLab From 23ea3c99d3d4865f22295e10d13a5d624550afed Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Fri, 6 May 2022 09:27:37 -0600 Subject: [PATCH 3/8] fix disclaimer --- DISCLAIMER.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/DISCLAIMER.md b/DISCLAIMER.md index ec593eb..fb9a972 100644 --- a/DISCLAIMER.md +++ b/DISCLAIMER.md @@ -1,11 +1,10 @@ # Disclaimer -This software has been approved for release by the U.S. Geological Survey -(USGS). Although the software has been subjected to rigorous review, the USGS -reserves the right to update the software as needed pursuant to further analysis -and review. No warranty, expressed or implied, is made by the USGS or the U.S. -Government as to the functionality of the software and related material nor -shall the fact of release constitute any such warranty. Furthermore, the -software is released on condition that neither the USGS nor the U.S. Government -shall be held liable for any damages resulting from its authorized or -unauthorized use. +This software is preliminary or provisional and is subject to revision. It is +being provided to meet the need for timely best science. The software has not +received final approval by the U.S. Geological Survey (USGS). No warranty, +expressed or implied, is made by the USGS or the U.S. Government as to the +functionality of the software and related material nor shall the fact of release +constitute any such warranty. The software is provided on the condition that +neither the USGS nor the U.S. Government shall be held liable for any damages +resulting from the authorized or unauthorized use of the software. -- GitLab From cfc123190f1ef8fae3dd2ec69faa1e4b5d493940 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Mon, 9 May 2022 08:43:21 -0600 Subject: [PATCH 4/8] updated lib with nga-east updates --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 9f13ebe..7e42659 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ micronautPluginVersion = 3.1.1 nodePluginVersion = 3.0.1 nodeVersion = 16.3.0 nshmFaultSectionsTag = v0.1 -nshmpLibVersion = 1.1.0 +nshmpLibVersion = 1.1.1 nshmpWsUtilsVersion = 0.3.7 shadowVersion = 7.1.2 spotbugsVersion = 4.7.0 -- GitLab From 8e55d1e445790453ad5abc0b685ba395a5674cdd Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Tue, 10 May 2022 13:53:37 -0600 Subject: [PATCH 5/8] fix code.json --- code.json | 65 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 8 deletions(-) diff --git a/code.json b/code.json index c03a8fe..932d1fa 100644 --- a/code.json +++ b/code.json @@ -3,9 +3,8 @@ "name": "nshmp-ws", "organization": "U.S. Geological Survey", "description": "Web services for the National Seismic Hazard Mapping Project (NSHMP)", - "version": "1.0.0", - "status": "Production", - "doi": "doi:###TBD###", + "version": "main", + "status": "Development", "permissions": { "usageType": "openSource", @@ -17,9 +16,9 @@ ] }, - "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws", + "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git", "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws", - "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/releases/tag/1.0.0", + "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/archive/main/nshmp-ws.zip", "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/main/DISCLAIMER.md", "vcs": "git", @@ -39,8 +38,58 @@ "earthquake-source", "hazard-curve", "disaggregation", - "deaggregation", - "doi|###TBD###" + "deaggregation" + ], + + "contact": { + "name": "Brandon Clayton", + "email": "bclayton@usgs.gov" + }, + + "date": { + "metadataLastUpdated": "2022-05-10" + } + }, + { + "name": "nshmp-ws", + "organization": "U.S. Geological Survey", + "description": "Web services for the National Seismic Hazard Mapping Project (NSHMP)", + "version": "0.2.0", + "status": "Production", + + "permissions": { + "usageType": "openSource", + "licenses": [ + { + "name": "Public Domain, CC0-1.0", + "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/main/LICENSE.md" + } + ] + }, + + "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git", + "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws", + "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/archive/0.2.0/nshmp-ws-0.2.0.zip", + "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/0.2.0/DISCLAIMER.md", + "vcs": "git", + + "laborHours": 600, + + "languages": [ "Java" ], + + "tags": [ + "Earthquake Hazards", + "Geologic Hazards Science Center", + "web services", + "psha", + "nshmp-haz", + "seismic-hazard", + "seismic-source", + "earthquake-hazard", + "earthquake-source", + "hazard-curve", + "disaggregation", + "deaggregation" ], "contact": { @@ -49,7 +98,7 @@ }, "date": { - "metadataLastUpdated": "2021-08-02" + "metadataLastUpdated": "2022-05-10" } } ] -- GitLab From 2e4622a9c21acab7dc3e6f14a99c68526ab1321d Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Tue, 10 May 2022 13:55:39 -0600 Subject: [PATCH 6/8] fix url --- code.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code.json b/code.json index 932d1fa..ee1c146 100644 --- a/code.json +++ b/code.json @@ -62,7 +62,7 @@ "licenses": [ { "name": "Public Domain, CC0-1.0", - "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/main/LICENSE.md" + "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/raw/0.2.0/LICENSE.md" } ] }, @@ -70,7 +70,7 @@ "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git", "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws", "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/archive/0.2.0/nshmp-ws-0.2.0.zip", - "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/0.2.0/DISCLAIMER.md", + "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/raw/0.2.0/DISCLAIMER.md", "vcs": "git", "laborHours": 600, -- GitLab From 03fc74af7de4009867928ccb65e35b0d13022792 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Mon, 16 May 2022 12:53:21 -0600 Subject: [PATCH 7/8] fix links --- code.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code.json b/code.json index ee1c146..d5de462 100644 --- a/code.json +++ b/code.json @@ -11,15 +11,15 @@ "licenses": [ { "name": "Public Domain, CC0-1.0", - "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/main/LICENSE.md" + "URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/raw/main/LICENSE.md" } ] }, "repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git", "homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws", - "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/archive/main/nshmp-ws.zip", - "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/blob/main/DISCLAIMER.md", + "downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/archive/main/nshmp-ws-main.zip", + "disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-ws/-/raw/main/DISCLAIMER.md", "vcs": "git", "laborHours": 600, -- GitLab From 0f9270dde5cb859203b0de1a03d6e11dfe16ac85 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 19 May 2022 11:45:13 -0600 Subject: [PATCH 8/8] Remove gitlab token references --- .gitlab-ci.yml | 1 - Dockerfile | 8 +++---- README.md | 11 +-------- gradle/repositories.gradle | 46 ++------------------------------------ 4 files changed, 6 insertions(+), 60 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de2734f..b291605 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -152,7 +152,6 @@ Build Image: DOCKER_BUILD_ARGS: | BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH} - CI_JOB_TOKEN=${CI_JOB_TOKEN} CI_PROJECT_URL=${CI_PROJECT_URL} FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11 UPSTREAM_PATH: ghsc/nshmp/nshmp-ws diff --git a/Dockerfile b/Dockerfile index b7b5af9..3946d4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,7 @@ # docker run -p <PORT>:8080 code.chs.usgs.gov:5001/ghsc/nshmp/nshmp-ws:latest # # Build locally: -# docker build -# --build-arg gitlab_token=<git-api-token> -# -t nshmp-ws . +# docker build -t nshmp-ws . #### ARG BUILD_IMAGE=usgs/amazoncorretto:11 @@ -22,10 +20,10 @@ ARG jar_file=${libs_dir}/${project}.jar FROM ${BUILD_IMAGE} as builder ARG builder_workdir -ARG GITLAB_TOKEN=null -ARG CI_JOB_TOKEN=null ARG jar_file ARG libs_dir + +# For GitLab CI/CD ARG CI_PROJECT_URL=null ARG CI_COMMIT_BRANCH=null diff --git a/README.md b/README.md index 859dee5..7d6cd23 100644 --- a/README.md +++ b/README.md @@ -78,18 +78,9 @@ The `PORT` should be replaced with the same value to start the container. A Docker image can also be created locally: ```bash -docker build \ - --build-arg git_username=<GitLab Email> \ - --build-ard git_password=<GitLab Access Token> \ - -t <tag name> . +docker build -t <tag name> . ``` -Where: - -* `git_username` is the GitLab Email -* `git_password` is a [GitLab access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token) -with at minimum read access. - ## Fault Sections Service ### Fault Sections Service: Usage diff --git a/gradle/repositories.gradle b/gradle/repositories.gradle index 6607868..394c441 100644 --- a/gradle/repositories.gradle +++ b/gradle/repositories.gradle @@ -1,50 +1,8 @@ - -publishing { - publications { - library(MavenPublication) { - groupId = "ghsc" - version = project.getProperty("version") - version = version == "unspecified" ? "latest" : version - from components.java - } - } - - repositories { - maven { - url "https://code.usgs.gov/api/v4/projects/2638/packages/maven" - name = "GitLab" - credentials(HttpHeaderCredentials) { - name = "Job-Token" - value = System.getenv("CI_JOB_TOKEN") - } - authentication { - header(HttpHeaderAuthentication) - } - } - } -} - repositories { mavenCentral() maven { - url "https://code.usgs.gov/api/v4/groups/160/-/packages/maven" - name "GitLab" - if (System.getenv("CI_JOB_TOKEN") && System.getenv("CI_JOB_TOKEN") != "null") { - credentials(HttpHeaderCredentials) { - name = "Job-Token" - value = System.getenv("CI_JOB_TOKEN") - } - } else if (System.getenv("GITLAB_TOKEN") && System.getenv("GITLAB_TOKEN") != "null") { - credentials(HttpHeaderCredentials) { - name = "Private-Token" - value = System.getenv("GITLAB_TOKEN") - } - } else { - throw new GradleException("CI_JOB_TOKEN or GITLAB_TOKEN environmental variable must be set") - } - authentication { - header(HttpHeaderAuthentication) - } + url "https://code.usgs.gov/api/v4/groups/1352/-/packages/maven" + name "NSHMP GitLab Group" } } -- GitLab