Skip to content

Commit

Permalink
Setup docker config.json on CI when building project
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Apr 18, 2023
1 parent caaef89 commit cb56035
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ anchors:
DOCKER_HUB_MIRROR: ((docker-hub-mirror))
DOCKER_HUB_USERNAME: ((docker-hub-username))
DOCKER_HUB_PASSWORD: ((docker-hub-password))
DOCKER_HUB_AUTH: ((docker-hub-auth))
github-task-params: &github-task-params
GITHUB_REPO: spring-boot
GITHUB_ORGANIZATION: spring-projects
Expand Down
14 changes: 9 additions & 5 deletions ci/tasks/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ params:
run:
path: bash
args:
- -ec
- |
source /docker-lib.sh
start_docker $DOCKER_HUB_MIRROR
${PWD}/git-repo/ci/scripts/build-project.sh
- "-ec"
- |
mkdir -p /root/.docker
cat > /root/.docker/config.json <<EOF
{ "auths": { "https://index.docker.io/v1/": { "auth": "$DOCKER_HUB_AUTH" }}}
EOF
source /docker-lib.sh
start_docker $DOCKER_HUB_MIRROR
${PWD}/git-repo/ci/scripts/build-project.sh

0 comments on commit cb56035

Please sign in to comment.