Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Tekton CI): add v2 ci image publish pipeline tasks #1386

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .tekton/listener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ spec:
- name: images
description: a image list for publishing
default: "api-server persistenceagent metadata-writer scheduledworkflow cache-server frontend pipelineloop-controller pipelineloop-webhook kubeclient"
- name: v2-images
description: a v2 image list for publishing
default: "tekton-kfptask-controller tekton-kfptask-webhook tekton-exithandler-controller tekton-exithandler-webhook"
- name: many-edge-duration
description: duration threshold for many edge pipeline
value: "7"
- name: v2-image-tag
description: v2 tekton catalog image tag
default: "nightly"
resourcetemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -150,8 +156,12 @@ spec:
value: $(params.skip-pipeline-loop)
- name: images
value: $(params.images)
- name: v2-images
value: $(params.v2-images)
- name: many-edge-duration
value: $(params.many-edge-duration)
- name: v2-image-tag
value: $(params.v2-image-tag)
---
apiVersion: tekton.dev/v1beta1
kind: TriggerBinding
Expand Down
134 changes: 134 additions & 0 deletions .tekton/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ spec:
- name: images
description: a image list for publishing
default: "api-server persistenceagent metadata-writer scheduledworkflow cache-server frontend pipelineloop-controller pipelineloop-webhook kubeclient"
- name: v2-images
description: a v2 image list for publishing
default: "tekton-kfptask-controller tekton-kfptask-webhook tekton-exithandler-controller tekton-exithandler-webhook"
- name: many-edge-duration
description: duration threshold for many edge pipeline
value: "7"
- name: v2-image-tag
description: v2 tekton catalog image tag
default: "nightly"
workspaces:
- name: pipeline-pvc
tasks:
Expand Down Expand Up @@ -373,6 +379,130 @@ spec:
workspaces:
- name: task-pvc
workspace: pipeline-pvc
- name: containerize-tekton-kfptask-controller
runAfter:
- test
- build-images-api-server
- build-images-persistenceagent
- build-images-cacheserver
- build-images-scheduledworkflow
taskRef:
name: build-images-dnd
params:
- name: apikey
value: $(params.apikey)
- name: image-name
value: tekton-kfptask-controller
- name: docker-root
value: tekton-catalog/tekton-kfptask
- name: docker-file
value: tekton-catalog/tekton-kfptask/Dockerfile.tekton-kfptask.controller
- name: registry-url
value: $(params.registry-url)
- name: registry-namespace
value: $(params.registry-namespace)
- name: docker-username
value: iamapikey
- name: docker-password
value: $(params.docker-password)
- name: run-task
value: image
workspaces:
- name: task-pvc
workspace: pipeline-pvc
- name: containerize-kfptask-webhook
runAfter:
- test
- build-images-api-server
- build-images-persistenceagent
- build-images-cacheserver
- build-images-scheduledworkflow
taskRef:
name: build-images-dnd
params:
- name: apikey
value: $(params.apikey)
- name: image-name
value: tekton-kfptask-webhook
- name: docker-root
value: tekton-catalog/tekton-kfptask
- name: docker-file
value: tekton-catalog/tekton-kfptask/Dockerfile.tekton-kfptask.webhook
- name: registry-url
value: $(params.registry-url)
- name: registry-namespace
value: $(params.registry-namespace)
- name: docker-username
value: iamapikey
- name: docker-password
value: $(params.docker-password)
- name: run-task
value: image
workspaces:
- name: task-pvc
workspace: pipeline-pvc
- name: containerize-tekton-exithandler-controller
runAfter:
- test
- build-images-api-server
- build-images-persistenceagent
- build-images-cacheserver
- build-images-scheduledworkflow
taskRef:
name: build-images-dnd
params:
- name: apikey
value: $(params.apikey)
- name: image-name
value: tekton-exithandler-controller
- name: docker-root
value: tekton-catalog/tekton-exithandler
- name: docker-file
value: tekton-catalog/tekton-exithandler/Dockerfile.tekton-exithandler.controller
- name: registry-url
value: $(params.registry-url)
- name: registry-namespace
value: $(params.registry-namespace)
- name: docker-username
value: iamapikey
- name: docker-password
value: $(params.docker-password)
- name: run-task
value: image
workspaces:
- name: task-pvc
workspace: pipeline-pvc
- name: containerize-exithandler-webhook
runAfter:
- test
- build-images-api-server
- build-images-persistenceagent
- build-images-cacheserver
- build-images-scheduledworkflow
taskRef:
name: build-images-dnd
params:
- name: apikey
value: $(params.apikey)
- name: image-name
value: tekton-exithandler-webhook
- name: docker-root
value: tekton-catalog/tekton-exithandler
- name: docker-file
value: tekton-catalog/tekton-exithandler/Dockerfile.tekton-exithandler.webhook
- name: registry-url
value: $(params.registry-url)
- name: registry-namespace
value: $(params.registry-namespace)
- name: docker-username
value: iamapikey
- name: docker-password
value: $(params.docker-password)
- name: run-task
value: image
workspaces:
- name: task-pvc
workspace: pipeline-pvc
- name: containerize-pipelineloop-webhook
runAfter:
- build-pipeline-loops-binaries
Expand Down Expand Up @@ -753,6 +883,10 @@ spec:
value: $(params.public-cr)
- name: images
value: $(params.images)
- name: v2-images
value: $(params.v2-images)
- name: v2-image-tag
value: $(params.v2-image-tag)
workspaces:
- name: task-pvc
workspace: pipeline-pvc
Expand Down
10 changes: 10 additions & 0 deletions .tekton/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ spec:
- name: image-tag
description: image tag
default: "nightly"
- name: v2-images
description: v2 image list to publish
default: "tekton-kfptask-controller tekton-kfptask-webhook tekton-exithandler-controller tekton-exithandler-webhook"
- name: v2-image-tag
description: v2 image tag
default: "nightly"
- name: dind-ns
description: dind namespace
default: docker-build
Expand Down Expand Up @@ -513,6 +519,10 @@ spec:
value: $(params.images)
- name: PUBLISH_TAG
value: $(params.image-tag)
- name: V2_IMAGES
value: $(params.v2-images)
- name: V2_PUBLISH_TAG
value: $(params.v2-image-tag)
- name: DIND_NS
value: $(params.dind-ns)
- name: BUILD_NUMBER
Expand Down
8 changes: 8 additions & 0 deletions scripts/deploy/iks/publish-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set -xe
DIND_NS=${DIND_NS:-"docker-build"}
IMAGES=${IMAGES:-"api-server persistenceagent metadata-writer scheduledworkflow cache-server frontend"}
PUBLISH_TAG=${PUBLISH_TAG:-"nightly"}
V2_IMAGES=${IMAGES:-"tekton-kfptask-controller tekton-kfptask-webhook tekton-exithandler-controller tekton-exithandler-webhook"}
V2_PUBLISH_TAG=${PUBLISH_TAG:-"nightly"}
PUBLIC_CR_NAMESPACE=${PUBLIC_CR_NAMESPACE:-"aipipeline"}
PUBLIC_CR=${PUBLIC_CR:-"quay.io"}

Expand Down Expand Up @@ -65,3 +67,9 @@ for one in $IMAGES; do
docker tag "${REGISTRY_URL}/${REGISTRY_NAMESPACE}/${one}:${IMAGE_TAG}" "${PUBLIC_CR}/${PUBLIC_CR_NAMESPACE}/${one}:${PUBLISH_TAG}"
docker push "${PUBLIC_CR}/${PUBLIC_CR_NAMESPACE}/${one}:${PUBLISH_TAG}"
done

for one in $V2_IMAGES; do
docker pull "${REGISTRY_URL}/${REGISTRY_NAMESPACE}/${one}:${IMAGE_TAG}"
docker tag "${REGISTRY_URL}/${REGISTRY_NAMESPACE}/${one}:${IMAGE_TAG}" "${PUBLIC_CR}/${PUBLIC_CR_NAMESPACE}/${one}:${V2_PUBLISH_TAG}"
docker push "${PUBLIC_CR}/${PUBLIC_CR_NAMESPACE}/${one}:${V2_PUBLISH_TAG}"
done
2 changes: 1 addition & 1 deletion tekton-catalog/pipeline-loops/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.5
1.8.1
2 changes: 1 addition & 1 deletion tekton-catalog/tekton-exithandler/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1
2.0.2
2 changes: 1 addition & 1 deletion tekton-catalog/tekton-kfptask/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.1
2.0.2
Loading