-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ryan Northey <[email protected]>
- Loading branch information
Showing
10 changed files
with
151 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
rootDir: /opt/build/cache/aptly | ||
FileSystemPublishEndpoints: | ||
public: | ||
rootDir: /opt/build/repo/repository | ||
rootDir: /opt/build/cache/html | ||
linkMethod: symlink |
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 |
---|---|---|
|
@@ -91,3 +91,25 @@ jq( | |
.[0] * .[1] | ||
""", | ||
) | ||
|
||
genrule( | ||
name = "html", | ||
outs = ["tar.gz"], | ||
cmd = """ | ||
export APTLY_BIN="$(location @aptly)" | ||
export MAINTAINER_KEY="$(location //:envoy-maintainers-public.key)" | ||
export APTLY_CONF="$(location //:aptly-config)" | ||
export DEBS="$(location //debs)" | ||
export DEBS_ROOT_DEFAULT="/opt/build/cache/repository" | ||
export SIGNING_KEY_DEFAULT="[email protected]" | ||
$(location //debs:publish) | ||
tar cf $@ -C /opt/build/cache/html . | ||
""", | ||
tools = [ | ||
"@aptly", | ||
"//:aptly-config", | ||
"//:envoy-maintainers-public.key", | ||
"//debs", | ||
"//debs:publish", | ||
] | ||
) |
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 |
---|---|---|
|
@@ -34,6 +34,29 @@ create_excludes () { | |
fi | ||
} | ||
|
||
generate_private_key () { | ||
echo -e "$(underline $(bold "Import maintainers private key (apt): repository signing"))" | ||
gpg --batch --pinentry-mode loopback --passphrase "" --gen-key <<EOF | ||
%echo Generating a basic OpenPGP key | ||
Key-Type: 1 | ||
Key-Length: 4096 | ||
Subkey-Type: 1 | ||
Subkey-Length: 4096 | ||
Name-Real: Envoy CI | ||
Name-Email: [email protected] | ||
Expire-Date: 0 | ||
%commit | ||
%echo done | ||
EOF | ||
} | ||
|
||
if [[ -e "${DEBS_ROOT}" ]]; then | ||
ls "${DEBS_ROOT}" | (grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' || echo '') | sort -u > debs/custom-excludes.txt | ||
else | ||
touch debs/custom-excludes.txt | ||
fi | ||
|
||
import_public_key | ||
generate_private_key | ||
create_excludes | ||
bazel run --config=debs-ci //debs:publish | ||
bazel run --config=publish-ci //tools/tarball:unpack /opt/build/repo/html |
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 |
---|---|---|
|
@@ -141,6 +141,7 @@ genrule( | |
":excludes", | ||
":token", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
sh_binary( | ||
|
@@ -152,11 +153,13 @@ sh_binary( | |
"APTLY_CONF": "$(location //:aptly-config)", | ||
"DEBS": "$(location :debs)", | ||
"DEBS_ROOT_DEFAULT": "/opt/build/cache/repository", | ||
"SIGNING_KEY_DEFAULT": "[email protected]", | ||
}, | ||
data = [ | ||
"@aptly", | ||
"//:aptly-config", | ||
"//:envoy-maintainers-public.key", | ||
":debs" | ||
], | ||
visibility = ["//visibility:public"], | ||
) |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[build] | ||
publish = "repository" | ||
publish = "html" | ||
command = "./build-repository.sh" | ||
|
||
[build.environment] | ||
|
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
load("@rules_proto//proto:setup.bzl", "rules_proto_setup") | ||
load("@rules_python//python:repositories.bzl", "py_repositories") | ||
# load("@envoy//bazel:api_binding.bzl", "envoy_api_binding") | ||
# load("@envoy//bazel:repositories.bzl", "envoy_build_config") | ||
|
||
|
||
def setup(): | ||
py_repositories() | ||
rules_proto_setup() | ||
# envoy_api_binding() | ||
# envoy_build_config(name = "envoy_build_config") |
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,7 @@ | ||
load("@envoy_toolshed//tarball:macros.bzl", "unpacker") | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
unpacker( | ||
name = "unpack", | ||
) |
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