chore: migrate CI images from GitLab
All checks were successful
agola/ci-images/Build The run finished successfully
All checks were successful
agola/ci-images/Build The run finished successfully
This commit is contained in:
parent
1d7c381ac4
commit
401ce7c4c3
4 changed files with 140 additions and 0 deletions
80
.agola/config.yml
Normal file
80
.agola/config.yml
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
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
|
46
go-ci/Dockerfile
Normal file
46
go-ci/Dockerfile
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
FROM docker.io/golang:1.19-alpine
|
||||||
|
|
||||||
|
# install basic dependencies
|
||||||
|
RUN apk add -U --no-cache \
|
||||||
|
docker \
|
||||||
|
protobuf-dev \
|
||||||
|
findutils \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
ca-certificates \
|
||||||
|
graphviz \
|
||||||
|
gcc \
|
||||||
|
musl-dev \
|
||||||
|
curl \
|
||||||
|
jq \
|
||||||
|
libbpf \
|
||||||
|
libbpf-dev \
|
||||||
|
clang \
|
||||||
|
llvm12 \
|
||||||
|
elfutils \
|
||||||
|
linux-headers
|
||||||
|
|
||||||
|
# Install GoReleaser
|
||||||
|
RUN export GORELEASER_VERSION=$(curl https://api.github.com/repos/goreleaser/goreleaser/releases | jq -r '. | first |.tag_name | capture("(?<version>[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)") | .version') && \
|
||||||
|
curl -Lo /tmp/goreleaser.apk "https://github.com/goreleaser/goreleaser/releases/latest/download/goreleaser_${GORELEASER_VERSION}_x86_64.apk" && \
|
||||||
|
apk add --allow-untrusted /tmp/goreleaser.apk && \
|
||||||
|
rm -f /tmp/*.apk && \
|
||||||
|
goreleaser --version
|
||||||
|
|
||||||
|
# Install go tools
|
||||||
|
RUN go install github.com/golang/mock/mockgen@latest \
|
||||||
|
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \
|
||||||
|
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \
|
||||||
|
&& go install github.com/Helcaraxan/gomod@latest \
|
||||||
|
&& go install gotest.tools/gotestsum@latest \
|
||||||
|
&& go install golang.org/x/tools/cmd/goimports@latest \
|
||||||
|
&& go install mvdan.cc/gofumpt@latest \
|
||||||
|
&& go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest \
|
||||||
|
&& curl -L https://github.com/go-task/task/releases/latest/download/task_linux_amd64.tar.gz | tar -xvz -C /usr/local/bin task \
|
||||||
|
&& export BUF_VERSION=$(curl https://api.github.com/repos/bufbuild/buf/releases | jq -r '. | first |.tag_name') && \
|
||||||
|
curl -Lo /usr/bin/buf "https://github.com/bufbuild/buf/releases/download/${BUF_VERSION}/buf-Linux-x86_64" \
|
||||||
|
&& chmod +x /usr/bin/buf \
|
||||||
|
&& go version \
|
||||||
|
&& golangci-lint --version \
|
||||||
|
&& task --version \
|
||||||
|
&& buf --version
|
8
mdbook/Dockerfile
Normal file
8
mdbook/Dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
ARG MDBOOK_VERSION=0.4.21
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y wget && \
|
||||||
|
apt clean all -y && \
|
||||||
|
wget -qO- "https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz" | tar -xz -C /usr/bin/
|
6
renovate.json
Normal file
6
renovate.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue