diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 0fe146415f..1c3835e35f 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -12,6 +12,9 @@ anchors: GRADLE_ENTERPRISE_ACCESS_KEY: ((gradle_enterprise_secret_access_key)) GRADLE_ENTERPRISE_CACHE_USERNAME: ((gradle_enterprise_cache_user.username)) GRADLE_ENTERPRISE_CACHE_PASSWORD: ((gradle_enterprise_cache_user.password)) + docker-hub-task-params: &docker-hub-task-params + DOCKER_HUB_USERNAME: ((docker-hub-username)) + DOCKER_HUB_PASSWORD: ((docker-hub-password)) github-task-params: &github-task-params GITHUB_REPO: spring-boot GITHUB_ORGANIZATION: spring-projects @@ -37,6 +40,7 @@ anchors: params: BRANCH: ((branch)) <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params artifactory-repo-put-params: &artifactory-repo-put-params repo: libs-snapshot-local folder: distribution-repository @@ -415,6 +419,7 @@ jobs: params: RELEASE_TYPE: M <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params - put: artifactory-repo params: <<: *artifactory-repo-put-params @@ -434,6 +439,7 @@ jobs: params: RELEASE_TYPE: RC <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params - put: artifactory-repo params: <<: *artifactory-repo-put-params @@ -453,6 +459,7 @@ jobs: params: RELEASE_TYPE: RELEASE <<: *gradle-enterprise-task-params + <<: *docker-hub-task-params - put: artifactory-repo params: <<: *artifactory-repo-put-params diff --git a/ci/scripts/common.sh b/ci/scripts/common.sh index 0c0f901c50..ca7724f35d 100644 --- a/ci/scripts/common.sh +++ b/ci/scripts/common.sh @@ -5,4 +5,8 @@ if [[ -d $PWD/embedmongo && ! -d $HOME/.embedmongo ]]; then ln -s "$PWD/embedmongo" "$HOME/.embedmongo" fi +if [[ -n $DOCKER_HUB_USERNAME ]]; then + docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD +fi + cleanup_maven_repo "org.springframework.boot"