
This patchset moves all of the Tekton task script sections to use a defined entrypoint instead of an ansible-playbook command. This is a step to keeping all business logic out of the tekton tasks, i.e. the tekton tasks should work with any standard container given, not just one using Ansible. Change-Id: I5e106a8a75b79c0c2948cda638fbe532fd12fae3
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: chart-tasks
|
|
namespace: {{ $.Release.Namespace }}
|
|
spec:
|
|
description: >-
|
|
This task builds charts if source is provided
|
|
workspaces:
|
|
- name: k8s_cluster_data
|
|
- name: development_pipeline_data
|
|
steps:
|
|
- name: clone
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
volumeMounts:
|
|
- mountPath: /usr/local/share/ca-certificates/harbor-ca.crt
|
|
name: harbor-ca
|
|
subPath: harbor-ca
|
|
script: |
|
|
/jarvis/git_clone_chart_repo.sh
|
|
- name: set-chart-output
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cat "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
|
|
- name: lint-chart
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
/jarvis/lint_dryrun_chart.sh
|
|
- name: set-chart-output-after-lint-dryrun
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cat "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
|
|
- name: package-chart
|
|
# Mount all secrets we want to use for external repos to fetch charts
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
/jarvis/package_chart.sh
|
|
- name: set-chart-output-after-packaging
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cat "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
|
|
- name: publish-chart
|
|
volumeMounts:
|
|
- mountPath: /usr/local/share/ca-certificates/harbor-ca.crt
|
|
name: harbor-ca
|
|
subPath: harbor-ca
|
|
- mountPath: /workspace/helm-creds
|
|
name: helm-publish-creds
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
ls -ltr
|
|
|
|
/jarvis/publish_chart.sh
|
|
- name: set-chart-output-after-publish
|
|
image: {{ $.Values.tasks.chart.buildChartImage }}
|
|
script: |
|
|
#!/usr/bin/env sh
|
|
cat "$(workspaces.development_pipeline_data.path)/chart.json"
|
|
volumes:
|
|
- name: helm-publish-creds
|
|
secret:
|
|
secretName: harbor-basic-auth
|
|
- name: harbor-ca
|
|
secret:
|
|
secretName: harbor-ca
|