cluster.fun/tekton/pipelines/tag.yaml
2020-05-02 21:17:00 +01:00

54 lines
1.4 KiB
YAML

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
default: docker.cluster.fun/private
- name: publicdockerregistry
type: string
description: The Docker registry to push images to
default: docker.cluster.fun/averagemarcus
- 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