cluster.fun/tekton/pipelines/tag.yaml

54 lines
1.4 KiB
YAML
Raw Normal View History

2020-04-25 18:18:33 +00:00
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: project-tag
namespace: tekton-pipelines
spec:
params:
- name: projectname
type: string
- name: isprivate
default: "true"
type: string
- name: dockerregistry
type: string
description: The Docker registry to push images to
2020-05-02 20:17:00 +00:00
default: docker.cluster.fun/private
2020-04-25 18:18:33 +00:00
- name: publicdockerregistry
type: string
description: The Docker registry to push images to
2020-05-02 20:17:00 +00:00
default: docker.cluster.fun/averagemarcus
2020-04-25 18:18:33 +00:00
- name: imagetag
type: string
description: The Docker image tag
default: latest
resources:
- name: git-source
type: git
tasks:
- name: build-and-publish-tag
taskRef:
name: docker-build-and-publish
params:
- name: IMAGE
value: $(params.dockerregistry)/$(params.projectname):$(params.imagetag)
resources:
inputs:
- name: src
resource: git-source
- name: build-and-publish-tag-public
conditions:
- conditionRef: is-public-project
params:
- name: isprivate
value: $(params.isprivate)
taskRef:
name: docker-build-and-publish
params:
- name: IMAGE
value: $(params.publicdockerregistry)/$(params.projectname):$(params.imagetag)
resources:
inputs:
- name: src
resource: git-source