mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-05-17 12:03:09 +00:00
@@ -30,13 +30,14 @@ spec:
|
|||||||
type: string
|
type: string
|
||||||
description: docker repo to store cache files
|
description: docker repo to store cache files
|
||||||
default: "registry.int.xeserv.us/techarohq/anubis/cache"
|
default: "registry.int.xeserv.us/techarohq/anubis/cache"
|
||||||
|
- name: go-version
|
||||||
|
type: string
|
||||||
|
description: "Go version to use"
|
||||||
|
default: "1.26.3"
|
||||||
workspaces:
|
workspaces:
|
||||||
- name: repo
|
- name: repo
|
||||||
description: |
|
description: |
|
||||||
Cloned repo files.
|
Cloned repo files.
|
||||||
- name: go-mod-cache
|
|
||||||
description: |
|
|
||||||
Go module cache
|
|
||||||
- name: dockerconfig-atcr
|
- name: dockerconfig-atcr
|
||||||
description: |
|
description: |
|
||||||
Docker config for pushing images to atcr
|
Docker config for pushing images to atcr
|
||||||
@@ -71,12 +72,13 @@ spec:
|
|||||||
name: kaniko
|
name: kaniko
|
||||||
params:
|
params:
|
||||||
- name: IMAGE
|
- name: IMAGE
|
||||||
value: registry.int.xeserv.us/xeiaso.net/site/ci:$(params.commit)
|
value: registry.int.xeserv.us/xeiaso.net/site/ci:$(params.branch)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: ./test/ssh-ci/Dockerfile
|
value: ./test/ssh-ci/Dockerfile
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
value:
|
value:
|
||||||
[
|
[
|
||||||
|
"--build-arg=GO_VERSION=$(params.go-version)",
|
||||||
"--cache",
|
"--cache",
|
||||||
"--cache-copy-layers",
|
"--cache-copy-layers",
|
||||||
"--cache-run-layers",
|
"--cache-run-layers",
|
||||||
@@ -91,8 +93,6 @@ spec:
|
|||||||
workspaces:
|
workspaces:
|
||||||
- name: repo
|
- name: repo
|
||||||
mountPath: /src
|
mountPath: /src
|
||||||
- name: go-mod-cache
|
|
||||||
mountPath: /go
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: $(tasks.docker-build-ci.results.IMAGE_URL)@$(tasks.docker-build-ci.results.IMAGE_DIGEST)
|
image: $(tasks.docker-build-ci.results.IMAGE_URL)@$(tasks.docker-build-ci.results.IMAGE_DIGEST)
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
ARG ALPINE_VERSION=3.22
|
ARG ALPINE_VERSION=3.22
|
||||||
ARG GO_VERSION=1.26.2
|
ARG GO_VERSION=1.26.3
|
||||||
|
|
||||||
# Go toolchain bootstrapper
|
# Go toolchain bootstrapper
|
||||||
FROM golang:${GO_VERSION} AS go
|
FROM golang:${GO_VERSION} AS go
|
||||||
|
|
||||||
RUN CGO_ENABLED=0 go install golang.org/dl/go${GO_VERSION}@latest \
|
RUN CGO_ENABLED=0 go install golang.org/dl/go1.23.6@latest \
|
||||||
&& mkdir -p /app/bin \
|
&& mkdir -p /app/bin \
|
||||||
&& mv /go/bin/go${GO_VERSION} /app/bin/go
|
&& mv /go/bin/go1.23.6 /app/bin/go
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION}
|
FROM alpine:${ALPINE_VERSION}
|
||||||
COPY --from=go /app/bin/go /usr/local/bin/go
|
COPY --from=go /app/bin/go /usr/local/bin/go
|
||||||
|
|||||||
Reference in New Issue
Block a user