-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTaskfile.rust.yaml
30 lines (26 loc) · 1.18 KB
/
Taskfile.rust.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
version: 3
# https://hub.docker.com/_/rust/tags
vars:
NBL_RUST_VERSION: 1.70
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 Rust 1.x image
cmds:
- >-
docker build rust/{{.IDENTIFIER}}/{{.NBL_RUST_VERSION}} \
--build-arg "NBL_RUST_VERSION={{.NBL_RUST_VERSION}}" \
--build-arg "BASE_IMAGE={{.BASE_IMAGE}}" \
--tag "local/kernel-rust-{{.NBL_RUST_VERSION}}-{{.IDENTIFIER}}:dev"
base:copy-files:
desc: Copy files from the Rust directory to the build directories
cmds:
- task copy-root-files LANGUAGE=rust IDENTIFIER={{.IDENTIFIER}} NBL_LANGUAGE_VERSION={{.NBL_RUST_VERSION}}
- task copy-language-files LANGUAGE=rust IDENTIFIER={{.IDENTIFIER}} NBL_LANGUAGE_VERSION={{.NBL_RUST_VERSION}}
base:build:
desc: Build the Rust 1.x base image after copying required files
cmds:
- task rust:base:copy-files IDENTIFIER=base NBL_LANGUAGE_VERSION={{.NBL_RUST_VERSION}}
- task rust:core:build IDENTIFIER=base NBL_RUST_VERSION={{.NBL_RUST_VERSION}}