Inline the foreign document test.

This commit is contained in:
Tom Alexander 2024-04-11 18:17:04 -04:00
parent bd441a0293
commit 8321f83dac
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 106 additions and 24 deletions

View File

@ -38,7 +38,14 @@ spec:
echo "hello world" echo "hello world"
- name: report-pending - name: report-pending
taskRef: taskRef:
name: gitea-set-status resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
runAfter: runAfter:
- fetch-repository - fetch-repository
params: params:
@ -58,7 +65,14 @@ spec:
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)" value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
- name: fetch-repository - name: fetch-repository
taskRef: taskRef:
name: git-clone resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/git-clone/0.9/git-clone.yaml
workspaces: workspaces:
- name: output - name: output
workspace: git-source workspace: git-source
@ -71,7 +85,14 @@ spec:
value: "true" value: "true"
- name: build-image - name: build-image
taskRef: taskRef:
name: kaniko resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/kaniko/0.6/kaniko.yaml
params: params:
- name: IMAGE - name: IMAGE
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
@ -83,7 +104,7 @@ spec:
value: "gcr.io/kaniko-project/executor:v1.12.1" value: "gcr.io/kaniko-project/executor:v1.12.1"
- name: EXTRA_ARGS - name: EXTRA_ARGS
value: value:
- --target=foreign-document-test - --target=foreign-document
- --cache=true - --cache=true
- --cache-copy-layers - --cache-copy-layers
- --cache-repo=harbor.fizz.buzz/kanikocache/cache - --cache-repo=harbor.fizz.buzz/kanikocache/cache
@ -99,9 +120,35 @@ spec:
workspace: docker-credentials workspace: docker-credentials
runAfter: runAfter:
- fetch-repository - fetch-repository
- name: run-image - name: run-test
taskRef: taskSpec:
name: run-docker-image metadata: {}
params:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
stepTemplate:
image: alpine:3.18
name: ""
resources:
requests:
cpu: 10m
memory: 60Mi
workingDir: /workspace/source
workspaces:
- name: source
mountPath: /source
- name: cargo-cache
mountPath: /usr/local/cargo/registry
optional: true
steps:
- name: run
image: $(params.docker-image)
workingDir: "$(workspaces.source.path)"
env:
- name: CARGO_TARGET_DIR
value: /target
workspaces: workspaces:
- name: source - name: source
workspace: git-source workspace: git-source
@ -119,7 +166,14 @@ spec:
operator: in operator: in
values: ["Succeeded", "Completed"] values: ["Succeeded", "Completed"]
taskRef: taskRef:
name: gitea-set-status resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
- name: CONTEXT - name: CONTEXT
value: "$(params.JOB_NAME)" value: "$(params.JOB_NAME)"
@ -141,7 +195,14 @@ spec:
operator: in operator: in
values: ["Failed"] values: ["Failed"]
taskRef: taskRef:
name: gitea-set-status resolver: git
params:
- name: url
value: https://github.com/tektoncd/catalog.git
- name: revision
value: df36b3853a5657fd883015cdbf07ad6466918acf
- name: pathInRepo
value: task/gitea-set-status/0.1/gitea-set-status.yaml
params: params:
- name: CONTEXT - name: CONTEXT
value: "$(params.JOB_NAME)" value: "$(params.JOB_NAME)"
@ -158,18 +219,39 @@ spec:
- name: TARGET_URL - name: TARGET_URL
value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)" value: "https://tekton.fizz.buzz/#/namespaces/$(context.pipelineRun.namespace)/pipelineruns/$(context.pipelineRun.name)"
- name: cargo-cache-autoclean - name: cargo-cache-autoclean
taskRef: taskSpec:
name: run-docker-image metadata: {}
params:
- name: docker-image
type: string
description: Docker image to run.
default: alpine:3.18
stepTemplate:
image: alpine:3.18
name: ""
resources:
requests:
cpu: 10m
memory: 60Mi
workingDir: /workspace/source
workspaces:
- name: source
mountPath: /source
- name: cargo-cache
mountPath: /usr/local/cargo/registry
optional: true
steps:
- name: run
image: $(params.docker-image)
workingDir: "$(workspaces.source.path)"
command: [cargo, cache, --autoclean]
args: []
workspaces: workspaces:
- name: source - name: source
workspace: git-source workspace: git-source
- name: cargo-cache - name: cargo-cache
workspace: cargo-cache workspace: cargo-cache
params: params:
- name: command
value: [cargo, cache, --autoclean]
- name: args
value: []
- name: docker-image - name: docker-image
value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" value: "$(params.image-name):$(tasks.fetch-repository.results.commit)"
workspaces: workspaces:

View File

@ -6,23 +6,23 @@ spec:
source: "pipeline-rust-test.yaml" source: "pipeline-rust-test.yaml"
# Override https-based url from lighthouse events. # Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git" clone_uri: "git@code.fizz.buzz:talexander/organic.git"
skip_branches: branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing. - ^main$
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$" - ^master$
- name: rust-foreign-document-test - name: rust-foreign-document-test
source: "pipeline-foreign-document-test.yaml" source: "pipeline-foreign-document-test.yaml"
# Override https-based url from lighthouse events. # Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git" clone_uri: "git@code.fizz.buzz:talexander/organic.git"
skip_branches: branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing. - ^main$
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$" - ^master$
- name: build-organic - name: build-organic
source: "pipeline-build-organic.yaml" source: "pipeline-build-organic.yaml"
# Override https-based url from lighthouse events. # Override https-based url from lighthouse events.
clone_uri: "git@code.fizz.buzz:talexander/organic.git" clone_uri: "git@code.fizz.buzz:talexander/organic.git"
skip_branches: branches:
# We already run on every commit, so running when the semver tags get pushed is causing needless double-processing. - ^main$
- "^v[0-9]+\\.[0-9]+\\.[0-9]+$" - ^master$
- name: clippy - name: clippy
source: "pipeline-rust-clippy.yaml" source: "pipeline-rust-clippy.yaml"
# Override https-based url from lighthouse events. # Override https-based url from lighthouse events.