diff --git a/.concourse/pipeline.yml b/.concourse/pipeline.yml index 96e0fb3..830bff3 100644 --- a/.concourse/pipeline.yml +++ b/.concourse/pipeline.yml @@ -30,9 +30,12 @@ jobs: - get: caddy-release trigger: true - task: caddy - file: ci-images.git/.concourse/tasks/caddy.yml + file: ci-images.git/.concourse/tasks/image-build.yml input_mapping: repo: ci-images.git + vars: + build_context: caddy/ + image_repo: code.icb4dc0.de/prskr/ci-images/caddy - name: ko plan: @@ -41,6 +44,21 @@ jobs: - get: ko-release trigger: true - task: ko - file: ci-images.git/.concourse/tasks/ko.yml + file: ci-images.git/.concourse/tasks/image-build.yml input_mapping: - repo: ci-images.git \ No newline at end of file + repo: ci-images.git + vars: + build_context: ko/ + image_repo: code.icb4dc0.de/prskr/ci-images/ko + + - name: dind-go + plan: + - get: ci-images.git + trigger: true + - task: dind-go + file: ci-images.git/.concourse/tasks/image-build.yml + input_mapping: + repo: ci-images.git + vars: + build_context: dind-go/ + image_repo: code.icb4dc0.de/prskr/ci-images/dind-go diff --git a/.concourse/tasks/caddy.yml b/.concourse/tasks/image-build.yml similarity index 72% rename from .concourse/tasks/caddy.yml rename to .concourse/tasks/image-build.yml index 069a904..019263d 100644 --- a/.concourse/tasks/caddy.yml +++ b/.concourse/tasks/image-build.yml @@ -14,6 +14,9 @@ inputs: params: GITEA_USER: ((gitea-credentials.user)) GITEA_TOKEN: ((gitea-credentials.token)) + BUILD_CONTEXT: ((build_context)) + IMAGE_REPO: ((image_repo)) + IMAGE_TAG: latest run: path: sh @@ -22,4 +25,4 @@ run: - | echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json - /kaniko/executor --destination code.icb4dc0.de/prskr/ci-images/caddy:latest --context caddy/ + /kaniko/executor --destination "${IMAGE_REPO}:${IMAGE_TAG}" --context "${BUILD_CONTEXT}" diff --git a/.concourse/tasks/ko.yml b/.concourse/tasks/ko.yml deleted file mode 100644 index 10cdcc5..0000000 --- a/.concourse/tasks/ko.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -platform: linux - -image_resource: - type: registry-image - source: - repository: gcr.io/kaniko-project/executor - tag: debug - -inputs: - - name: repo - path: . - -params: - GITEA_USER: ((gitea-credentials.user)) - GITEA_TOKEN: ((gitea-credentials.token)) - -run: - path: sh - args: - - -cex - - | - echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json - - /kaniko/executor --destination code.icb4dc0.de/prskr/ci-images/ko:latest --context ko/ diff --git a/dind-go/Dockerfile b/dind-go/Dockerfile new file mode 100644 index 0000000..7dd607c --- /dev/null +++ b/dind-go/Dockerfile @@ -0,0 +1,11 @@ +FROM docker.io/golang:alpine + +# Install Docker and Docker Compose +RUN apk --no-cache add \ + bash \ + curl \ + docker \ + make \ + gcc \ + libc-dev \ + git \ No newline at end of file