-
Notifications
You must be signed in to change notification settings - Fork 32
chore: fix build #130
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
Merged
Merged
chore: fix build #130
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
86c2fd9
fix build
zhaohuabing fc95b5a
use envoy build docker for CI
zhaohuabing 8481d73
update scripts
zhaohuabing 30cd893
fix test
zhaohuabing 59a938c
pin runner os version
zhaohuabing 7c438df
revert Makefile
zhaohuabing 5e50dd4
remove unused ci files
zhaohuabing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 +1 @@ | ||
| 6.0.0 | ||
| 6.3.2 |
This file contains hidden or 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,36 @@ | ||
| --- | ||
| name: build-api | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| - "master" | ||
| - "release/v*" | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| - "**/*.png" | ||
| pull_request: | ||
| branches: | ||
| - "main" | ||
| - "master" | ||
| - "release/v*" | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| - "**/*.png" | ||
|
|
||
| jobs: | ||
| BuildMetaProtocolBinary: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 1440 # 12 hours | ||
| name: Build API | ||
| env: | ||
| LOG_DIR: /tmp/test_logs | ||
| LOG_PATH: /tmp/test_logs/${{ matrix.protocal }}.log | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Build | ||
| run: | | ||
| bash ${GITHUB_WORKSPACE}/ci/ci_api.sh | ||
This file contains hidden or 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,36 @@ | ||
| --- | ||
| name: build-metaprotocol | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| - "master" | ||
| - "release/v*" | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| - "**/*.png" | ||
| pull_request: | ||
| branches: | ||
| - "main" | ||
| - "master" | ||
| - "release/v*" | ||
| paths-ignore: | ||
| - "**/*.md" | ||
| - "**/*.png" | ||
|
|
||
| jobs: | ||
| BuildMetaProtocolBinary: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 1440 # 12 hours | ||
| name: Build MetaProtocolProxy | ||
| env: | ||
| LOG_DIR: /tmp/test_logs | ||
| LOG_PATH: /tmp/test_logs/${{ matrix.protocal }}.log | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Build | ||
| run: | | ||
| bash ${GITHUB_WORKSPACE}/ci/ci_dev.sh |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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,109 @@ | ||
| ARG BUILD_OS=ubuntu | ||
| ARG BUILD_TAG=20.04 | ||
| ARG ENVOY_VRP_BASE_IMAGE=envoy-base | ||
|
|
||
|
|
||
| FROM scratch AS binary | ||
| COPY ci/docker-entrypoint.sh / | ||
| ADD configs/envoyproxy_io_proxy.yaml /etc/envoy/envoy.yaml | ||
| # See https://github.com/docker/buildx/issues/510 for why this _must_ be this way | ||
| ARG TARGETPLATFORM | ||
| ENV TARGETPLATFORM="${TARGETPLATFORM:-linux/amd64}" | ||
| ADD "${TARGETPLATFORM}/release.tar.zst" /usr/local/bin/ | ||
|
|
||
|
|
||
| # STAGE: envoy-base | ||
| FROM ${BUILD_OS}:${BUILD_TAG} AS envoy-base | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| EXPOSE 10000 | ||
| CMD ["envoy", "-c", "/etc/envoy/envoy.yaml"] | ||
| RUN mkdir -p /etc/envoy \ | ||
| && adduser --group --system envoy | ||
| ENTRYPOINT ["/docker-entrypoint.sh"] | ||
| # NB: Adding this here means that following steps, for example updating the system packages, are run | ||
| # when the version file changes. This should mean that a release version will always update. | ||
| # In PRs this will just use cached layers unless either this file changes or the version has changed. | ||
| ADD VERSION.txt /etc/envoy | ||
| RUN --mount=type=tmpfs,target=/var/cache/apt \ | ||
| --mount=type=tmpfs,target=/var/lib/apt/lists \ | ||
| apt-get -qq update \ | ||
| && apt-get -qq upgrade -y \ | ||
| && apt-get -qq install --no-install-recommends -y ca-certificates \ | ||
| && apt-get -qq autoremove -y | ||
|
|
||
|
|
||
| # STAGE: envoy | ||
| FROM envoy-base AS envoy | ||
| COPY --from=binary --chown=0:0 --chmod=644 \ | ||
| /etc/envoy/envoy.yaml /etc/envoy/envoy.yaml | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| /docker-entrypoint.sh / | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| /usr/local/bin/utils/su-exec /usr/local/bin/ | ||
| ARG ENVOY_BINARY=envoy | ||
| ARG ENVOY_BINARY_PREFIX= | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| "/usr/local/bin/${ENVOY_BINARY_PREFIX}${ENVOY_BINARY}" /usr/local/bin/envoy | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| /usr/local/bin/${ENVOY_BINARY_PREFIX}${ENVOY_BINARY}\.* /usr/local/bin/ | ||
|
|
||
|
|
||
| # STAGE: envoy-tools | ||
| FROM envoy AS envoy-tools | ||
| # See https://github.com/docker/buildx/issues/510 for why this _must_ be this way | ||
| ARG TARGETPLATFORM | ||
| ENV TARGETPLATFORM="${TARGETPLATFORM:-linux/amd64}" | ||
| COPY --chown=0:0 --chmod=755 \ | ||
| "${TARGETPLATFORM}/schema_validator_tool" /usr/local/bin/schema_validator_tool | ||
|
|
||
|
|
||
| # STAGE: envoy-distroless | ||
| # gcr.io/distroless/base-nossl-debian11:nonroot | ||
| FROM gcr.io/distroless/base-nossl-debian11:nonroot@sha256:f10e1fbf558c630a4b74a987e6c754d45bf59f9ddcefce090f6b111925996767 AS envoy-distroless | ||
| EXPOSE 10000 | ||
| ENTRYPOINT ["/usr/local/bin/envoy"] | ||
| CMD ["-c", "/etc/envoy/envoy.yaml"] | ||
| COPY --from=binary --chown=0:0 --chmod=644 \ | ||
| /etc/envoy/envoy.yaml /etc/envoy/envoy.yaml | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| /usr/local/bin/envoy /usr/local/bin/ | ||
|
|
||
|
|
||
| # STAGE: envoy-google-vrp-base | ||
| FROM ${ENVOY_VRP_BASE_IMAGE} AS envoy-google-vrp-base | ||
| EXPOSE 10000 | ||
| EXPOSE 10001 | ||
| CMD ["supervisord", "-c", "/etc/supervisor.conf"] | ||
| ENTRYPOINT [] | ||
| ADD --chown=0:0 --chmod=644 \ | ||
| configs/google-vrp/*.yaml /etc/envoy/ | ||
| ADD --chown=0:0 --chmod=755 \ | ||
| configs/google-vrp/launch_envoy.sh /usr/local/bin/launch_envoy.sh | ||
| ADD --chown=0:0 --chmod=644 \ | ||
| test/config/integration/certs/serverkey.pem /etc/envoy/certs/serverkey.pem | ||
| ADD --chown=0:0 --chmod=644 \ | ||
| test/config/integration/certs/servercert.pem /etc/envoy/certs/servercert.pem | ||
| RUN --mount=type=tmpfs,target=/var/cache/apt \ | ||
| --mount=type=tmpfs,target=/var/lib/apt/lists \ | ||
| apt-get -qq update \ | ||
| && apt-get -qq upgrade -y \ | ||
| && apt-get -qq install -y libc++1 supervisor gdb strace tshark \ | ||
| && apt-get autoremove -y \ | ||
| && chmod 777 /var/log/supervisor | ||
| ADD --chown=0:0 --chmod=755 configs/google-vrp/supervisor.conf /etc/supervisor.conf | ||
|
|
||
|
|
||
| # STAGE: envoy-google-vrp | ||
| FROM envoy-google-vrp-base as envoy-google-vrp | ||
| COPY --from=binary --chown=0:0 --chmod=755 \ | ||
| /usr/local/bin/envoy /usr/local/bin/envoy | ||
|
|
||
|
|
||
| # STAGE: envoy-google-vrp-custom | ||
| FROM envoy-google-vrp-base as envoy-google-vrp-custom | ||
| ARG ENVOY_CTX_BINARY_PATH | ||
| ADD "${ENVOY_CTX_BINARY_PATH}" /usr/local/bin/envoy | ||
|
|
||
|
|
||
| # Make envoy image as last stage so it is built by default | ||
| FROM envoy |
This file contains hidden or 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,22 @@ | ||
| ARG BUILD_OS=mcr.microsoft.com/windows/servercore | ||
| ARG BUILD_TAG=ltsc2019 | ||
|
|
||
| FROM $BUILD_OS:$BUILD_TAG | ||
|
|
||
| USER ContainerAdministrator | ||
| RUN net accounts /MaxPWAge:unlimited | ||
| RUN net user /add "EnvoyUser" /expires:never | ||
| RUN net localgroup "Network Configuration Operators" "EnvoyUser" /add | ||
|
|
||
| RUN mkdir "C:\\Program\ Files\\envoy" | ||
| RUN setx /M path "%path%;c:\Program Files\envoy" | ||
| ADD ["windows/amd64/envoy.exe", "C:/Program Files/envoy/"] | ||
|
|
||
| RUN mkdir "C:\\ProgramData\\envoy" | ||
| ADD ["configs/envoyproxy_io_proxy.yaml", "C:/ProgramData/envoy/envoy.yaml"] | ||
|
|
||
| EXPOSE 10000 | ||
|
|
||
| COPY ci/docker-entrypoint.bat C:/ | ||
| ENTRYPOINT ["C:/docker-entrypoint.bat"] | ||
| CMD ["envoy.exe", "-c", "C:\\ProgramData\\envoy\\envoy.yaml"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.