Skip to content

Commit

Permalink
Align CI image generation mirrors with 2.6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Mar 9, 2022
1 parent e84e517 commit 429167e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 26 deletions.
8 changes: 2 additions & 6 deletions ci/images/docker-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,8 @@ start_docker() {

server_args="${server_args}"

for registry in $3; do
server_args="${server_args} --insecure-registry ${registry}"
done

if [ -n "$4" ]; then
server_args="${server_args} --registry-mirror $4"
if [ -n "$1" ]; then
server_args="${server_args} --registry-mirror https://$1"
fi

try_start() {
Expand Down
3 changes: 0 additions & 3 deletions ci/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ milestone: "2.5.x"
build-name: "spring-boot"
concourse-url: "https://ci.spring.io"
task-timeout: 2h00m
registry-mirror-host: docker.repo.spring.io
registry-mirror-username: ((artifactory-username))
registry-mirror-password: ((artifactory-password))
21 changes: 11 additions & 10 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ anchors:
file: git-repo/ci/tasks/build-project.yml
params:
BRANCH: ((branch))
DOCKER_HUB_MIRROR: ((docker-hub-mirror))
<<: *gradle-enterprise-task-params
<<: *docker-hub-task-params
artifactory-repo-put-params: &artifactory-repo-put-params
Expand Down Expand Up @@ -80,10 +81,10 @@ anchors:
gradle-publish-params: &gradle-publish-params
GRADLE_PUBLISH_KEY: ((gradle-publish-key))
GRADLE_PUBLISH_SECRET: ((gradle-publish-secret))
registry-mirror-vars: &registry-mirror-vars
registry-mirror-host: ((registry-mirror-host))
registry-mirror-username: ((registry-mirror-username))
registry-mirror-password: ((registry-mirror-password))
docker-hub-mirror-vars: &docker-hub-mirror-vars
docker-hub-mirror: ((docker-hub-mirror))
docker-hub-mirror-username: ((docker-hub-mirror-username))
docker-hub-mirror-password: ((docker-hub-mirror-password))
resource_types:
- name: artifactory-resource
type: registry-image
Expand Down Expand Up @@ -241,23 +242,23 @@ jobs:
image: ci-image
vars:
ci-image-name: ci-image
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk11
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
output_mapping:
image: ci-image-jdk11
vars:
ci-image-name: ci-image-jdk11
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- task: build-ci-image-jdk17
privileged: true
file: git-repo/ci/tasks/build-ci-image.yml
output_mapping:
image: ci-image-jdk17
vars:
ci-image-name: ci-image-jdk17
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- in_parallel:
- put: ci-image
params:
Expand Down Expand Up @@ -553,7 +554,7 @@ jobs:
GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- put: github-pre-release
params:
name: generated-changelog/tag
Expand Down Expand Up @@ -584,7 +585,7 @@ jobs:
GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- put: github-pre-release
params:
name: generated-changelog/tag
Expand Down Expand Up @@ -645,7 +646,7 @@ jobs:
GITHUB_USERNAME: ((github-username))
GITHUB_TOKEN: ((github-ci-release-token))
vars:
<<: *registry-mirror-vars
<<: *docker-hub-mirror-vars
- put: github-release
params:
name: generated-changelog/tag
Expand Down
7 changes: 4 additions & 3 deletions ci/tasks/build-ci-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ image_resource:
repository: concourse/oci-build-task
tag: 0.9.1
registry_mirror:
host: ((registry-mirror-host))
username: ((registry-mirror-username))
password: ((registry-mirror-password))
host: ((docker-hub-mirror))
username: ((docker-hub-mirror-username))
password: ((docker-hub-mirror-password))
inputs:
- name: ci-images-git-repo
outputs:
Expand All @@ -18,6 +18,7 @@ caches:
params:
CONTEXT: ci-images-git-repo/ci/images
DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile
REGISTRY_MIRRORS: ((docker-hub-mirror))
DOCKER_HUB_AUTH: ((docker-hub-auth))
run:
path: /bin/sh
Expand Down
3 changes: 2 additions & 1 deletion ci/tasks/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ params:
GRADLE_ENTERPRISE_CACHE_USERNAME:
GRADLE_ENTERPRISE_CACHE_PASSWORD:
GRADLE_ENTERPRISE_URL: https://ge.spring.io
DOCKER_HUB_MIRROR:
run:
path: bash
args:
- -ec
- |
source /docker-lib.sh
start_docker
start_docker $DOCKER_HUB_MIRROR
${PWD}/git-repo/ci/scripts/build-project.sh
6 changes: 3 additions & 3 deletions ci/tasks/generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ image_resource:
repository: springio/github-changelog-generator
tag: '0.0.7'
registry_mirror:
host: ((registry-mirror-host))
username: ((registry-mirror-username))
password: ((registry-mirror-password))
host: ((docker-hub-mirror))
username: ((docker-hub-mirror-username))
password: ((docker-hub-mirror-password))
inputs:
- name: git-repo
- name: artifactory-repo
Expand Down

0 comments on commit 429167e

Please sign in to comment.