
This patchset copies the development-pipeline and standard-container into the sample network mongodb directory to begin testing the pipeline and standard-container in a namespace created by jarvis-system. Change-Id: I8448a122e8da218752ea57b15fb2983881e90ec9
84 lines
4.8 KiB
YAML
84 lines
4.8 KiB
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: setup-cluster-config
|
|
namespace: {{ $.Release.Namespace }}
|
|
spec:
|
|
description: >-
|
|
This task sets configurations that will be used as overrides to the Ansible tasks.
|
|
workspaces:
|
|
- name: k8s_cluster_data
|
|
- name: development_pipeline_data
|
|
steps:
|
|
- name: setup-cluster-config
|
|
image: {{ $.Values.tasks.setup.setupConfigImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cp "$(workspaces.k8s_cluster_data.path)/default.json" "$(workspaces.development_pipeline_data.path)/default.json"
|
|
cp "$(workspaces.k8s_cluster_data.path)/cluster.json" "$(workspaces.development_pipeline_data.path)/cluster.json"
|
|
jq '.cluster_kubeconfig_path="$(workspaces.development_pipeline_data.path)/config"' "$(workspaces.development_pipeline_data.path)/cluster.json" > "$(workspaces.development_pipeline_data.path)/temp_cluster.json" && mv "$(workspaces.development_pipeline_data.path)/temp_cluster.json" "$(workspaces.development_pipeline_data.path)/cluster.json"
|
|
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: setup-image-config
|
|
namespace: {{ $.Release.Namespace }}
|
|
spec:
|
|
description: >-
|
|
This task sets configurations that will be used as overrides to the Ansible tasks.
|
|
workspaces:
|
|
- name: k8s_cluster_data
|
|
- name: development_pipeline_data
|
|
steps:
|
|
- name: setup-image-config
|
|
image: {{ $.Values.tasks.setup.setupConfigImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cp "$(workspaces.k8s_cluster_data.path)/image.json" "$(workspaces.development_pipeline_data.path)/image.json"
|
|
echo "Set temporary image name to test/scan-image:$(context.taskRun.uid)"
|
|
jq '.image_fullname="test/scan-image:$(context.taskRun.uid)"' "$(workspaces.development_pipeline_data.path)/image.json" > "$(workspaces.development_pipeline_data.path)/temp_image.json" && mv "$(workspaces.development_pipeline_data.path)/temp_image.json" "$(workspaces.development_pipeline_data.path)/image.json"
|
|
echo "Set tag to context $(context.taskRun.uid)"
|
|
jq '.tag="$(context.taskRun.uid)"' "$(workspaces.development_pipeline_data.path)/image.json" > "$(workspaces.development_pipeline_data.path)/temp_image.json" && mv "$(workspaces.development_pipeline_data.path)/temp_image.json" "$(workspaces.development_pipeline_data.path)/image.json"
|
|
echo "Set checkout location for git repository to $(workspaces.development_pipeline_data.path)/$(context.taskRun.uid)"
|
|
jq '.build.checkout_loc="$(workspaces.development_pipeline_data.path)/$(context.taskRun.uid)"' "$(workspaces.development_pipeline_data.path)/image.json" > "$(workspaces.development_pipeline_data.path)/temp_image.json" && mv "$(workspaces.development_pipeline_data.path)/temp_image.json" "$(workspaces.development_pipeline_data.path)/image.json"
|
|
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: setup-chart-config
|
|
namespace: {{ $.Release.Namespace }}
|
|
spec:
|
|
description: >-
|
|
This task sets configurations that will be used as overrides to the Ansible tasks.
|
|
workspaces:
|
|
- name: k8s_cluster_data
|
|
- name: development_pipeline_data
|
|
steps:
|
|
- name: setup-chart-config
|
|
image: {{ $.Values.tasks.setup.setupConfigImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cp "$(workspaces.k8s_cluster_data.path)/default.json" "$(workspaces.development_pipeline_data.path)/default.json"
|
|
cp "$(workspaces.k8s_cluster_data.path)/chart.json" "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
echo "Set tag to context $(context.taskRun.uid)"
|
|
jq '.tag="$(context.taskRun.uid)"' "$(workspaces.development_pipeline_data.path)/chart.json" > "$(workspaces.development_pipeline_data.path)/temp_chart.json" && mv "$(workspaces.development_pipeline_data.path)/temp_chart.json" "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
echo "Set checkout location for git repository to $(workspaces.development_pipeline_data.path)/$(context.taskRun.uid)"
|
|
jq '.build.checkout_loc="$(workspaces.development_pipeline_data.path)/$(context.taskRun.uid)"' "$(workspaces.development_pipeline_data.path)/chart.json" > "$(workspaces.development_pipeline_data.path)/temp_chart.json" && mv "$(workspaces.development_pipeline_data.path)/temp_chart.json" "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: setup-cleanup-config
|
|
namespace: {{ $.Release.Namespace }}
|
|
spec:
|
|
description: >-
|
|
This task sets configurations that will be used as overrides to the Ansible tasks.
|
|
workspaces:
|
|
- name: k8s_cluster_data
|
|
- name: development_pipeline_data
|
|
steps:
|
|
- name: setup-cleanup-config
|
|
image: {{ $.Values.tasks.setup.setupConfigImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cp "$(workspaces.k8s_cluster_data.path)/cleanup.json" "$(workspaces.development_pipeline_data.path)/cleanup.json" |