forked from dataform-co/dataform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
71 lines (62 loc) · 1.64 KB
/
BUILD
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package(default_visibility = ["//visibility:public"])
load("//tools:ts_library.bzl", "ts_library")
ts_library(
name = "cli",
srcs = glob(["**/*.ts"]),
deps = [
"//api",
"//core",
"//protos:ts",
"//sqlx",
"@npm//@types/analytics-node",
"@npm//@types/glob",
"@npm//@types/long",
"@npm//@types/node",
"@npm//@types/readline-sync",
"@npm//@types/uuid",
"@npm//@types/yargs",
"@npm//analytics-node",
"@npm//chokidar",
"@npm//glob",
"@npm//presto-client",
"@npm//readline-sync",
"@npm//untildify",
"@npm//uuid",
"@npm//yargs",
],
)
load("//tools/common:copy.bzl", "copy_file")
copy_file(
name = "readme",
src = "//:readme.md",
out = "readme.md",
)
load("//:version.bzl", "DF_VERSION")
load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit")
container_run_and_commit(
name = "image_with_dataform_cli",
commands = [
"npm i -g @dataform/cli@{dataform_version}".format(dataform_version = DF_VERSION),
],
image = "@nodejs_base//image",
tags = [
"no-remote",
],
)
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
container_image(
name = "image_with_dataform_entrypoint",
base = ":image_with_dataform_cli_commit.tar",
entrypoint = ["dataform"],
tags = [
"no-remote",
],
)
container_push(
name = "push",
format = "Docker",
image = ":image_with_dataform_entrypoint",
registry = "docker.io",
repository = "dataformco/dataform",
tag = DF_VERSION,
)