-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(): remove _repository_args from nodejs_binary
- Loading branch information
Showing
32 changed files
with
270 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log(process.version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/nodejs/image.bzl b/nodejs/image.bzl | ||
index 7c72596..0dac854 100644 | ||
--- a/nodejs/image.bzl | ||
+++ b/nodejs/image.bzl | ||
@@ -117,6 +117,8 @@ def nodejs_image( | ||
binary = None, | ||
launcher = None, | ||
launcher_args = None, | ||
+ node_repository_name = "nodejs", | ||
+ include_node_repo_args = True, | ||
**kwargs): | ||
"""Constructs a container image wrapping a nodejs_binary target. | ||
|
||
@@ -142,11 +144,13 @@ def nodejs_image( | ||
|
||
nodejs_layers = [ | ||
# Put the Node binary into its own layers. | ||
- "@nodejs//:node", | ||
- "@nodejs//:node_files", | ||
- "@nodejs//:bin/node_repo_args.sh", | ||
+ "@%s//:node" % node_repository_name, | ||
+ "@%s//:node_files" % node_repository_name, | ||
] | ||
|
||
+ if include_node_repo_args: | ||
+ nodejs_layers.append("@%s//:bin/node_repo_args.sh" % node_repository_name) | ||
+ | ||
all_layers = nodejs_layers + layers | ||
|
||
visibility = kwargs.get("visibility", None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/nodejs/image.bzl b/nodejs/image.bzl | ||
index 7c72596..0dac854 100644 | ||
--- a/nodejs/image.bzl | ||
+++ b/nodejs/image.bzl | ||
@@ -117,6 +117,8 @@ def nodejs_image( | ||
binary = None, | ||
launcher = None, | ||
launcher_args = None, | ||
+ node_repository_name = "nodejs", | ||
+ include_node_repo_args = True, | ||
**kwargs): | ||
"""Constructs a container image wrapping a nodejs_binary target. | ||
|
||
@@ -142,11 +144,13 @@ def nodejs_image( | ||
|
||
nodejs_layers = [ | ||
# Put the Node binary into its own layers. | ||
- "@nodejs//:node", | ||
- "@nodejs//:node_files", | ||
- "@nodejs//:bin/node_repo_args.sh", | ||
+ "@%s//:node" % node_repository_name, | ||
+ "@%s//:node_files" % node_repository_name, | ||
] | ||
|
||
+ if include_node_repo_args: | ||
+ nodejs_layers.append("@%s//:bin/node_repo_args.sh" % node_repository_name) | ||
+ | ||
all_layers = nodejs_layers + layers | ||
|
||
visibility = kwargs.get("visibility", None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git a/nodejs/image.bzl b/nodejs/image.bzl | ||
index 7c72596..0dac854 100644 | ||
--- a/nodejs/image.bzl | ||
+++ b/nodejs/image.bzl | ||
@@ -117,6 +117,8 @@ def nodejs_image( | ||
binary = None, | ||
launcher = None, | ||
launcher_args = None, | ||
+ node_repository_name = "nodejs", | ||
+ include_node_repo_args = True, | ||
**kwargs): | ||
"""Constructs a container image wrapping a nodejs_binary target. | ||
|
||
@@ -142,11 +144,13 @@ def nodejs_image( | ||
|
||
nodejs_layers = [ | ||
# Put the Node binary into its own layers. | ||
- "@nodejs//:node", | ||
- "@nodejs//:node_files", | ||
- "@nodejs//:bin/node_repo_args.sh", | ||
+ "@%s//:node" % node_repository_name, | ||
+ "@%s//:node_files" % node_repository_name, | ||
] | ||
|
||
+ if include_node_repo_args: | ||
+ nodejs_layers.append("@%s//:bin/node_repo_args.sh" % node_repository_name) | ||
+ | ||
all_layers = nodejs_layers + layers | ||
|
||
visibility = kwargs.get("visibility", None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,5 @@ jasmine_node_test( | |
nodejs_image( | ||
name = "docker", | ||
binary = ":server", | ||
include_node_repo_args = False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.