debian-golang image
This commit is contained in:
9
_CI-CD/debian-golang/Dockerfile
Normal file
9
_CI-CD/debian-golang/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
FROM debian:stable-slim
|
||||||
|
|
||||||
|
RUN sed -i 's@deb.debian.org@apt-cache.lan/deb.debian.org@g' /etc/apt/sources.list && \
|
||||||
|
sed -i 's@security.debian.org@apt-cache.lan/security.debian.org@g' /etc/apt/sources.list && \
|
||||||
|
apt-get update && apt-get install -y \
|
||||||
|
golang make && \
|
||||||
|
apt-get clean -y && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /var/cache/apt/*
|
||||||
84
_CI-CD/debian-golang/tekton-debian-golang-img.yaml
Normal file
84
_CI-CD/debian-golang/tekton-debian-golang-img.yaml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: PipelineResource
|
||||||
|
metadata:
|
||||||
|
name: chaos-kubernetes-git
|
||||||
|
spec:
|
||||||
|
type: git
|
||||||
|
params:
|
||||||
|
- name: revision
|
||||||
|
value: master
|
||||||
|
- name: url
|
||||||
|
value: http://git-ui.lan/chaos/kubernetes.git
|
||||||
|
- name: submodules
|
||||||
|
value: "false"
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: PipelineResource
|
||||||
|
metadata:
|
||||||
|
name: img-debian-golang-stable
|
||||||
|
spec:
|
||||||
|
type: image
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: cr.lan/debian-golang-stable
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: Task
|
||||||
|
metadata:
|
||||||
|
name: build-debian-golang
|
||||||
|
spec:
|
||||||
|
params:
|
||||||
|
- name: pathToContainerFile
|
||||||
|
type: string
|
||||||
|
default: $(resources.inputs.source.path)/_CI_CD/debian-golang/Dockerfile
|
||||||
|
- name: pathToContext
|
||||||
|
type: string
|
||||||
|
default: $(resources.inputs.source.path)/_CI_CD/debian-golang
|
||||||
|
resources:
|
||||||
|
inputs:
|
||||||
|
- name: source
|
||||||
|
type: git
|
||||||
|
outputs:
|
||||||
|
- name: builtImage
|
||||||
|
type: image
|
||||||
|
steps:
|
||||||
|
- name: build-and-push
|
||||||
|
image: gcr.io/kaniko-project/executor:arm64
|
||||||
|
command:
|
||||||
|
- /kaniko/executor
|
||||||
|
args:
|
||||||
|
- --dockerfile=$(params.pathToContainerFile)
|
||||||
|
- --destination=$(resources.outputs.builtImage.url)
|
||||||
|
- --context=$(params.pathToContext)
|
||||||
|
- --skip-tls-verify
|
||||||
|
#workspaces:
|
||||||
|
# - name: workspace
|
||||||
|
# mountPath: /workspace
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1beta1
|
||||||
|
kind: TaskRun
|
||||||
|
metadata:
|
||||||
|
name: build-debian-golang
|
||||||
|
spec:
|
||||||
|
taskRef:
|
||||||
|
name: build-debian-golang-from-source
|
||||||
|
params:
|
||||||
|
- name: pathToContainerFile
|
||||||
|
value: Dockerfile
|
||||||
|
resources:
|
||||||
|
inputs:
|
||||||
|
- name: source
|
||||||
|
resourceRef:
|
||||||
|
name: chaos-kubernetes
|
||||||
|
outputs:
|
||||||
|
- name: builtImage
|
||||||
|
resourceRef:
|
||||||
|
name: img-debian-golang-stable
|
||||||
|
# workspaces:
|
||||||
|
# - name: workspace
|
||||||
|
# persistentVolumeClaim:
|
||||||
|
# claimName: tektoncd-workspaces
|
||||||
|
# subPath: workspaces
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user