-
Notifications
You must be signed in to change notification settings - Fork 3
/
Taskfile.yaml
50 lines (45 loc) · 2.02 KB
/
Taskfile.yaml
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
43
44
45
46
47
48
49
50
version: 3
includes:
python: ./Taskfile.python.yaml
r: ./Taskfile.R.yaml
rust: ./Taskfile.rust.yaml
deno: ./Taskfile.deno.yaml
vars:
NBL_HOME_DIR: /srv/noteable
NBL_WORK_DIR: /var/run/noteable
tasks:
copy-root-files:
desc: Copy files from the root of the repository to the base build directories
cmds:
- cp ./scripts/apt-install {{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/apt-install
- cp ./scripts/secrets_helper.sh {{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/secrets_helper.sh
generates:
- ./{{.LANGUAGE}}/base/{{.NBL_LANGUAGE_VERSION}}/apt-install
- ./{{.LANGUAGE}}/base/{{.NBL_LANGUAGE_VERSION}}/secrets_helper.sh
copy-language-files:
desc: Copy files from the language-level directory to the build directories
deps: [copy-root-files]
cmds:
- cp {{.LANGUAGE}}/Aptfile {{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/Aptfile
- cp {{.LANGUAGE}}/run.sh {{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/run.sh
generates:
- ./{{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/Aptfile
- ./{{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}}/run.sh
build:
desc: Build the kernel image with docker buildx
cmds:
- >-
docker buildx build {{.LANGUAGE}}/{{.IDENTIFIER}}/{{.NBL_LANGUAGE_VERSION}} {{.CLI_ARGS}} \
--build-arg "NBL_LANGUAGE_VERSION={{.NBL_LANGUAGE_VERSION}}" \
--build-arg "NBL_HOME_DIR={{.NBL_HOME_DIR}}" \
--build-arg "NBL_WORK_DIR={{.NBL_WORK_DIR}}" \
--target "{{.BUILD_TARGET}}" \
--tag "local/kernel-{{.LANGUAGE}}-{{.NBL_LANGUAGE_VERSION}}-{{.IDENTIFIER}}{{.TAG_SUFFIX}}:{{.TAG}}"
requires:
vars: [LANGUAGE, IDENTIFIER, NBL_LANGUAGE_VERSION]
vars:
BUILD_TARGET: '{{default "base" .BUILD_TARGET}}'
NBL_HOME_DIR: '{{default "/srv/noteable" .NBL_HOME_DIR}}'
NBL_WORK_DIR: '{{default "/var/run/noteable" .NBL_WORK_DIR}}'
TAG_SUFFIX: '{{default "" .TAG_SUFFIX}}'
TAG: '{{default "dev" .TAG}}'