Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] build: Add debian/redhat packaging #16899

Closed
wants to merge 5 commits into from

Conversation

phlax
Copy link
Member

@phlax phlax commented Jun 9, 2021

Signed-off-by: Ryan Northey ryan@synca.io

Commit Message: build: Add debian packaging
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] Partial fix for #16867
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Jun 9, 2021
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).

🐱

Caused by: #16899 was opened by phlax.

see: more, trace.

@phlax phlax force-pushed the build-create-deb-pkgs branch 4 times, most recently from e4ca7da to 8eede52 Compare June 14, 2021 11:02
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @lizan
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #16899 was synchronize by phlax.

see: more, trace.

@phlax phlax force-pushed the build-create-deb-pkgs branch 2 times, most recently from 55b501f to ffa0b9b Compare June 15, 2021 11:09
@phlax phlax force-pushed the build-create-deb-pkgs branch 2 times, most recently from 22fe851 to c06e650 Compare June 23, 2021 08:30
WORKSPACE Outdated Show resolved Hide resolved
builds/BUILD Outdated Show resolved Hide resolved
builds/rpm.spec Outdated Show resolved Hide resolved
ci/run_envoy_docker.sh Outdated Show resolved Hide resolved
Copy link
Member Author

@phlax phlax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lizan this is still pretty wip, altho most of the parts are now ~working in a mvp way

i had a few ci and compiler questions that i hoped you would be able to assist with - questions in review...

ci/do_ci.sh Outdated
echo "Building distro packages..."
mkdir -p "${ENVOY_DELIVERY_DIR}/envoy"
if [[ "${ENVOY_BUILD_ARCH}" == "x86_64" ]]; then
bazel build "${BAZEL_BUILD_OPTIONS[@]}" -c opt //builds:packages_x64
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im wondering what the best compile flags/options/etc are

@@ -220,6 +253,40 @@ stages:
rbe: false
artifactSuffix: ".arm64"
bazelBuildExtraOptions: "--sandbox_base=/tmp/sandbox_base"
- job: package
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ive added the packaging as a separate job after release - not sure how optimal that is

im wondering whether to either incorporate it with release or conversely to possibly incorporate it with what is currently the docker stage and make that to something like builds

artifactSuffix: ".arm64"
bazelBuildExtraOptions: "--sandbox_base=/tmp/sandbox_base"
- job: verify
# possibly move this job to verify at the end.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as per the comment this could potentially run in parallel with the verifying of examples at the end

@phlax phlax changed the title [WIP] build: Add debian packaging [WIP] build: Add debian/redhat packaging Jun 25, 2021
@djgilcrease
Copy link

might I recommend using https://github.com/goreleaser/nfpm to build rpm, Debian, and alpine packages.

@phlax
Copy link
Member Author

phlax commented Jun 25, 2021

afaict it doesnt have any bazel support - im pretty keen to standardize the tooling around bazel rules

@djgilcrease
Copy link

afaict it doesnt have any bazel support - im pretty keen to standardize the tooling around bazel rules

fair enough, I don't use bazel but I would be willing to try adding the support for it to nfpm.

Looking at the builds/BUILD from this PR it looks like I would want to add a bazel rule that would let you do something like

pkg_nfpm(
    name = "rpm_x64"
    nfpm_file = "envoy"
    pkg_type = "rpm"
    arch = "amd64"
    version = "1.19.0-pre"
)
pkg_nfpm(
    name = "rpm_arm64"
    nfpm_file = "envoy"
    pkg_type = "rpm"
    arch = "arm64"
    version = "1.19.0-pre"
)
pkg_nfpm(
    name = "deb_x64"
    nfpm_file = "envoy"
    pkg_type = "deb"
    arch = "amd64"
    version = "1.19.0-pre"
)
pkg_nfpm(
    name = "deb_arm64"
    nfpm_file = "envoy"
    pkg_type = "deb"
    arch = "arm64"
    version = "1.19.0-pre"
)
pkg_nfpm(
    name = "apk_x64"
    nfpm_file = "envoy"
    pkg_type = "apk"
    arch = "amd64"
    version = "1.19.0-pre"
)
pkg_nfpm(
    name = "apk_arm64"
    nfpm_file = "envoy"
    pkg_type = "apk"
    arch = "arm64"
    version = "1.19.0-pre"
)

if this sounds interesting I can get working on this.

@phlax
Copy link
Member Author

phlax commented Jun 25, 2021

if this sounds interesting I can get working on this.

it sounds interesting - but its not immediately clear what the advantage over using rules_pkg for debs etc - which is pretty well tested/maintained etc, and the google rpm packager - not against the idea in theory if there are some advantages

@phlax phlax force-pushed the build-create-deb-pkgs branch 3 times, most recently from cef956f to 351ff40 Compare June 27, 2021 11:09
@phlax phlax force-pushed the build-create-deb-pkgs branch 18 times, most recently from a5ccff8 to 15fed89 Compare September 3, 2021 12:02
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Ryan Northey <ryan@synca.io>
@github-actions
Copy link

github-actions bot commented Oct 5, 2021

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Oct 5, 2021
@phlax phlax added no stalebot Disables stalebot from closing an issue and removed stale stalebot believes this issue/PR has not been touched recently labels Oct 5, 2021
@alyssawilk alyssawilk closed this Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api deps Approval required for changes to Envoy's external dependencies no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants