From: Jessica Wagantall Date: Thu, 29 Jun 2023 20:58:50 +0000 (-0700) Subject: Fix: Run docker login for gradle build jobs X-Git-Tag: v0.88.2^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F71885%2F4;p=releng%2Fglobal-jjb.git Fix: Run docker login for gradle build jobs Issue: RELENG-4763 Signed-off-by: Jessica Wagantall Change-Id: I24aa3a8a8982a048d760d3012b9645e2689e8996 --- diff --git a/.jjb-test/lf-gradle-jobs.yaml b/.jjb-test/lf-gradle-jobs.yaml index cba15901..4b375dee 100644 --- a/.jjb-test/lf-gradle-jobs.yaml +++ b/.jjb-test/lf-gradle-jobs.yaml @@ -5,6 +5,7 @@ - gerrit-gradle-build project-name: gerrit-gradle + mvn-settings: gerrit-maven-project-settings - project: name: github-gradle-jobs @@ -13,6 +14,7 @@ github-org: fake-org project-name: github-gradle + mvn-settings: gerrit-maven-project-settings - project: name: gradle-jobs-view @@ -20,3 +22,4 @@ - project-view project-name: gradle + mvn-settings: gerrit-maven-project-settings diff --git a/docs/jjb/lf-gradle-jobs.rst b/docs/jjb/lf-gradle-jobs.rst index 3bc0c344..354edb9f 100644 --- a/docs/jjb/lf-gradle-jobs.rst +++ b/docs/jjb/lf-gradle-jobs.rst @@ -20,6 +20,7 @@ Runs a gradle build command to perform the verification. :build-node: The node to run build on. :java-version: Version of Java to execute Maven build. (default: openjdk17) :jenkins-ssh-credential: Credential to use for SSH. (Generally configured in defaults.yaml) + :mvn-settings: Maven settings.xml file containing credentials to use. :Optional parameters: diff --git a/jjb/lf-gradle-jobs.yaml b/jjb/lf-gradle-jobs.yaml index cd4f4d66..4db41f28 100644 --- a/jjb/lf-gradle-jobs.yaml +++ b/jjb/lf-gradle-jobs.yaml @@ -80,6 +80,9 @@ - lf-infra-pre-build - lf-update-java-alternatives: java-version: "{java-version}" + - lf-infra-docker-login: + global-settings-file: "global-settings" + settings-file: "{mvn-settings}" - shell: | ./gradlew build @@ -113,6 +116,12 @@ <<: *lf_gradle_common builders: + - lf-infra-pre-build + - lf-update-java-alternatives: + java-version: "{java-version}" + - lf-infra-docker-login: + global-settings-file: "global-settings" + settings-file: "{mvn-settings}" - shell: | ./gradlew build diff --git a/releasenotes/notes/gradle-jobs-docker-login-bc3ad0a3d42d19a7.yaml b/releasenotes/notes/gradle-jobs-docker-login-bc3ad0a3d42d19a7.yaml new file mode 100644 index 00000000..f65c4a10 --- /dev/null +++ b/releasenotes/notes/gradle-jobs-docker-login-bc3ad0a3d42d19a7.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Gradle build job needs to run docker login step to allow + docker operations and access to Nexus3.