Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#
# A Bazel (http://bazel.io) workspace for the Google Cloud Endpoints runtime.

ISTIO_PROXY = "ee3cdeeb33b1de0b87c80809802de5246cbb3e25"
ISTIO_PROXY = "b27d4b9fe2e5c17f0c4cdf92c73ee92a76ac02f8"

git_repository(
name = "nginx",
Expand Down Expand Up @@ -57,7 +57,7 @@ load(
"@istio_proxy_git//contrib/endpoints:repositories.bzl",
"grpc_repositories",
"servicecontrol_client_repositories",
"mixerapi_repositories",
"mixer_client_repositories",
)
load(
"@istio_proxy_git//:repositories.bzl",
Expand Down Expand Up @@ -97,14 +97,21 @@ bind(

servicecontrol_client_repositories()

mixerapi_repositories()
mixer_client_repositories()

protobuf_repositories()

googletest_repositories()

grpc_repositories()

load(
"@mixerclient_git//:repositories.bzl",
"mixerapi_repositories",
)

mixerapi_repositories(protobuf_repo="@protobuf_bzl//")

# Though GRPC has BUILD file, our own BUILD.grpc file is needed since it contains
# more targets including testing server and client.
# To generate the BUILD.grpc file, cherry-pick
Expand Down Expand Up @@ -140,10 +147,15 @@ bind(
actual = "@gflags_git//:gflags",
)

git_repository(
name = "tools",
commit = "3327bae27498025ef8d33709f37182ae407fc517",
remote = "https://github.com/cloudendpoints/endpoints-tools",
)

#
# Python rules
#

git_repository(
name = "io_bazel_rules_pex",
commit = "d4af3ca0a015e8b2d2a81a4df1df51bb0fa0bba0",
Expand Down
2 changes: 1 addition & 1 deletion script/jenkins-tests-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function list_instances() {
local json_path="$(mktemp /tmp/XXXXX.json)"
"${GCLOUD}" compute instances list \
--project "${PROJECT}" \
--zone "${ZONE}" \
--zones "${ZONE}" \
--format=json > "${json_path}"
parse_gcloud_json "${json_path}" 'name' "${regex}"
rm -f "${json_path}"
Expand Down
1 change: 1 addition & 0 deletions script/linux-install-software
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function install_packages() {
autotools-dev \
ca-certificates \
curl \
ca-certificates-java=20161107~bpo8+1 \
g++ \
gcc \
gettext \
Expand Down
109 changes: 51 additions & 58 deletions src/nginx/main/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#
###############################################################################
#

load("@io_bazel_rules_pex//pex:pex_rules.bzl", "pex_binary")

cc_binary(
name = "nginx-google",
srcs = [
Expand Down Expand Up @@ -191,13 +194,9 @@ genrule(
)

pkg_tar(
name = "esp-bin",
name = "nginx-bin",
files = [
":debug_nginx.sh",
":fetch_service_config.sh",
":nginx",
":nginx-debug",
":start_esp",
],
mode = "0755",
package_dir = "/usr/sbin",
Expand All @@ -214,36 +213,6 @@ pkg_tar(
strip_prefix = ".",
)

pkg_tar(
name = "nginx-initd-override",
files = [
"nginx-init.d/nginx",
],
mode = "0755",
package_dir = "/etc/init.d",
)

pkg_tar(
name = "nginx-conf-template",
files = [
"//src/nginx/main:nginx-auto.conf.template",
"//src/nginx/main:server_config.pb.txt",
],
mode = "0644",
package_dir = "/etc/nginx",
strip_prefix = ".",
)

pkg_tar(
name = "trusted-ca-certificates",
files = [
"//src/nginx/main:trusted-ca-certificates.crt",
],
mode = "0644",
package_dir = "/etc/nginx",
strip_prefix = ".",
)

pkg_tar(
name = "esp-data",
extension = "tar.gz",
Expand All @@ -252,13 +221,56 @@ pkg_tar(
# The first occurrence of the duplicate file will be picked. In other
# words, /etc/nginx/nginx.conf from ":nginx-conf-override" will
# override that from "@nginx_pkgoss//:debian_overlay".
":nginx-conf-template",
":nginx-initd-override",
":start_esp_tar",
"@tools//start_esp:nginx-conf-template",
"@tools//start_esp:nginx-initd-override",
"@nginx_pkgoss//:debian_overlay",
":esp-bin",
"@tools//start_esp:esp-bin",
":nginx-bin",
":esp-copyright",
":trusted-ca-certificates",
"@tools//start_esp:trusted-ca-certificates",
],
)

# Due to an issue with external repository and PEX rules, we need to move these files here

genrule(
name = "import_start_esp",
srcs = ["@tools//start_esp:start_esp.py"],
outs = ["start_esp.py"],
cmd = "cat $(location @tools//start_esp:start_esp.py) > $@",
)

genrule(
name = "import_fetch_service_config",
srcs = ["@tools//start_esp:fetch_service_config.py"],
outs = ["fetch_service_config.py"],
cmd = "cat $(location @tools//start_esp:fetch_service_config.py) > $@",
)

pex_binary(
name = "start_esp",
srcs = [
":fetch_service_config.py",
":start_esp.py",
],
main = ":start_esp.py",
reqs = [
"certifi",
"mako>=1.0.4",
"oauth2client>=3.0.0",
"pyasn1>=0.1.9",
"pyasn1-modules>=0.0.8",
"urllib3>=1.16",
],
)

pkg_tar(
name = "start_esp_tar",
files = [":start_esp"],
mode = "0755",
package_dir = "/usr/sbin",
strip_prefix = ".",
)

pkg_deb(
Expand Down Expand Up @@ -301,22 +313,3 @@ sh_test(
":endpoints-server-proxy.deb",
],
)

load("@io_bazel_rules_pex//pex:pex_rules.bzl", "pex_binary")

pex_binary(
name = "start_esp",
srcs = [
"fetch_service_config.py",
"start_esp.py",
],
main = "start_esp.py",
reqs = [
"certifi",
"mako>=1.0.4",
"oauth2client>=3.0.0",
"pyasn1>=0.1.9",
"pyasn1-modules>=0.0.8",
"urllib3>=1.16",
],
)
78 changes: 0 additions & 78 deletions src/nginx/main/debug_nginx.sh

This file was deleted.

Loading