From 6b1006f230f5dcdbc618a88f7bd44b97ef6a2d89 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 19 May 2022 10:15:47 -0600 Subject: [PATCH] Remove gradle dependency auth --- Dockerfile | 4 +--- gradle/repositories.gradle | 20 ++------------------ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70a507a..f8fb4c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,7 @@ ARG FROM_IMAGE=usgs/amazoncorretto:11 FROM ${BUILD_IMAGE} as builder -# TODO: Token needed until nshmp-lib is public -ARG GITLAB_TOKEN=null -ARG CI_JOB_TOKEN=null +# For GitLab CI/CD ARG CI_PROJECT_URL=null ARG CI_COMMIT_BRANCH=null diff --git a/gradle/repositories.gradle b/gradle/repositories.gradle index 0951981..27f42af 100644 --- a/gradle/repositories.gradle +++ b/gradle/repositories.gradle @@ -7,23 +7,7 @@ repositories { } 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