Skip to content
Snippets Groups Projects
Commit 5cf95250 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'maven' into 'master'

update get of nshmp-lib

See merge request ghsc/nshmp/nshmp-netcdf!42
parents e58df7a9 e3b2f5e9
No related branches found
No related tags found
1 merge request!42update get of nshmp-lib
Pipeline #28280 passed
...@@ -34,16 +34,18 @@ repositories { ...@@ -34,16 +34,18 @@ repositories {
maven { maven {
url "https://code.usgs.gov/api/v4/groups/160/-/packages/maven" url "https://code.usgs.gov/api/v4/groups/160/-/packages/maven"
name "GitLab" name "GitLab"
if (System.getenv("CI_JOB_TOKEN") != 'null') { if (System.getenv("CI_JOB_TOKEN") && System.getenv("CI_JOB_TOKEN") != "null") {
credentials(HttpHeaderCredentials) { credentials(HttpHeaderCredentials) {
name = 'Job-Token' name = "Job-Token"
value = System.getenv("CI_JOB_TOKEN") value = System.getenv("CI_JOB_TOKEN")
} }
} else { } else if (System.getenv("GITLAB_TOKEN") && System.getenv("GITLAB_TOKEN") != "null") {
credentials(HttpHeaderCredentials) { credentials(HttpHeaderCredentials) {
name = 'Private-Token' name = "Private-Token"
value = System.getenv("GITLAB_TOKEN") value = System.getenv("GITLAB_TOKEN")
} }
} else {
throw new GradleException("CI_JOB_TOKEN or GITLAB_TOKEN environmental variable must be set")
} }
authentication { authentication {
header(HttpHeaderAuthentication) header(HttpHeaderAuthentication)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment