54 lines
1.4 KiB
YAML
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.cloud.cluster.fun/private
|
||
|
- name: publicdockerregistry
|
||
|
type: string
|
||
|
description: The Docker registry to push images to
|
||
|
default: docker.cloud.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
|