This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Taskfile.yml
42 lines (37 loc) · 1.51 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-License-Identifier: MIT
version: '2'
includes:
local: ./tasks/BuildTasks.yml
docker: ./tasks/DockerTasks.yml
vars:
PROJECT_NAME: namespace-provisioner
BUILD_VERSION: {sh: bash ./scripts/version.sh}
BUILD_VERSION_SHORT: {sh: bash ./scripts/version.sh --short}
BUILD_DATE: '{{dateInZone "2006-01-02T15:04:05Z" now "UTC"}}'
BRANCH: {sh: bash ./scripts/branch.sh}
VCS_REF: {sh: git rev-parse --short HEAD}
GO_BUILD_ENV: GOOS=linux GOARCH=amd64 CGO_ENABLED=0
IMAGE_NAME: '{{.PROJECT_NAME}}'
DOCKER_REGISTRY: docker.pkg.github.com/daimler/namespace-provisioner
KUBE_CONTEXT: minikube
NAMESPACE: default
tasks:
default:
cmds:
- task --list
silent: true
deploy-secrets:
desc: Deploy secrets
cmds:
- |-
kubectl --context={{.KUBE_CONTEXT}} config view --raw --minify=true --flatten=true | \
sed 's#server:.*#server: https://kubernetes.default.svc#g' > config
- |-
kubectl --context={{.KUBE_CONTEXT}} --namespace={{.NAMESPACE}} create secret generic kube-config --from-file=config --dry-run --output=yaml | \
kubectl --context={{.KUBE_CONTEXT}} --namespace={{.NAMESPACE}} apply -f -
- rm config
deploy-local:
desc: Deploy namespace-provisioner
cmds:
- kubectl --context={{.KUBE_CONTEXT}} --namespace={{.NAMESPACE}} delete --filename=deploy/namespace-provisioner-{{.KUBE_CONTEXT}}.yaml --ignore-not-found
- kubectl --context={{.KUBE_CONTEXT}} --namespace={{.NAMESPACE}} apply --filename=deploy/namespace-provisioner-{{.KUBE_CONTEXT}}.yaml