feat: add dind-go and unify pipeline

This commit is contained in:
Peter 2023-02-17 18:06:31 +01:00
parent c718934efe
commit c9f4584250
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
4 changed files with 36 additions and 29 deletions

View file

@ -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
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

View file

@ -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}"

View file

@ -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/

11
dind-go/Dockerfile Normal file
View file

@ -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