K8s安装Tekton:
kubectl apply --filename https://storage.googleapis.com/tekton-releases/latest/release.yaml
K8s安装ArgoCD:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Helm安装GitLab:
helm repo add gitlab https://charts.gitlab.io/
helm install gitlab gitlab/gitlab --timeout 600s --set global.edition=ce
# task-build.yaml样例
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: build
spec:
workspaces:
- name: go-repo
mountPath: /workspace/repo
steps:
- name: build
image: golang:1.14.2-alpine3.11
workingDir: /workspace/repo
script: |
go build -v -o demo-app
env:
- name: GOPROXY
value: https://goproxy.cn
- name: GOOS
value: linux
- name: GOARCH
value: amd64