build-ci-image.yml 678 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. platform: linux
  3. image_resource:
  4. type: registry-image
  5. source:
  6. username: ((docker-hub-username))
  7. password: ((docker-hub-password))
  8. repository: concourse/oci-build-task
  9. tag: '0.11.0'
  10. inputs:
  11. - name: ci-images-git-repo
  12. outputs:
  13. - name: image
  14. caches:
  15. - path: ci-image-cache
  16. params:
  17. DEBUG: true
  18. CONTEXT: ci-images-git-repo/ci/images
  19. DOCKERFILE: ci-images-git-repo/ci/images/((ci-image-name))/Dockerfile
  20. DOCKER_HUB_AUTH: ((docker-hub-auth))
  21. run:
  22. path: /bin/sh
  23. args:
  24. - "-c"
  25. - |
  26. mkdir -p /root/.docker
  27. cat > /root/.docker/config.json <<EOF
  28. { "auths": { "https://index.docker.io/v1/": { "auth": "$DOCKER_HUB_AUTH" }}}
  29. EOF
  30. build