-
Notifications
You must be signed in to change notification settings - Fork 3
/
Taskfile.deno.yaml
40 lines (35 loc) · 1.8 KB
/
Taskfile.deno.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
version: 3
vars:
NBL_DENO_VERSION: 1.37
IDENTIFIER: base
# NOTE: When using `deps: []`, variables are inherited from the current task, but when calling them
# directly in `cmds: []`, the variables have to be passed in explicitly.
tasks:
core:build:
desc: Build the Deno image
cmds:
- >-
docker build deno/{{.IDENTIFIER}}/{{.NBL_DENO_VERSION}} \
--build-arg "NBL_DENO_VERSION={{.NBL_DENO_VERSION}}" \
--build-arg "BASE_IMAGE={{.BASE_IMAGE}}" \
--tag "local/kernel-deno-{{.NBL_DENO_VERSION}}-{{.IDENTIFIER}}:dev"
base:copy-files:
desc: Copy files from the Deno directory to the build directories
cmds:
- task copy-root-files LANGUAGE=deno IDENTIFIER={{.IDENTIFIER}} NBL_LANGUAGE_VERSION={{.NBL_DENO_VERSION}}
- task copy-language-files LANGUAGE=deno IDENTIFIER={{.IDENTIFIER}} NBL_LANGUAGE_VERSION={{.NBL_DENO_VERSION}}
- cp deno/packages/deps.ts deno/packages/{{.NBL_DENO_VERSION}}/deps.ts
base:build:
desc: Build the Deno base image after copying required files
cmds:
- task deno:base:copy-files IDENTIFIER=base NBL_LANGUAGE_VERSION={{.NBL_DENO_VERSION}}
- task deno:core:build IDENTIFIER=base NBL_DENO_VERSION={{.NBL_DENO_VERSION}}
packages:build:
desc: Build the Deno 1.3x image with commonly-installed packages
cmds:
# ensure the base image is built first
- task deno:base:build IDENTIFIER=packages NBL_DENO_VERSION={{.NBL_DENO_VERSION}}
# copy adjusted lockfile
- cp deno/packages/deps.ts deno/packages/{{.NBL_DENO_VERSION}}/deps.ts
# build the packages image off of the base image
- task build LANGUAGE=deno NBL_LANGUAGE_VERSION={{.NBL_DENO_VERSION}} IDENTIFIER=packages BUILD_TARGET=main -- --build-context base=docker-image://local/kernel-deno-{{.NBL_DENO_VERSION}}-base:dev