Added tekton for Docker image build
This commit is contained in:
parent
46edad2748
commit
7b14bd4019
|
@ -46,7 +46,7 @@ FROM golang:1.13 AS lightwalletd_base
|
||||||
ADD . /go/src/github.com/zcash/lightwalletd
|
ADD . /go/src/github.com/zcash/lightwalletd
|
||||||
WORKDIR /go/src/github.com/zcash/lightwalletd
|
WORKDIR /go/src/github.com/zcash/lightwalletd
|
||||||
RUN make \
|
RUN make \
|
||||||
&& /usr/bin/install -c ./server /usr/bin/
|
&& /usr/bin/install -c ./lightwalletd /usr/local/bin/
|
||||||
|
|
||||||
ARG LWD_USER=lightwalletd
|
ARG LWD_USER=lightwalletd
|
||||||
ARG LWD_UID=2002
|
ARG LWD_UID=2002
|
||||||
|
@ -59,5 +59,5 @@ RUN useradd --home-dir /srv/$LWD_USER \
|
||||||
USER $LWD_USER
|
USER $LWD_USER
|
||||||
WORKDIR /srv/$LWD_USER
|
WORKDIR /srv/$LWD_USER
|
||||||
|
|
||||||
ENTRYPOINT ["server"]
|
ENTRYPOINT ["lightwalletd"]
|
||||||
CMD ["--help"]
|
CMD ["--help"]
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: PipelineResource
|
||||||
|
metadata:
|
||||||
|
name: lightwalletd-image
|
||||||
|
spec:
|
||||||
|
type: image
|
||||||
|
params:
|
||||||
|
- name: url
|
||||||
|
value: electriccoinco/lightwalletd
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: PipelineResource
|
||||||
|
metadata:
|
||||||
|
name: lightwalletd-git
|
||||||
|
spec:
|
||||||
|
type: git
|
||||||
|
params:
|
||||||
|
- name: revision
|
||||||
|
value: master
|
||||||
|
- name: url
|
||||||
|
value: https://github.com/zcash/lightwalletd.git
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: TaskRun
|
||||||
|
metadata:
|
||||||
|
generateName: lightwalletd-dockerbuild-
|
||||||
|
spec:
|
||||||
|
serviceAccountName: zcashsysadmin-service
|
||||||
|
taskRef:
|
||||||
|
name: build-docker-image-from-git-source
|
||||||
|
inputs:
|
||||||
|
resources:
|
||||||
|
- name: docker-source
|
||||||
|
resourceRef:
|
||||||
|
name: lightwalletd-git
|
||||||
|
params:
|
||||||
|
- name: pathToDockerFile
|
||||||
|
value: /workspace/docker-source/Dockerfile
|
||||||
|
- name: pathToContext
|
||||||
|
value: /workspace/docker-source/
|
||||||
|
outputs:
|
||||||
|
resources:
|
||||||
|
- name: builtImage
|
||||||
|
resourceRef:
|
||||||
|
name: lightwalletd-image
|
||||||
|
- name: notification
|
||||||
|
resourceRef:
|
||||||
|
name: event-to-cloudlog
|
|
@ -0,0 +1,45 @@
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: TriggerBinding
|
||||||
|
metadata:
|
||||||
|
name: lightwalletd-master-binding
|
||||||
|
spec:
|
||||||
|
params:
|
||||||
|
- name: newSHA
|
||||||
|
value: $(body.after)
|
||||||
|
---
|
||||||
|
apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: TriggerTemplate
|
||||||
|
metadata:
|
||||||
|
name: lightwalletd-dockerbuild-template
|
||||||
|
spec:
|
||||||
|
params:
|
||||||
|
- name: newSHA
|
||||||
|
description: The git repository HEAD sha
|
||||||
|
resourcetemplates:
|
||||||
|
- apiVersion: tekton.dev/v1alpha1
|
||||||
|
kind: TaskRun
|
||||||
|
metadata:
|
||||||
|
generateName: lightwalletd-dockerbuild-
|
||||||
|
spec:
|
||||||
|
serviceAccountName: zcashsysadmin-service
|
||||||
|
taskRef:
|
||||||
|
name: build-docker-image-from-git-source
|
||||||
|
inputs:
|
||||||
|
resources:
|
||||||
|
- name: docker-source
|
||||||
|
resourceRef:
|
||||||
|
name: lightwalletd-git
|
||||||
|
params:
|
||||||
|
- name: pathToDockerFile
|
||||||
|
value: /workspace/docker-source/Dockerfile
|
||||||
|
- name: pathToContext
|
||||||
|
value: /workspace/docker-source/
|
||||||
|
outputs:
|
||||||
|
resources:
|
||||||
|
- name: builtImage
|
||||||
|
resourceRef:
|
||||||
|
name: lightwalletd-image
|
||||||
|
- name: notification
|
||||||
|
resourceRef:
|
||||||
|
name: event-to-cloudlog
|
Loading…
Reference in New Issue