feat: upgrade CI image to Go 1.20

This commit is contained in:
Peter 2023-02-07 20:47:29 +01:00
parent eddfb2b65b
commit 21d1a57527
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
2 changed files with 2 additions and 82 deletions

View file

@ -1,80 +0,0 @@
version: v0
runs:
- name: Build
tasks:
- name: Checkout code
runtime:
type: pod
containers:
- image: docker.io/alpine/git
steps:
- clone:
recurse_submodules: true
- save_to_workspace:
contents:
- source_dir: .
dest_dir: .
paths:
- '**'
- name: Build Go CI image
runtime:
containers:
- image: gcr.io/kaniko-project/executor:debug
environment:
DOCKERAUTH:
from_variable: dockerauth
shell: /busybox/sh
steps:
- restore_workspace:
dest_dir: .
- run:
name: generate docker config
command: |
cat << EOF > /kaniko/.docker/config.json
{
"auths": {
"https://code.icb4dc0.de": { "auth" : "$DOCKERAUTH" }
}
}
EOF
- run:
name: Build and push image
command: |
/kaniko/executor \
--destination code.icb4dc0.de/inetmock/ci-images/go-ci:latest \
--context dir:///root/project/ \
--dockerfile /root/project/go-ci/Dockerfile
depends:
- Checkout code
- name: Build mdbook image
runtime:
containers:
- image: gcr.io/kaniko-project/executor:debug
environment:
DOCKERAUTH:
from_variable: dockerauth
shell: /busybox/sh
steps:
- restore_workspace:
dest_dir: .
- run:
name: generate docker config
command: |
cat << EOF > /kaniko/.docker/config.json
{
"auths": {
"https://code.icb4dc0.de": { "auth" : "$DOCKERAUTH" }
}
}
EOF
- run:
name: Build and push image
command: |
/kaniko/executor \
--destination code.icb4dc0.de/inetmock/ci-images/mdbook:latest \
--context dir:///root/project/ \
--dockerfile /root/project/mdbook/Dockerfile
depends:
- Checkout code

View file

@ -1,4 +1,4 @@
FROM docker.io/golang:1.19-bullseye as tools
FROM docker.io/golang:1.20-bullseye as tools
RUN go install github.com/golang/mock/mockgen@latest && \
go install github.com/Helcaraxan/gomod@latest && \
@ -25,7 +25,7 @@ RUN apt-get update && \
ln -s /usr/bin/llc-14 /usr/bin/llc
# Install Go
RUN curl -L https://go.dev/dl/go1.19.2.linux-amd64.tar.gz | tar -xvz -C /usr/local
RUN curl -L https://go.dev/dl/go1.20.linux-amd64.tar.gz | tar -xvz -C /usr/local
ENV PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
GOPATH=/go