Dustin Specker ff0eaeb1c8 feat: enable development pipeline to pass behind proxy with TLS
This is a squashed commit, keeping messages intact for history.

- feat(charts/development-pipeline): work behind corporate proxy

dockerd sidecar works behind proxy with cert. Proxy is only needed on
the sidecar to pull public images. The cert is mounted via a host path
so that the proxy may be trusted.

- fix(standard-container/roles): remove installing Helm push plugin

The standard-container Dockerfile already installs the Helm push plugin,
so no reason to try to install it in multiple ansible roles.

I suspect this was originally done because someone tried to use `helm
push` in the ansible role, but Helm couldn't find even though it was
installed in the image. But tekton defines a the HOME env var if you
describe the pod in a cluster. So if we just define HELM_DATA_HOME to
the location where the push plugin is installed we can remove having to
install it in the ansible roles.

- feat(standard-container/roles): use image.image_from for docker build

Change-Id: Ibc3c5f400978cb98d2d2a37b737b56125f4c2aa7
2021-03-10 15:09:11 +00:00

77 lines
2.5 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
env:
# specify HELM_DATA_HOME since tekton defines HOME as /home/tekton, which is used by Helm by default meaning
# Helm won't find any plugins installed during image build time
- name: HELM_DATA_HOME
value: /root/.local/share/helm
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