mirror of
https://github.com/bvanroll/stage-infra.git
synced 2025-08-29 03:52:49 +00:00
32 lines
790 B
YAML
32 lines
790 B
YAML
|
|
---
|
|
apiVersion: tekton.dev/v1alpha1
|
|
kind: Task
|
|
metadata:
|
|
name: deploy-app
|
|
namespace: tekton-pipeline-1
|
|
spec:
|
|
params:
|
|
- name: yaml-location
|
|
default: infra/deploy.yaml
|
|
- name: command
|
|
default: apply
|
|
- name: deploy-name
|
|
- name: deploy-version
|
|
workspaces:
|
|
- name: source
|
|
mountpath: /source
|
|
steps:
|
|
- name: update-yaml
|
|
image: alpine
|
|
script: |
|
|
#!/usr/bin/env bash
|
|
sed -i -e s;DEPLOY_NAME;$(params.deploy-name);g $(params.yaml-location)
|
|
sed -i -e s;DEPLOY_VERSION;$(params.deploy-version);g $(params.yaml-location)
|
|
- name: deploy-new-app
|
|
image: lachlanevenson/k8s-kubectl
|
|
command: ["kubectl"]
|
|
args:
|
|
- "$(params.command)"
|
|
- "-f"
|
|
- "/source/$(params.yaml-location)" |