This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
spadinastan/Taskfile.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

version: '3'
includes:
# This file should be supplied by the environment and is not committed.
global-env:
taskfile: ./env.yml
internal: true
internal:
taskfile: ./Taskfile.internal.yml
internal: true
output: prefixed
vars:
# Any build that is not on a tag is a development build.
CURRENT_VERSION:
sh: git describe --tags --exact-match $(git rev-parse HEAD) 2> /dev/null || echo "dev-$(git rev-parse HEAD)"
tasks:
ensure-pod:
desc: "Creates the pod if it doesn't already exist."
cmd: . ./pod.sh
build:
desc: "Builds images for one or more services. Include service names as a space-separated list."
cmds:
- for: { var: CLI_ARGS }
task: internal:build-images
vars:
SERVICE: "{{ .ITEM }}"
VERSION: "{{ .CURRENT_VERSION }}"
prefix: "build: {{ .CLI_ARGS }}"
dir: services
start:
deps: [ensure-pod]
desc: "Starts one or more services. Include service names as a space-separated list."
cmds:
- for: { var: CLI_ARGS }
task: internal:start-service
vars:
SERVICE: "{{ .ITEM }}"
VERSION: "{{ .CURRENT_VERSION }}"
prefix: "start: {{ .CLI_ARGS }}"
dir: services
stop:
desc: "Stops one or more services. Include service names as a space-separated list."
cmds:
- for: { var: CLI_ARGS }
task: internal:stop-service
vars:
SERVICE: "{{ .ITEM }}"
prefix: "stop: {{ .CLI_ARGS }}"
dir: services