apt-cacher-ng in tekton
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
RUN echo 'Acquire::http::proxy "http://172.23.255.1:3142";' >/etc/apt/apt.conf.d/proxy
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-cacher-ng procps && \
|
||||
apt-get clean -y && \
|
||||
74
apps/apt-cacher-ng/tekton-image-build.yaml
Normal file
74
apps/apt-cacher-ng/tekton-image-build.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
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
|
||||
---
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
kind: PipelineResource
|
||||
metadata:
|
||||
name: img-apt-cacher-ng
|
||||
spec:
|
||||
type: image
|
||||
params:
|
||||
- name: url
|
||||
value: cr.lan/apt-cacher-ng
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: build-apt-cacher-ng
|
||||
spec:
|
||||
params:
|
||||
- name: pathToDockerFile
|
||||
type: string
|
||||
default: $(resources.inputs.source.path)/apps/apt-cacher-ng/Dockerfile
|
||||
- name: pathToContext
|
||||
type: string
|
||||
default: $(resources.inputs.source.path)/apps/apt-cacher-ng
|
||||
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.pathToDockerFile)
|
||||
- --destination=$(resources.outputs.builtImage.url)
|
||||
- --context=$(params.pathToContext)
|
||||
- --skip-tls-verify
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: TaskRun
|
||||
metadata:
|
||||
name: img-apt-cacher-ng-taskrun
|
||||
spec:
|
||||
#serviceAccountName: dockerhub-service
|
||||
taskRef:
|
||||
name: build-apt-cacher-ng
|
||||
params:
|
||||
- name: pathToDockerFile
|
||||
value: Dockerfile
|
||||
resources:
|
||||
inputs:
|
||||
- name: source
|
||||
resourceRef:
|
||||
name: chaos-kubernetes-git
|
||||
outputs:
|
||||
- name: builtImage
|
||||
resourceRef:
|
||||
name: img-apt-cacher-ng
|
||||
|
||||
|
||||
Reference in New Issue
Block a user