mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-05-17 03:53:10 +00:00
@@ -72,7 +72,7 @@ spec:
|
|||||||
name: kaniko
|
name: kaniko
|
||||||
params:
|
params:
|
||||||
- name: IMAGE
|
- name: IMAGE
|
||||||
value: registry.int.xeserv.us/xeiaso.net/site/ci:$(params.branch)
|
value: registry.int.xeserv.us/xeiaso.net/site/ci:$(tasks.clone-repo.results.version)
|
||||||
- name: DOCKERFILE
|
- name: DOCKERFILE
|
||||||
value: ./test/ssh-ci/Dockerfile
|
value: ./test/ssh-ci/Dockerfile
|
||||||
- name: EXTRA_ARGS
|
- name: EXTRA_ARGS
|
||||||
@@ -87,6 +87,24 @@ spec:
|
|||||||
"--snapshot-mode=redo",
|
"--snapshot-mode=redo",
|
||||||
"--use-new-run",
|
"--use-new-run",
|
||||||
]
|
]
|
||||||
|
- name: provision-test-cluster
|
||||||
|
runAfter: ["docker-build-ci"]
|
||||||
|
taskSpec:
|
||||||
|
workspaces:
|
||||||
|
- name: repo
|
||||||
|
mountPath: /src
|
||||||
|
results:
|
||||||
|
- name: cluster-name
|
||||||
|
description: "k3k cluster name object in k8s"
|
||||||
|
steps:
|
||||||
|
- name: create-cluster
|
||||||
|
image: $(tasks.docker-build-ci.results.IMAGE_URL)@$(tasks.docker-build-ci.results.IMAGE_DIGEST)
|
||||||
|
workingDir: $(workspaces.repo.path)/repo
|
||||||
|
script: |
|
||||||
|
CLUSTER_NAME=`kubectl create -f test/k3k/test-cluster.yaml -ojson | jq -r '.metadata.name'`
|
||||||
|
echo -n "${CLUSTER_NAME}" | tee "$(results.cluster-name.path)"
|
||||||
|
kubectl wait --for=condition-Ready clusters.k3k.io/"${CLUSTER_NAME}" -n ci --timout 5m
|
||||||
|
kubectl wait --for=create "secret/k3k-${CLUSTER_NAME}-kubeconfig" -n ci --timeout 5m
|
||||||
- name: go-test
|
- name: go-test
|
||||||
runAfter: ["docker-build-ci"]
|
runAfter: ["docker-build-ci"]
|
||||||
taskSpec:
|
taskSpec:
|
||||||
@@ -96,7 +114,7 @@ spec:
|
|||||||
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)
|
||||||
workingDir: $(workspaces.source.path)/repo
|
workingDir: $(workspaces.repo.path)/repo
|
||||||
script: |
|
script: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run test
|
npm run test
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: k3k.io/v1beta1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
generateName: anubis-test-
|
||||||
|
namespace: ci
|
||||||
@@ -11,5 +11,5 @@ RUN CGO_ENABLED=0 go install golang.org/dl/go1.23.6@latest \
|
|||||||
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
|
||||||
|
|
||||||
RUN apk add -U nodejs git build-base git npm bash zstd brotli gzip \
|
RUN apk add -U nodejs git build-base git npm bash zstd brotli gzip jq kubectl \
|
||||||
&& go download
|
&& go download
|
||||||
Reference in New Issue
Block a user