5 changed files with 197 additions and 6 deletions
@ -0,0 +1,132 @@ |
|||||
|
apiVersion: tekton.dev/v1beta1 |
||||
|
kind: Pipeline |
||||
|
metadata: |
||||
|
name: quarkus-getting-started |
||||
|
spec: |
||||
|
|
||||
|
workspaces: |
||||
|
- name: sources |
||||
|
- name: oci-images |
||||
|
- name: registry-token |
||||
|
- name: maven-settings |
||||
|
|
||||
|
params: |
||||
|
- name: git-url |
||||
|
type: string |
||||
|
- name: image-name |
||||
|
type: string |
||||
|
- name: context-dir |
||||
|
type: string |
||||
|
default: "." |
||||
|
- name: containerfile-path |
||||
|
type: string |
||||
|
default: "Containerfile" |
||||
|
|
||||
|
tasks: |
||||
|
|
||||
|
- name: clone-repo-x86-64 |
||||
|
taskRef: |
||||
|
kind: ClusterTask |
||||
|
name: git-clone |
||||
|
params: |
||||
|
- name: url |
||||
|
value: $(params.git-url) |
||||
|
- name: revision |
||||
|
value: "main" |
||||
|
workspaces: |
||||
|
- name: output |
||||
|
workspace: sources |
||||
|
subPath: src-x86_64 |
||||
|
|
||||
|
- name: clone-repo-aarch64 |
||||
|
taskRef: |
||||
|
kind: ClusterTask |
||||
|
name: git-clone |
||||
|
params: |
||||
|
- name: url |
||||
|
value: $(params.git-url) |
||||
|
- name: revision |
||||
|
value: "main" |
||||
|
workspaces: |
||||
|
- name: output |
||||
|
workspace: sources |
||||
|
subPath: src-aarch64 |
||||
|
|
||||
|
- name: maven-package-x86-64 |
||||
|
runAfter: ["clone-repo-x86-64"] |
||||
|
taskRef: |
||||
|
kind: ClusterTask |
||||
|
name: maven |
||||
|
params: |
||||
|
- name: CONTEXT_DIR |
||||
|
value: $(params.context-dir) |
||||
|
workspaces: |
||||
|
- name: source |
||||
|
workspace: sources |
||||
|
subPath: src-x86_64 |
||||
|
- name: maven-settings |
||||
|
workspace: maven-settings |
||||
|
|
||||
|
- name: maven-package-aarch64 |
||||
|
runAfter: ["clone-repo-aarch64"] |
||||
|
taskRef: |
||||
|
kind: ClusterTask |
||||
|
name: maven |
||||
|
params: |
||||
|
- name: CONTEXT_DIR |
||||
|
value: $(params.context-dir) |
||||
|
workspaces: |
||||
|
- name: source |
||||
|
workspace: sources |
||||
|
subPath: src-aarch64 |
||||
|
- name: maven-settings |
||||
|
workspace: maven-settings |
||||
|
|
||||
|
- name: build-x86-64 |
||||
|
runAfter: ["maven-package-x86-64"] |
||||
|
taskRef: |
||||
|
name: buildah-build |
||||
|
params: |
||||
|
- name: context-dir |
||||
|
value: $(params.context-dir) |
||||
|
- name: containerfile-path |
||||
|
value: $(params.containerfile-path) |
||||
|
workspaces: |
||||
|
- name: source-workspace |
||||
|
workspace: sources |
||||
|
subPath: src-aarch64 |
||||
|
- name: oci-images |
||||
|
workspace: oci-images |
||||
|
|
||||
|
- name: build-aarch64 |
||||
|
runAfter: ["maven-package-aarch64"] |
||||
|
taskRef: |
||||
|
name: buildah-build |
||||
|
params: |
||||
|
- name: context-dir |
||||
|
value: $(params.context-dir) |
||||
|
- name: containerfile-path |
||||
|
value: $(params.containerfile-path) |
||||
|
workspaces: |
||||
|
- name: source-workspace |
||||
|
workspace: sources |
||||
|
subPath: src-aarch64 |
||||
|
- name: oci-images |
||||
|
workspace: oci-images |
||||
|
|
||||
|
- name: push-image |
||||
|
runAfter: ["build-x86-64", "build-aarch64"] |
||||
|
taskRef: |
||||
|
name: buildah-push |
||||
|
params: |
||||
|
- name: image-name |
||||
|
value: $(params.image-name) |
||||
|
- name: architectures |
||||
|
value: |
||||
|
- x86_64 |
||||
|
- aarch64 |
||||
|
workspaces: |
||||
|
- name: oci-images |
||||
|
workspace: oci-images |
||||
|
- name: dockerconfig |
||||
|
workspace: registry-token |
||||
@ -0,0 +1,59 @@ |
|||||
|
apiVersion: tekton.dev/v1 |
||||
|
kind: PipelineRun |
||||
|
metadata: |
||||
|
generateName: quarkus-getting-started- |
||||
|
spec: |
||||
|
pipelineRef: |
||||
|
name: quarkus-getting-started |
||||
|
params: |
||||
|
- name: git-url |
||||
|
value: https://github.com/nmasse-itix/tekton-pipeline-multiarch.git |
||||
|
- name: image-name |
||||
|
value: quay.io/nmasse_itix/quarkus-getting-started-multiarch |
||||
|
- name: context-dir |
||||
|
value: examples/quarkus/src |
||||
|
- name: containerfile-path |
||||
|
value: examples/quarkus/src/src/main/docker/Dockerfile.jvm |
||||
|
workspaces: |
||||
|
- name: oci-images |
||||
|
volumeClaimTemplate: |
||||
|
spec: |
||||
|
storageClassName: efs-csi |
||||
|
accessModes: |
||||
|
- ReadWriteMany |
||||
|
resources: |
||||
|
requests: |
||||
|
storage: 10Gi |
||||
|
- name: sources |
||||
|
volumeClaimTemplate: |
||||
|
spec: |
||||
|
storageClassName: efs-csi |
||||
|
accessModes: |
||||
|
- ReadWriteMany |
||||
|
resources: |
||||
|
requests: |
||||
|
storage: 1Gi |
||||
|
- name: maven-settings |
||||
|
emptyDir: {} |
||||
|
- name: registry-token |
||||
|
secret: |
||||
|
secretName: quay-authentication |
||||
|
taskRunTemplate: |
||||
|
serviceAccountName: buildbot |
||||
|
taskRunSpecs: |
||||
|
- pipelineTaskName: maven-package-x86-64 |
||||
|
podTemplate: |
||||
|
nodeSelector: |
||||
|
beta.kubernetes.io/arch: amd64 |
||||
|
- pipelineTaskName: maven-package-aarch64 |
||||
|
podTemplate: |
||||
|
nodeSelector: |
||||
|
beta.kubernetes.io/arch: arm64 |
||||
|
- pipelineTaskName: build-x86-64 |
||||
|
podTemplate: |
||||
|
nodeSelector: |
||||
|
beta.kubernetes.io/arch: amd64 |
||||
|
- pipelineTaskName: build-aarch64 |
||||
|
podTemplate: |
||||
|
nodeSelector: |
||||
|
beta.kubernetes.io/arch: arm64 |
||||
Loading…
Reference in new issue